Esframework Of 4 Layer Structure 4 The layer is: client ( Client ), Application Server ( As ), Function server ( FS ), Database server. The following figure shows the relationship between them:
FS ( functionserver ), function server, which processes and only processes all functional requests, and does not participate in user management or State persistence. It provides pure functional services.
as ( applicationserver ), the Application Server forwards all functional requests to FS and processes all non-functional requests, it also manages end users, maintains statuses, and records logs.
the number of functional servers FS may be 0 to n ( N> 0 ). In a sense, each function server FS is interchangeable.
Splitting a server into a functional server and an application server has two obvious advantages:
(1)Function ServerFSCompletely reusable. Because the functional server adopts the "framework + plug-in" structure, the entire functional server is completely reusable. to switch from a specific application to another specific application, you only need to replace the functional plug-in,FSNo need to re-compile.
(2)BecauseFSOnly provides the most pure functional services, and does not require user management and status persistence. This function server is stateless during running, this makes it easy for functional servers to implement Load Balancing clusters (this article will introduce how this dynamic load balancing is implemented ).
IfEsframeworkJust to do this, there is no need to share it with you,EsframeworkNot only4The layer architecture provides full and complete support,EsframeworkFurther, it supports the architecture similar to regional distribution. The reader may have learned that4The layer-based architecture is already a distributed architecture. What does "region-like distributed" mean?
That can be said, 4 The layer architecture is a "vertical" architecture, and "similar to regional distributed" focuses on "horizontal". In the "similar to regional distributed" architecture, each specific" 4 The implementation of the layer architecture is only an element. For example, one of our applications now needs to provide some information for mobile phone users in all major cities nationwide. C/S . Our experience is to configure an application server for each city. As Because a large amount of Computing As Corresponding FS , So multiple FS For this As Service. And each city's As Communication between users (such as roaming users ), As And Management As The server is IRAs (Cross-region server ). As a result, I can plot it as an example:
In the figureFunaddinIs a function plug-in, which has been introduced previously. In the entire system, terminal-requested services are mainly divided into two categories:AsRequest function services. The other is non-functional communication between terminals. All function services are provided by function plug-ins (Funaddin). All non-functional communications are processed or transitioned by the application server. If the Function Service requested by the terminal is located in the external system, the function plug-in automatically locates the address of the external system and thenWebServiceTo the external system.
Now, the reader understandsEsframeworkIn4What is the difference between the layer structure and the "similar regional distributed" structure? I will give a brief overview belowEsframeworkPair4What are the powerful features supported by the layer structure and the "similar regional distributed" structure:
1. component-based
except that all functional plug-ins are components, the entire ESF platform is also composed of components. Advantages:
(1) quickly build a system
(2) promotes Component reuse, for example, As/IRAs/fs/IRFS You can use the same communication component to complete the work of the communication layer..
(3) implements "Hot swapping" for function plug-ins ", you can dynamically add / remove function services
2. highly scalable
due to ESF the service platform system must respond to sudden changes anytime, anywhere, one must be highly scalable:
(1) "Hot swapping" of function plug-ins
(2) dynamic access to external services (usually through WebService )
(3) application server dynamic addition of as / remove, for example, a new service for Dalian city is activated.
(4) function server FS dynamic addition / remove, implements a Dynamic Load Balancing cluster for functional servers.
3. highly scalable
as our services become increasingly popular, the number of our users will increase dramatically, therefore, the ESF service platform must be highly scalable to increase the maximum load and throughput of the system.
(1) because function servers require a large number of function operations, therefore, the bottleneck of the platform is usually located on the functional server, which can be solved through the dynamic cluster of the functional server. The server Load balancer for each functional server in the cluster is scheduled by the corresponding application server as .
(2) when the number of online users in a single region exceeds 5000 ~ 10000 , we need to add as for regional load balancing, this can be solved by hardware with the port ing function.
4.Highly reusable
ESFThe service platform system is not just applicable to usLbsService, in fact,ESFThe Service Platform System is a highly reusable system, that isESFA service platform can be used as a basic platform for any and any services, as long as the services provided by the platform areTCPFor connection-based communication.
5.Distributed
In addition to external system access through distributed services, distributed communication is used between application servers, between functional servers and application servers, and between application servers and cross-region application servers. Cross-region application serversRemotingScheduling between application servers.
6. simple deployment and automatic upgrade
ESF there may be a large number of service regions in the service platform system, for example, application servers and functional servers may be deployed in major cities. Therefore, manual deployment and upgrading are very inefficient, ESF the service platform provides automatic upgrade, loading, and running functions.
(1) after the service platform is installed, you only need to modify several parameters in the configuration file to run properly.
(2) when a function plug-in has a new version, you can automatically upgrade to the new version without stopping the service.
(3) when each server system ( As/IRAs/fs/IRFS ) when a new version is available, it is automatically upgraded to the new version when the system is restarted. To avoid service termination during the upgrade, You can gradually upgrade the server system.
7.Communication Guarantee Mechanism
When the network is suddenly disconnected or a server is restarted, after the network is restored or the server is restarted, You need to automatically resume communication (such as communication between AS and FS, communication between AS and IRAs,ESFThe service platform provides the following guarantees:
(1)Scheduled inquiry
(2)TCPAutomatic reconnection of Connection Pool
(3)Dynamic Link reversal
8.Support for roaming and cross-region functional requests
InESFIn the service platform system, roaming means that users in a region log on to the application server in another region.AsFor thisAsThis user is a roaming user. If you log on toAsHowever, the cross-region functional request is used to request functional services in other regions.ESFThe service platform fully supports both cases.
9.Communication between terminals
Sometimes, the terminal needs to communicate with the terminal (which may be in the same region or other regions), and such communication can be based on connection and non-connection. Connection-based communication images are used for real-time video chat and real-time monitoring. A picture is sent to offline users based on non-connected images. All of these,ESFThe service platform provides support.
10. Secondary Development is supported.
InESFThe service platform is highly reusable and scalable,ESFThe platform can easily support secondary development. As long as the same interface and communication protocol are followedESFPlatform for secondary development.
11. Client framework
If the application client can also use. NetDevelopment, thenEsframeworkIt also provides comprehensive support inEsframeworkWith the support of, the development client only needs to develop business plug-ins, and the entire network communication, multithreading, upgrade deployment, and so on are all completed by the framework. TheArticleInAgileimOpen a custom business plug-in.
All the above features will beBased onC/SOf4Layer architecture". Thank you for your attention!
If your application does not need such a complex structure, such as a simple three-layer architecture, esframework can still help you quickly build it. esframework is a lightweight application framework, you will not pay any price for the features/features provided by esframework that you don't need.
(Note that esframework is not suitable for handling legacy systems (just as it is difficult for you to use MFC to process VCL-based UI applications). Although esframework is irrelevant to applications, however, in order to abstract more tasks from the application to the framework, we must make some assumptions about the application. Fortunately, esframework only makes the least assumptions about the communication protocol of the application, this assumption is included in netmessage. If you build a new C/S application instead of processing legacy systems, esframework can save you a lot of time in architecture design, software development, debugging, and maintenance .)
(Finally, make an advertisement. If you take over a new project, it is very suitable to use4The layer architecture or "similar to regional distributed" architecture, hope we have the opportunity to cooperate :) Agilesoft@163.comContact me)
Go to: esframework reusable Communication Framework (sequence)