4. Architecture


  • 4.1 Server Architecture


    • Basic Concepts

      • Environment: the whole framework is implemented as an operation system.

      • Application: multiple applications could be run in one operation system.

      • Provider: an application may consist of many providers.

      • PVID: a provider is uniquely identified by a PVID, and till 2^24 PVID could be assigned to the entire Environment.


    • Components of the Server

      • Switcher: A Switcher is the collection point of the server's other components, which is used to accept the connection from the client, and finish the information exchange according to PVID. Multiple Switchers could be deployed in one operation system. One Switcher running on one server is the typical case.

      • GlobalId: A GlobalId is the service to assign the global Id. The GlobalId is used to provide global Id when an application is run on several servers. The GlobalId is also used to provide the global Id when the same application need to be separately run in order to be conveniently merged in future. The GlobalId need to be deployed on the operation system according to the detailed requirement.

      • Auany: The Auany provides the unified authentication service, which not only provides its own authentication service for the operation system, but also supports the third party's authentication service for other operation systems through plug-in. After successful authentication, the Auany provides the SessionId within the current operation system to identify the user. One Auany could be deployed for one operation system or more to share. The Auany also provides the support to the payment framework, and extends the third party's payment system by plug-in.

      • Provider: The Provider is the main subject of the application implementation and provides the service for the specific application. Actually, developing the application is implementing the Provider of this application. Strictly speaking, the server mentioned in previous contents to describe the View should be Provider in particular. And if there is no special statement, the server development in the following contents should be the development of the Provider.


    • Development Interface of the Server

      The Java language is used in the server development. The provider and zdb are the key packages.

      • limax.provider: The limax.provider provides the fundamental classes related to the View, is mainly referenced by the generated framework codes, and the application development should be implemented based on the generated codes. It also supports the access to the GlobalId service.

      • limax.zdb: The limax.zdb provides the database support, and accesses the transactional database by using the key-value pairs mode, supporting ACI except D. Its bottom tier uses the EDB key-value pairs database embedded in the Limax or MySQL database via configuration. The transactional storage procedure is the key feature of the ZDB, supporting level2 and level3 two kinds of transaction isolation. The most code of an application could be implemented in the storage procedure to guarantee the integrity of the transaction.

      The ZDB is the expansion of the View. When describing the View, the corresponding value of a specific key in one table or some fields of the value could be bund to the View by using the bind feature of the ZDB. After the transaction is successfully committed, if there is change in the corresponding value or the corresponding fields of the value during operating the database, the value or the data of the value's corresponding field will be automatically set to the View. If this View is the SessionView or TemporaryView, these datum will be automatically synchronized to the client. The bind relationship between the View and the table is multiple to multiple. Please pay special attention that there is no any assumption for the change sequence of bind fields of the same View, and these change have the transaction atomicity feature.


  • The Sever Management

    All the basic services provided by the framework could be controlled via JMX and provide a serial running status datum.

    The application could define its own data monitoring set, which performs the data collection during the operating phase.


  • 4.2 Client Architecture


    • Basic Concepts

      • Typed Client: The Typed Client is the client implemented in Java, C# and C++ languages

      • Script Client: The Script Client is the client implemented in embedded script languages such as LUA and Javascript.

      • Endpoint: The Endpoint is the entire entrance of the typed client framework.

      • EndpointConfig: The EndpointConfig which is the configuration of the endpoint provides the required information as the username, password, requested authentication platform, and requested PVID set, etc when login server.

      • EndpointListener: The EndpointListener, which is the receiving interface of the basic network event, reports the information as the connection progress, test result of the link, occurred network error, etc.

      • EndpointManager: The EndpointManager is decided by the EndpointConfig and EndpointListener together to manage the endpoint. An EndpointManager represents a network session and multiple EndpointManagers distinguished by SessionId could be existed in one client application. The EndpointManager collects all Views to the ViewContext classified with PVID.


    • Development Interface of the Client in Java language

      • limax.endpoint: The limax.endpoint provides the basic support from the Endpoint.

      • limax.endpoint.script: The limax.endpoint.script provides the interface to the embedded script languages. The demo implements the javascript scripting support because the OracleJDK embeds the javascript script engine.

      • limax.endpoint.variant: The limax.endpoint.variant provides the access support for the dynamic typed View. It is no need to generate the static View source code for the client developed under this mode.


    • Development Interface of the Client in C# language

      It is consistent with the Java version. If it is required to achieve the script support, the demanded script engine need to be integrated according to the interface specification of the script language.



    • Development Interface of the Client in C++ language

      It is consistent with the Java version, except no interface implemented for the embedded script language.

      The version which could directly embed the Lua language is provided.


    • Development Interface of the Script

      The limax.lua is the Lua version, and provides the full support for the View. All the datum of the view are totally reflected to the script's namespace according to the namespace defined by the View. The change message of the View could be received via each View's onXXX method defined following the standard to drive the client to present.

      The limax.js is the Javascript version and is consistent with the limax.lua in the implementation.


    • Development Interface of the HTML5

      The limax.js is directly used because the limax.js has internally implemented the WebSockect access.


  • Prev Next