Closed shengofsun closed 8 years ago
@shengofsun This is great work. There is one big issue to be resolved though: instead of changing the code in core, we would like everything to be plugged instead of be intrusively added. For this case, I don't think you need to change the rpc session and network code. You may need special calls during network disconnect, for which purpose I am introducing two join-points further in core for you (and actually for other purposes to be don in Q3, e.g., per-client statistics): on_rpc_session_connected
, and on _rpc_session_disconnected
(will do the pr later before Monday, and you may work with them to add your notification routines).
This is a little bit more complicated than being expected. We have two kinds of header types now: network_header_format
and dsn_msg_header_type
. Will need to remove network_header_format
together with this pr. Will be done by today.
@shengofsun see fix done by #454 and #455
@imzhenyu @qinzuoyan I've finished raw message parser according to pr #454 and #455. Please review.
@shengofsun The logic is pretty clear, and I think we can merge this for now since you are OOF (wish you great holiday btw) :-) I will do some improvement later though (the current work is very nice already:)) as we don't want to change the core code specifically for a certain plugin (as best as we can).
@shengofsun @qinzuoyan As more people may work on this project and the core code gets mature, I am planning to set up certain barriers for the code change to the core part to avoid problems as above. It is important to enforce those modularity rules so that the goal of rDSN is not compromised (which may present some challenges for the upper layer programmers but it will benefit in the long run). What do you think?
I agree with you, it's good for code stability.
add a raw message parser, directly forward message to upper level apps.