【. NetRemoting-2 "2015.09.17

Source: Internet
Author: User

"Remoting Architecture"
"1" is. An important component of netframework
Two important features of the "2" frame
"A" Basic Implementation "B" expandable/customizable

"Individual Components"
"1" "Client, client application domain"
Composition
"A" Agent "proxy"
"B" format "Formatter"
"C" channels "channel"

Points
1. Always interact with proxy "proxy" and server-side objects
2. "Proxy" knows the exact location of the remote object
"Proxy and Remote objects"
The "A" client requests a property or method from proxy, which sends the request to the server-side object ==> "Typical proxy mode"
Binding relationship of "B" Agent to remote object

"Proxy"
"Two parts"
"Transparent proxy, Transparent proxy"
Provides an interface that is consistent with the service object, converting "stack frame and stack frame" to "messages, message"
"Real agent, Real proxy"
Responsible for using the "formatter, Formatter" to serialize the message, the terminal client program [block], the message after the strong serialization is sent to the "channel, channels"
"Messages, Message"
"The client sends the request process"
"Obj"--"Transparent proxy"-"real agent"-"formatter"-"channel"----> "Arrival Service"

"2" "Server side, host application domain"
Composition
"A" channels "channel"
"B" Formatter "Formatter"
"C" Stack builder "stack Builder"
Note
The "A" host program keeps the port listening on the remoting open

"Service-side process"
Keep listening--"channel received to message"--"Formatter, deserialize"--"Stack Builder, create or Get object, call object method, get method returned, and encapsulate as message"--" Formatter, serialized "--
"Send to Channel"-----> "Return to Client"

* Three ways to activate the "Remoting object" to send a reference marshal "
In common
"The service object is created and remains in the host program domain"
"A" client activates "customer activated"
==> the creation of a dedicated remote object for its service, the state of the object has been maintained
==> Disadvantages:
(1) Increase the service pressure; (2) Waste server-side system resources [service-side maintains object state]
"B.1" server-side activation Singleton "Servers activated Singleton"
==> all clients share the same object, PostScript access is not able to recreate the object, and the service type must require an argument-free constructor
==> considering thread synchronization
"B.2" server-side activation SingleCall "Servers activated SingleCall"
==> creates an object for each request, and two returns the support Destroy object in each method.
==> not take too long to occupy resources
==> do not save object state
==> need to ask developers to write their own program logic to maintain the body
==> service type must require an argument-free constructor


"Server-side Activation" ==> "Well-knowoject,wko"

【. NetRemoting-2 "2015.09.17

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.