Esframework (34)-relationship diagram between itcpserveragent and iudpserveragent

Source: Internet
Author: User
(This Article applies to esframework v0.3 +)

In esframework introduction (7)-server proxy iserveragent (Amendment 2006.06.06), we have understood the responsibilities and functions of iserveragent, it is also known that itcpserveragent and iudpserveragent are serveragents used for TCP and UDP respectively. But what is the relationship between these components and other components (such as communication components, message processors, and processor factories)? I am not clear about the above, so I will add an article here. Article To straighten out the relationship. The component relationship diagrams of itcpserveragent and iudpserveragent are as follows:



The preceding two figures clearly describe the dependency between components and the message flow.
Note: The components on the right of the above itcpserveragent and iudpserveragent graph are exactly the same. They are all constructed by iserveragenthelper. The red line indicates sending the message, and the black line indicates the processing process of the received message. We can see that both itcpserveragent and iudpserveragent extract and reply messages from ireeclipsemanager, so that asynchronous message requests/replies can be converted to synchronous "method calls ".
For iudpserveragent, we also need to note that we use the same UDP network component-iesbudp on both the client and server (reusability is the goal of esframework development ), however, the imessagedispatcher assembly by the server for iesbudp is more complex.

In the relationship diagram between the two components, apart from the isinglemessagedealer which needs to be implemented by ourselves, esframework provides reference implementation for all other components and can be directly used.

Finally, the problem is that when the client uses point-to-point communication, if customer a and Customer B can communicate directly, p2pmessage between A and B does not need to be forwarded by the server, that is, it does not need to be submitted to iserveragent, but is sent to ip2pchannel. If Customer A and Customer B cannot communicate directly, the p2pmessage between A and B needs to be forwarded by the server. In order to shield upper-layer applications from p2pmessage from server senders or directly sent through ip2pchannel, esframework introduces imessagetransceiver. Its intelligence is that if p2pmessage can be directly sent through ip2pchannel, then, it is handed over to ip2pchannel. Otherwise, it is submitted to iserveragent and forwarded by the server. In this way, the application only needs to directly use imessagetransceiver to submit (send) messages, instead of caring about the underlying message routing path. More information about imessagetransceiver and ip2pchannel is described below.

Thanks for your attention!

Previous Article: esframework (33)-Implementation of As and FS communication and related

Go to: esframework reusable application framework (sequence)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.