The content of the invention
The present invention provides a kind of implementation method and persistence service system of persistence service, to solve to be delayed when server
When machine, upgrading or cutover, the problem of the conversation caused because interrupting current service.
The present invention provides a kind of persistence service system, and the system includes user subsystem, application service cluster subsystem
With concentrate session management subsystem, the application service cluster subsystem to include multiple application servers, wherein:
The user subsystem, for initiating application service request;
The application service cluster subsystem, the application service request scheduling for being initiated according to the user subsystem should
With server, and session information is obtained from the concentration session management subsystem by the application server being dispatched to, be the use
Family subsystem provides conversational services;
The concentration session management subsystem, for being the application service being dispatched in the application service cluster subsystem
Device provides session information.
Preferably, the application service cluster subsystem, is additionally operable to set up session according to application service request, and will
The session information of foundation is sent to the concentration session management subsystem, and session term of validity information is included in the session information;
The concentration session management subsystem, is additionally operable to manage the session letter that the application service cluster subsystem is set up
Breath.
Preferably, the application service cluster subsystem also includes dispatching management module;
The dispatching management module, for the meeting of running status and current service by monitoring all application servers
Words, dispatch application server.
Preferably, the user subsystem, is additionally operable to obtain the application version letter that the application service request is needed to use
Breath, and increase the application version information in application service request;
The dispatching management module, is additionally operable to the meeting of the running status, current service by monitoring all application servers
Words and the application version information of deployment, dispatch application server.
Preferably, the dispatching management module, is the application for monitoring the application server deployment that current scheduling is arrived
When the application version information that version information is included in being asked with the application service is mismatched, according to the application clothes that current scheduling is arrived
The application service request of the application version information for carrying recommendation of business device forwarding is rescheduled answers server.
Preferably, the dispatching management module, is for monitoring the current application server for providing conversational services
During interruption, new application server is dispatched for current sessions provide service.
Preferably, the application service cluster subsystem, after being additionally operable to provide conversational services for the user subsystem,
Conversation end is sent to the concentration session management subsystem to ask;
The concentration session management subsystem, is additionally operable to according to conversation end request or the session term of validity information
Delete session information.
Present invention also offers a kind of implementation method of persistence service, it is applied to comprising user subsystem, application service
The persistence service system of cluster subsystem and concentration session management subsystem, it is characterised in that application service cluster
System includes multiple application servers, and the method includes:
The user subsystem initiates application service request;
The application service request scheduling application clothes that the application service cluster subsystem is initiated according to the user subsystem
Business device, and session information is obtained from the concentration session management subsystem by the application server being dispatched to, it is user's
System provides conversational services.
Preferably, it is described by the application server that is dispatched to from the concentration session management subsystem obtain session information it
Before, methods described also includes:
Session is set up according to application service request, and the session information of foundation is sent to the concentration session management
Subsystem, includes session term of validity information in the session information.
Preferably, the application service cluster subsystem also includes dispatching management module;
The application service request scheduling application clothes that the application service cluster subsystem is initiated according to the user subsystem
Business device includes:
The dispatching management module by monitoring the session of the running status and current service of all application servers, scheduling
Application server.
Preferably, the application version letter that the application service request is needed to use is included in the application service request
Breath;
Methods described also includes:The dispatching management module is by monitoring the running status of all application servers, current
The session of service and the application version information of deployment, dispatch application server.
Preferably, the dispatching management module is by monitoring the meeting of the running status, current service of all application servers
Words and the application version information of deployment, dispatch application server, including:
The dispatching management module monitor the application version information of the application server deployment that current scheduling is arrived with it is described
When the application version information included in application service request is mismatched, the carrying that the application server arrived according to current scheduling is forwarded
The application service request for having the application version information of recommendation is rescheduled answers server.
Preferably, the dispatching management module is by monitoring the meeting of the running status and current service of all application servers
Words, scheduling application server includes:
When the dispatching management module monitors the application server interruption for currently providing conversational services, dispatch new
Application server provides service for current sessions.
Preferably, after the application service cluster subsystem provides conversational services for the user subsystem, the side
Method also includes:
The application service cluster subsystem sends conversation end and asks to the concentration session management subsystem;
The concentration session management subsystem is asked or the session term of validity information deletion meeting according to the conversation end
Words information.
The implementation method and persistence service system of above-mentioned persistence service, are separated by by session with service, right
Session is managed concentratedly, keeps the Stateless of service, solve when server delay machine, upgrading or during dilatation, it is necessary in
The conversation problem that disconnected current service causes.
Specific embodiment
To make the object, technical solutions and advantages of the present invention become more apparent, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
The invention provides a kind of persistence service system, the system includes user subsystem, application service cluster subsystem
System and concentration session management subsystem, the application service cluster subsystem include multiple application servers, wherein:
The user subsystem, for initiating application service request;
The application service cluster subsystem, the application service request scheduling for being initiated according to the user subsystem should
With server, and session information is obtained from the concentration session management subsystem by the application server being dispatched to, be the use
Family subsystem provides conversational services;
The concentration session management subsystem, for being the application service being dispatched in the application service cluster subsystem
Device provides session information.
Wherein, the application service cluster subsystem, is additionally operable to set up session according to application service request, and will build
Vertical session information is sent to the concentration session management subsystem, and session term of validity information is included in the session information;Institute
Concentration session management subsystem is stated, is additionally operable to manage the session information that the application service cluster subsystem is set up.
Specifically, the application service cluster subsystem also includes dispatching management module;The dispatching management module, is used for
By monitoring the session of the running status and current service of all application servers, application server is dispatched.
In addition, in order to solve the scheduling of current sessions and subsequent session between multiple versions, in above-mentioned application service request
Also include the application version information that application service request is needed to use, the dispatching management module is by monitoring all application services
The application version information of session and the deployment of the running status, current service of device, dispatches application server;Currently adjusted when monitoring
The application version information that the application version information of the application server deployment spent and the application service are included in asking is not
Timing, according to current scheduling to application server forward the application version information for carrying recommendation application service ask weight
Server is answered in new scheduling.
As shown in figure 1, being the structural representation of persistence service system embodiment of the present invention, the system includes user's subsystem
System 11, application service cluster subsystem 12 and concentration session management subsystem 13, wherein:
User subsystem, is responsible for obtaining subscription client information, including client and application version information.And taken in application
Increase client and application version information in business request message, set up conversational services.
Application service cluster subsystem, is run by monitoring all application servers in the application service cluster subsystem
State, the session of current service, the information such as application version of deployment, the application service request to user carries out unified tune
Degree.The application server of the application service cluster subsystem provides the user session according to the result that dispatching management module is dispatched
Service.
Concentrate the life cycle management of session management subsystem, the centralized management of responsible user conversation, including session, be institute
The application server for stating application service cluster subsystem provides session data etc..
Said system, is separated by by session with service, and session is managed concentratedly, realizes the stateless of service
Property, form one online upgrading cutover free of discontinuities, Single Point of Faliure can be provided and do not interrupt compatible lasting of session, multi version
Change service system.
The above-mentioned persistence service including user subsystem, application service cluster subsystem and concentration session management subsystem
System realizes that the method for persistence service includes:
Step one, the user subsystem are responsible for obtaining client and application version information, initiate the request of application service
With the response for the treatment of application service;
User subsystem obtains the version information of client and application, and increase in application service request the client and
Application version information.
Client includes B/S (Browser/Server) clients and C/S (Client/Server) client, C/S client
End includes version information, and B/S clients do not include version information.
User subsystem increases client and application version information when application service is asked in request message.For
B/S clients, only have client-side information in request message, do not have application version information, now give tacit consent to according to more recent application version
Conversational services are provided;For C/S clients, client-side information, application version information are included in request message.
Step 2, the scheduling of the application service cluster subsystem responsible application server and conversational services;
The application service cluster subsystem application server is scheduled;Application server is according to United Dispatching result
Conversational services are provided.
The application service cluster subsystem includes dispatching management module, and the module is responsible for the application service cluster subsystem
The monitoring of all application server states in system, the information of monitoring includes state, the meeting of current service of application server operation
Words, application version of deployment etc., and unified scheduling is carried out according to the result of monitoring.Especially, when the application service cluster
During certain application server service disruption of subsystem, it is current meeting that dispatching management module can be dispatched to new application server
Words offer service, to ensure that session is not interrupted.
The application service cluster subsystem includes multiple application servers, and application server is adjusted according to dispatching management module
The result of degree provides the user conversational services, application version information of the application server comprising the server disposition and recommendation should
Use version information.Under default situations, application server directly provides the user conversational services, if the application server deployment
Application version is mismatched with the session of user, then forward the user conversation to ask to dispatching management module, and in message is forwarded
The application version information of its recommendation is added, treatment is scheduled according to forwarding message again by dispatching management module.
Step 3, the concentration session management subsystem are responsible for the centralized management of user conversation.
The session for concentrating session management subsystem to produce application server in the application service cluster subsystem
Managed concentratedly.
The information, the information not comprising application server such as version, the term of validity comprising application in session, it is ensured that the nothing of service
State, so that all of application server can use these sessions.Such as session 1 is produced by application server 1,
Now application server 1 is delayed and machine or does upgrade maintenance, and application server 1 no longer provides service, but session 1 is still stored in institute
State in concentration session management subsystem, after the dispatching management module monitors the state of the operation of application server 1, scheduling is applied
Server 2, by application server 2 directly using the data of session 1 in the concentration session management subsystem, can thus protect
Hold the continuity of session 1.Because session is created by application server, therefore, the application version that session is included refers to application
The application version disposed in server.
The life cycle management for concentrating session management subsystem to be responsible for session, the foundation comprising session, deletion.Session
Foundation by the application service cluster subsystem application server initiate, the deletion of session can be according to the application service
Cluster subsystem application server session ending request is actively deleted, it is also possible to which the term of validity according to session is automatically deleted.
The inquiry for concentrating session management subsystem to be responsible for session, due to not including Application Server information in session,
Can be used by all application servers in the application service cluster subsystem.
Also include between the step 2 and step 3:Application server in the application service cluster subsystem,
When the session start for receiving user for the first time is asked, create user conversation and session is sent to the concentration session management subsystem
System is managed, and the application server does not preserve session information.
If the session of user is existing, the application server in the application service cluster subsystem is receiving scheduling
After the message of management module scheduling, session information directly is obtained from the concentration session management subsystem, and believe according to session
Breath provides the user service.
Application server in the application service cluster subsystem notifies the concentration in user conversation normal termination
Session management subsystem deletes the session information.
The persistence service implementation method that the present invention is provided, is separated by by session with service, and session is collected
Middle management, keeps the Stateless of service, solves to draw, it is necessary to interrupt current service when server delays machine, upgrading or cutover
The problems such as conversation and multi version the Parallel Service scheduling for rising are difficult, realize can provide online upgrading cutover free of discontinuities,
Single Point of Faliure does not interrupt the compatible persistence service of session, multi version.
Present invention also offers a kind of implementation method of persistence service, it is applied to comprising user subsystem, application service
The persistence service system of cluster subsystem and concentration session management subsystem, the application service cluster subsystem includes multiple
Application server, the method includes:
The user subsystem initiates application service request;
The application service request scheduling application clothes that the application service cluster subsystem is initiated according to the user subsystem
Business device, and session information is obtained from the concentration session management subsystem by the application server being dispatched to, it is user's
System provides conversational services.
Wherein, the application version information of client can be included in above-mentioned application service request, is asked by application service
The application version information of middle increase client is sought, the problem of incompatible version is advantageously accounted for, and can provide unremitting
Service.
As shown in Fig. 2 being the schematic flow sheet of persistence service implementation method embodiment of the present invention, the method includes:
Step 201, the version information for obtaining client and application, initiate application service request;
For B/S clients, there was only client-side information in request, there is no application version information, for C/S clients, please
Comprising client-side information and application version information in asking;
Step 202, application service cluster subsystem are scheduled, please for the application service without application version information
Ask, acquiescence provides service according to newest application version, application server provides conversational services according to United Dispatching result;
Especially, the step has following two situations:
(1), step 2021a, application service cluster subsystem providing conversational services application server interrupt (for example
Power off, machine of delaying, upgrade maintenance etc.) when, cause the service disruption on the application server;Step 2021b, application service cluster
The dispatching management module of system monitors the state of the server, and dispatches new application server for current sessions provide clothes
Business, to ensure that session is not interrupted, detailed process is as shown in Figure 3.
(2), step 2022a, the application server of application service cluster subsystem 102 should be answered according to scheduling result treatment
When being asked with the application service of server, it is found that the request is mismatched with the version of its application service;Step 2022b, forwarding should
User conversation request adds its application version information recommended to dispatching management module in message is forwarded, by management and running
Module is scheduled treatment again according to forwarding message, and detailed process is as shown in Figure 4.
Whether step 203, application service cluster subsystem judge have built up session according to application service request;
For the first time session request of user, do not exist session information in system, for being interrupted due to application server,
The request of the lasting application service that the reasons such as application server version mismatch cause, has deposited in concentration session management subsystem
In session information.
Step 204, the application server of application service cluster subsystem create user conversation and session are sent into concentration
It is managed in session management subsystem;
The application server does not preserve session information, is managed collectively by concentration session management subsystem;
Step 205, the application server of application service cluster subsystem obtain session from session management subsystem is concentrated
Information, provides the user uninterrupted conversational services;
Step 206, concentration session management subsystem are actively deleted according to application service cluster sub-system conversation ending request
Session data, it is also possible to which the term of validity according to session is automatically deleted.
Compared with existing persistence service system, the persistent object system based on centralized session has advantages below:
(1) session is separated with service, and service possesses Stateless.The present invention separates session with service, application server
Interruption do not influence session, being rescheduled by load balancing can provide the user continuous conversational services.
(2) multi version application Parallel Service is supported.Existing system, subscription client, application service end are typically all same
Step upgrading, to ensure the compatible of version.The present invention increases application version information in subscription client, application server, leads to
The United Dispatching of dispatching management module is crossed, the Parallel Service of multiple versions is realized.Especially, application server is also comprising recommendation
Application version information, when the version of session and the application server of user is mismatched, the application server can be according to pushing away
The application version information recommended, load balancing module is transmitted to by the application service request of user, is rescheduled by the latter, thus
Unremitting persistence service can be provided the user.
As can be seen here, the present invention realizes a session with clothes using the persistence service method based on centralized session
Business is separated, service Stateless, the persistent object system of multi version application Parallel Service.
One of ordinary skill in the art will appreciate that all or part of step in the above method can be instructed by program
Related hardware is completed, and said procedure can be stored in computer-readable recording medium, such as read-only storage, disk or CD
Deng.Alternatively, all or part of step of above-described embodiment can also be realized using one or more integrated circuits.Accordingly
Ground, each module/unit in above-described embodiment can be realized in the form of hardware, it would however also be possible to employ the shape of software function module
Formula is realized.The present invention is not restricted to the combination of the hardware and software of any particular form.
The above embodiments are merely illustrative of the technical solutions of the present invention and it is unrestricted, reference only to preferred embodiment to this hair
It is bright to be described in detail.It will be understood by those within the art that, technical scheme can be modified
Or equivalent, without deviating from the spirit and scope of technical solution of the present invention, all should cover in claim model of the invention
In the middle of enclosing.