RPC platform architecture
1. Architecture role:
Map the client's call transparently map to the server side, and make a unified platform for requesting a request.
2. The characteristics of the architecture:
l Develop language-independent, cross-platform use.
Although there is a RPC software based on customer server, COM, CORBA, etc., which can be used before SOAP, but COM, CORBA cannot cross the platform's independent, and cannot do real development language independent and operating systems. Platform has nothing to do.
l Performance and speed teaching
The RPC architecture is based on Socket programming, the transmission speed is faster, and transmits XML-based protocols. Therefore, this teaching generally based on the SOAP protocol of the HTTP protocol is fast; the SOAP protocol needs to resolve WSDL, generates an interface according to WSDL, and then calls, and the RPC architecture uses a call name As an identification of the interface, the steps of parsing the WSDL, interface generation, so performance is better than SOAP.
l High stability
The RPC architecture is based on TCP / IP network architecture, which is a connection-based network, which is suitable for use in non-reliable networks such as Internet and GPRS.
l Use simple
The RPC architecture is fully encapsulated without the need for users to understand the complex DCOM principle. It is difficult to understand the COM pointer and configure CORBA and generate complex IDL files. No need to resolve XML and care about how to serialize the serialization parameters and reverse sequence.
l Loose coupling, strong expansion
The RPC architecture is completely based on the MVC architecture design, the advantage of Struts architecture, supports the user's own expansion in Service and Skelet, and can make flexible mapping according to the configuration file.
3. Architecture principle
Software architecture is divided into two parts, clients and servers:
The entire system is divided according to the MVC architecture, where Bussiness Model belongs to Model, UI belongs to View. Send Skelat, Dispatch, Sevlet, and XmlCall, TCP / IP, Stub to the Control section.
The system architecture refers to the implementation of Web Services, calls the remote procedure to call transparent transfer on the client and server. Where stub is a proxy for the remote process, it is the agent of the service method. Skela is the implementation of STUB on the server, similar to the action in Struts.
3.1 TCP / IP
The use of Socket-based set words is implemented, and the service segment is listened, the client is connected to the request.
3.2 XmlcallProtocol
XML format-based character streams sent on the network, XMLCallProtocol packages, including the name, parameter, etc. requested by the client. XmlCallProtocol distributes the request unpacking the client on the server.
3.3 servlet
Treatment of a request is called a servlet, the servlet should maintain a session, saving the client's connection information, including IP.
3.4 Diapatch
Dispatch In the sevlet, each customer's request arrives in Sevlet first call XMLCallProtocol for decryption, then let DiaPatch are distributed to each SKELE to return the result.
3.5 Skelet and Stub
SkelaT and Stub are pair and implement transparently transmitted on TCP / IP requests. Skela is responsible for connecting business logic into an implementation. Skela corresponds to an action in Structs. Skela should have a configuration file in the server, SkeleTmaping, which correspond to the specific SKELET with the specific SKELET, and the DISPATCH will request it to the specific SKELET.
3.6 UI
The user's interface part is mainly a window and other message processing. In the implementation, there should be a Poxy to expose all the business logic interfaces. Each interface calls Stub, sets the name of the stub, then incoming parameters (not allowed to use reference parameters), and call the server's SKELET. Waiting results completed, The result is back to the interface.
3.7 Bussiness Model
The business logic part is the same as before, but in the betting game of football, this part can be decomposed according to the MVC architecture, where the call part is VIEW, the web server, and data transformation is Control, the real business logic Model changes the database again. Access part. I hope that the implementation is flexible to use the MVC mode.
In summary, whether the client is Kjava, Widnows CE, due to the service segment interaction, the data format is XML-based character stream (encoded as Unicode), so the multiple development language tool is compatible.
4. Implement UML map:
(
slightly
)
5. Source (omitted)
2004-11-10
riding