CN109150936A - The sharing method and device of session object Session in a kind of distributed type assemblies - Google Patents
The sharing method and device of session object Session in a kind of distributed type assemblies Download PDFInfo
- Publication number
- CN109150936A CN109150936A CN201710463414.1A CN201710463414A CN109150936A CN 109150936 A CN109150936 A CN 109150936A CN 201710463414 A CN201710463414 A CN 201710463414A CN 109150936 A CN109150936 A CN 109150936A
- Authority
- CN
- China
- Prior art keywords
- session
- session object
- server
- target
- identification number
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
- H04L67/148—Migration or transfer of sessions
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The present invention provides the sharing methods and device of session object Session in a kind of distributed type assemblies.This method comprises: receiving the session object Session search request that application server is sent, session object Session search request includes session object Session identification number;Fragment value is obtained according to session object Session identification number;Target session object Session storage server is determined from session object Session storage server cluster according to fragment value;Session object Session search request is forwarded to target session object Session storage server;Receive the session object Session data corresponding with session object Session identification number that target session object Session storage server is sent;Session object Session data corresponding with session object Session identification number are sent to application server.Application server of the embodiment of the present invention does not store Session data, and the duplication of Session data need not be carried out between application server, improves the performance and horizontal extension ability of distributed system.
Description
Technical field
The present invention relates to field of computer technology, and in particular to session object Session's is total in a kind of distributed type assemblies
Enjoy method and device.
Background technique
In order to improve the treatment effeciency of data, the reliability of data processing is improved, is improved for centralized server,
Provide the data processing architecture of distributed type assemblies.It include multiple application servers in distributed type assemblies, Web server will be objective
Family end send data processing request according to load balancing be sent in the specific application servers in distributed type assemblies into
Row processing.
Session object Session represents the process of session of server-side and client, session object Session storage
Session identification number is identified to distinguish different users by session object in server-side, and for each client.Default feelings
Under condition, the session object Session data of each application server for storage portion oneself, if the request of next user is distributed
It is then that can not obtain the session object Session being previously created on to other application server, user must log in again,
Poor user experience.In order to realize sharing for session object Session, in the prior art more application services in distributed type assemblies
Session object Session between device in isochronous memory, is consistent session object Session, externally transparent.If wherein
One application server breaks down, and according to the principle of load balancing, Web server can traverse other available application clothes of searching
Business device, distribution request, since the session object Session between each application server has been synchronized, therefore can guarantee the meeting of user
Words object Session will not lose.
However, inventor has found during realizing the embodiment of the present invention, session object in existing distributed type assemblies
The sharing method session object Session duplication of Session can reduce the performance of distributed system, especially work as session object
Biggish object is saved in Session, and when object variation is very fast, performance decline is more significant.Application server instance
When increase, the session object Session data volume in the number and each application server of session object Session duplication occurs
Multiple increases, so that the horizontal extension of distributed system is restricted.Session object Session in specific application servers
Content is synchronized to other application server by broadcast mode, will cause network flow bottleneck.More parts of meetings of application server for storage
Object Session is talked about, memory increases, and increases garbage reclamation burden, and performance decline is serious.
Summary of the invention
The embodiment of the present invention provides the sharing method and device of session object Session in a kind of distributed type assemblies, is used for
It solves the problems, such as in the prior art since session object Session duplication causes system performance decline, horizontal extension limited.
The embodiment of the invention provides the sharing methods of session object Session in distributed type assemblies a kind of, comprising:
The session object Session search request that application server is sent is received, the session object Session lookup is asked
It asks including session object Session identification number;
Fragment value is obtained according to the session object Session identification number;
Determine that target session object Session is deposited from session object Session storage server cluster according to fragment value
Store up server;
The session object Session search request is forwarded to the target session object Session storage server;
Receive that the target session object Session storage server sends with session object Session identification number pair
The session object Session data answered;
The session object Session data corresponding with session object Session identification number are sent to the application
Server.
It is optionally, described that fragment value is obtained according to the session object Session identification number, comprising:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
Optionally, described to determine target session pair from session object Session storage server cluster according to fragment value
As Session storage server, comprising:
Receive the fragment value Storage Server List that registration center's server is sent, the fragment value Storage Server List
Corresponding relationship including fragment value Yu session object Session storage server;
According to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in storage server cluster.
The embodiment of the present invention provides the sharing method of session object Session in distributed type assemblies a kind of, comprising:
Receive the session object Session search request that client is sent, the session object Session search request packet
Include session object Session identification number;
The selection target session object Session storage agent from session object Session storage agent server cluster
Server;
The session object Session search request is forwarded to the target session object Session storage agent clothes
Business device;
Receive identifying with session object Session for the target session object Session storage agent server return
Number corresponding session object Session data.
Optionally, the method also includes:
Receive the target session object Session storage agent server set group-list that registration center's server is sent.
The embodiment of the invention provides the sharing means of session object Session in distributed type assemblies a kind of, comprising:
Session object search request receiving unit, the session object Session for receiving application server transmission are searched
Request, the session object Session search request includes session object Session identification number;
Fragment value acquiring unit, for obtaining fragment value according to the session object Session identification number;
Target session object storage server determination unit takes for being stored according to fragment value from session object Session
It is engaged in determining target session object Session storage server in device cluster;
Session object search request retransmission unit, it is described for the session object Session search request to be forwarded to
Target session object Session storage server;
Session object data receipt unit, for receiving the target session object Session storage server transmission
Session object Session data corresponding with session object Session identification number;
Session object data transmission unit, for the session object corresponding with session object Session identification number by described in
Session data are sent to the application server.
Optionally, the fragment value acquiring unit is further used for:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
Optionally, the target session object storage server determination unit is further used for:
Receive the fragment value Storage Server List that registration center's server is sent, the fragment value Storage Server List
Corresponding relationship including fragment value Yu session object Session storage server;
According to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in storage server cluster.
The embodiment of the present invention provides the sharing means of session object Session in distributed type assemblies a kind of, comprising:
Session object search request receiving unit, for receiving the session object Session search request of client transmission,
The session object Session search request includes session object Session identification number;
Target session object storage agent server selecting unit is used for from session object Session storage agent service
Selection target session object Session storage agent server in device cluster;
Session object search request retransmission unit, it is described for the session object Session search request to be forwarded to
Target session object Session storage agent server;
Session object data receipt unit is returned for receiving the target session object Session storage agent server
The session object Session data corresponding with session object Session identification number returned.
Optionally, further includes:
Session object storage agent server cluster list reception unit, for receiving the mesh of registration center's server transmission
Mark session object Session storage agent server set group-list.
The sharing method and device of session object Session in distributed type assemblies provided in an embodiment of the present invention, using clothes
Business device does not store Session data, and the duplication of Session data need not be carried out between application server, compared with prior art,
EMS memory occupation is smaller, improves the performance of garbage reclamation;Application server instance number and the linear growth of service ability, more conducively
The horizontal extension of distributed system;Session data are only between application server and session object Session storage server
Interaction, more conducively control of network flow quantity, avoid traffic bottlenecks.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 is that the process of the sharing method of session object Session in the distributed type assemblies of one embodiment of the invention is shown
It is intended to;
Fig. 2 is the schematic diagram of the sharing method of session object Session in the distributed type assemblies of one embodiment of the invention;
Fig. 3 is the process of the sharing method of session object Session in the distributed type assemblies of another embodiment of the present invention
Schematic diagram;
Fig. 4 is that the structure of the sharing means of session object Session in the distributed type assemblies of one embodiment of the invention is shown
It is intended to;
Fig. 5 is the structure of the sharing means of session object Session in the distributed type assemblies of another embodiment of the present invention
Schematic diagram;
Fig. 6 is the entity structure schematic diagram of the electronic equipment of one embodiment of the invention;
Fig. 7 is the entity structure schematic diagram of the electronic equipment of another embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
Fig. 1 is the flow diagram of the method for one embodiment of the invention.As shown in Figure 1, the method for the embodiment is with meeting
Words object Session storage agent server is executing subject, comprising:
S11: receiving the session object Session search request that application server is sent, and the session object Session is looked into
Looking for request includes session object Session identification number;
It should be noted that the application server of the embodiment of the present invention receives the session object Session that client is sent
Session object Session search request is sent to session object Session storage agent service by search request, application server
Device (Redis-Proxy).
S12: fragment value is obtained according to the session object Session identification number;
It should be noted that the session object Session storage agent server (Redis-Proxy) of the embodiment of the present invention
Fragment value is obtained according to the session object Session identification number in session object Session search request.Fragment refers to will
Words object Session data acquisition system is split to the process of multiple session object Session storage servers (Redis), Mei Gehui
Words object Session storage server (Redis) include the subset of the corresponding Session data of each Session identification number.
S13: target session object is determined from session object Session storage server cluster according to fragment value
Session storage server;
It should be noted that Redis-Proxy of the embodiment of the present invention finds out fragment value according to Session identification number, thus
Corresponding Redis example can be navigated to, subsidiary Redis identification number in Session identification number is not needed and goes positioning Redis real
Example.
S14: the session object Session search request is forwarded to the target session object Session storage clothes
Business device;
It should be noted that the application server of the embodiment of the present invention no longer accesses Redis by direct-connected mode, but it is logical
Redis-Proxy is crossed to access Redis example;Redis-Proxy and Redis supports same bidding protocol, to application service
Device is transparent.
For example, Session data are limited in 1024 fragments, 0-511 fragment storage to Redis1,512-
1023 fragments are stored into Redis2.Redis-Proxy finds out fragment value according to Session identification number, then selects corresponding
Redis example is read or write-in Session data.The Session identification number that application server generates no longer needs to add Redis
The information such as identification number.
S15: identifying with session object Session for the target session object Session storage server transmission is received
Number corresponding session object Session data;
It should be noted that the target session object Session storage server of the embodiment of the present invention will be marked with Session
Know a number corresponding Session data and is sent to session object Session storage agent server (Redis-Proxy).
S16: the session object Session data corresponding with session object Session identification number are sent to described
Application server;
It should be noted that session object Session storage agent server (Redis-Proxy) receive with
The corresponding Session data forwarding of Session identification number is to application server.
The sharing method of session object Session in distributed type assemblies provided in an embodiment of the present invention, application server is not
Session data are stored, the duplication of Session data need not be carried out between application server, compared with prior art, memory accounts for
With smaller, the performance of garbage reclamation is improved;Application server instance number and the linear growth of service ability, it is more conducively distributed
The horizontal extension of system;Session data only interact between application server and session object Session storage server,
More conducively control of network flow quantity avoids traffic bottlenecks.
It is described to be identified according to the session object Session in a kind of optional embodiment of the embodiment of the present invention
Number obtain fragment value, comprising:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
Further, described to determine target session from session object Session storage server cluster according to fragment value
Object Session storage server, comprising:
Receive the fragment value Storage Server List that registration center's server is sent, the fragment value Storage Server List
Corresponding relationship including fragment value Yu session object Session storage server;
According to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in storage server cluster.
It should be noted that Redis and the Redis-Proxy not instead of static configuration of the embodiment of the present invention, pass through note
The storage services dynamic acquisition such as etcd/zookeeper (as shown in Figure 2) of volume central server, easily realize Redis with
The horizontal dilatation of Redis-Proxy.
In dilatation of the embodiment of the present invention to Redis, etcd/zookeeper burst information is on the one hand updated, two want
By original Data Migration to correct Redis.
By taking Fig. 2 as an example, 0-511 fragment storage to example Redis1,512-1023 fragment is stored to example Redis2, at this time
Increase Redis3, and realize balanced fragment, by administration order by 341-511,512-680 fragment is moved on Redis3.Most
Fragment layout afterwards:
Redis1 | Redis2 | Redis3 |
0-340 | 681-1023 | 341-680 |
The data of [341-680] fragment section will store on Redis3 after migration is completed, and the subsequent fragment section
Request will be forwarded on Redis3.
In capacity reducing of the embodiment of the present invention to Redis, with dilatation on the contrary, example as above, by the number of [341-680] fragment section
According to, move to Redis1, Redis2 respectively, finally remove Redis3.
In addition, when master (master) node delay machine of Redis, then can become automatically from slave node in the embodiment of the present invention
Service is provided for host node.
Fig. 3 is the process of the sharing method of session object Session in the distributed type assemblies of another embodiment of the present invention
Schematic diagram.As shown in figure 3, the method for the embodiment of the present invention is using application server as executing subject, comprising:
S31: receiving the session object Session search request that client is sent, and the session object Session lookup is asked
It asks including session object Session identification number;
S32: selection target session object Session is stored from session object Session storage agent server cluster
Proxy server;
It should be noted that application server need to be from the etcd/zookeeper (as shown in Figure 2) of registration center's server
Etc. storage services obtain Redis-Proxy list, according to equalization algorithm or random algorithm select a Redis-Proxy as
Target session object Session storage agent server, and send Redis order and stored to the target session object Session
Proxy server.
S33: the session object Session search request is forwarded to the target session object Session and stores generation
Manage server;
S34: receive that the target session object Session storage agent server returns with session object Session
The corresponding session object Session data of identification number.
The sharing method of session object Session in distributed type assemblies provided in an embodiment of the present invention, application server is not
Session data are stored, the duplication of Session data need not be carried out between application server, compared with prior art, memory accounts for
With smaller, the performance of garbage reclamation is improved;Application server instance number and the linear growth of service ability, it is more conducively distributed
The horizontal extension of system;Session data only interact between application server and session object Session storage server,
More conducively control of network flow quantity avoids traffic bottlenecks.
In a kind of optional embodiment of the embodiment of the present invention, the method also includes:
Receive the target session object Session storage agent server set group-list that registration center's server is sent.
Fig. 4 is that the structure of the sharing means of session object Session in the distributed type assemblies of one embodiment of the invention is shown
It is intended to.As shown in figure 4, the device of the embodiment of the present invention includes session object search request receiving unit 41, fragment value acquisition list
First 42, target session object storage server determination unit 43, session object search request retransmission unit 44, session object data
Receiving unit 45 and session object data transmission unit 46, specifically:
Session object search request receiving unit 41, the session object Session for receiving application server transmission are looked into
Request is looked for, the session object Session search request includes session object Session identification number;
Fragment value acquiring unit 42, for obtaining fragment value according to the session object Session identification number;
Target session object storage server determination unit 43, for being stored according to fragment value from session object Session
Target session object Session storage server is determined in server cluster;
Session object search request retransmission unit 44, for the session object Session search request to be forwarded to institute
State target session object Session storage server;
Session object data receipt unit 45 is sent for receiving the target session object Session storage server
Session object Session data corresponding with session object Session identification number;
Session object data transmission unit 46, for the session pair corresponding with session object Session identification number by described in
As Session data are sent to the application server.
The sharing means of session object Session in distributed type assemblies provided in an embodiment of the present invention, application server is not
Session data are stored, the duplication of Session data need not be carried out between application server, compared with prior art, memory accounts for
With smaller, the performance of garbage reclamation is improved;Application server instance number and the linear growth of service ability, it is more conducively distributed
The horizontal extension of system;Session data only interact between application server and session object Session storage server,
More conducively control of network flow quantity avoids traffic bottlenecks.
In a kind of optional embodiment of the embodiment of the present invention, fragment value acquiring unit 42 is further used for:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
Target session object storage server determination unit 43 is further used for:
Receive the fragment value Storage Server List that registration center's server is sent, the fragment value Storage Server List
Corresponding relationship including fragment value Yu session object Session storage server;
According to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in storage server cluster.
Fig. 5 is the structure of the sharing means of session object Session in the distributed type assemblies of another embodiment of the present invention
Schematic diagram.As shown in figure 5, the device of the embodiment of the present invention includes session object search request receiving unit 51, target session pair
As storage agent server selecting unit 52, session object search request retransmission unit 53 and session object data receipt unit
54, specifically:
Session object search request receiving unit 51, the session object Session lookup for receiving client transmission are asked
It asks, the session object Session search request includes session object Session identification number;
Target session object storage agent server selecting unit 52, for being taken from session object Session storage agent
Selection target session object Session storage agent server in business device cluster;
Session object search request retransmission unit 53, for the session object Session search request to be forwarded to institute
State target session object Session storage agent server;
Session object data receipt unit 54, for receiving the target session object Session storage agent server
The session object Session data corresponding with session object Session identification number returned.
The sharing means of session object Session in distributed type assemblies provided in an embodiment of the present invention, application server is not
Session data are stored, the duplication of Session data need not be carried out between application server, compared with prior art, memory accounts for
With smaller, the performance of garbage reclamation is improved;Application server instance number and the linear growth of service ability, it is more conducively distributed
The horizontal extension of system;Session data only interact between application server and session object Session storage server,
More conducively control of network flow quantity avoids traffic bottlenecks.
In a kind of optional embodiment of the embodiment of the present invention, the device further include:
Session object storage agent server cluster list reception unit, for receiving the mesh of registration center's server transmission
Mark session object Session storage agent server set group-list.
The device of the embodiment of the present invention can be used for executing above method embodiment, and principle is similar with technical effect, this
Place repeats no more.
Fig. 6 is the entity structure schematic diagram of the electronic equipment of one embodiment of the invention.
Referring to Fig. 6, electronic equipment includes: first processor (processor) 61, first memory (memory) 62 and the
One bus 63;Wherein,
First processor 61 and first memory 62 pass through the first bus 63 and complete mutual communication;
First processor 61 is used to call the program instruction in first memory 62, to execute above-mentioned side relevant to Fig. 1
The sharing method of session object Session in distributed type assemblies provided by method embodiment.
In addition, the logical order in above-mentioned first memory 62 can be realized and be made by way of SFU software functional unit
It is independent product when selling or using, can store in a computer readable storage medium.Based on this understanding,
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for technical solution of the present invention
It is expressed in the form of software products, which is stored in a storage medium, including some instructions are used
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each reality of the present invention
Apply all or part of the steps of the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk
Etc. the various media that can store program code.
Fig. 7 is the entity structure schematic diagram of the electronic equipment of another embodiment of the present invention.
Referring to Fig. 7, electronic equipment includes: second processor (processor) 71, second memory (memory) 72 and the
Two lines bus 73;Wherein,
Second processor 71 and second memory 72 pass through the second bus 73 and complete mutual communication;
Second processor 71 is used to call the program instruction in second memory 72, to execute the relevant method of above-mentioned Fig. 3
The sharing method of session object Session in distributed type assemblies provided by embodiment.
In addition, the logical order in above-mentioned second memory 72 can be realized and be made by way of SFU software functional unit
It is independent product when selling or using, can store in a computer readable storage medium.Based on this understanding,
Substantially the part of the part that contributes to existing technology or the technical solution can be in other words for technical solution of the present invention
It is expressed in the form of software products, which is stored in a storage medium, including some instructions are used
So that a computer equipment (can be personal computer, server or the network equipment etc.) executes each reality of the present invention
Apply all or part of the steps of the method.And storage medium above-mentioned includes: USB flash disk, mobile hard disk, read-only memory
(ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic or disk
Etc. the various media that can store program code.
The present embodiment provides a kind of computer program product, the computer program product includes being stored in non-transient calculating
Computer program on machine readable storage medium storing program for executing, the computer program include program instruction, when described program instruction is calculated
When machine executes, computer is able to carry out method provided by above-mentioned each method embodiment.
The present embodiment provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage medium
Computer instruction is stored, the computer instruction makes the computer execute method provided by above-mentioned each method embodiment.
The sharing method and device of session object Session in distributed type assemblies provided in an embodiment of the present invention, using clothes
Business device does not store Session data, and the duplication of Session data need not be carried out between application server, compared with prior art,
EMS memory occupation is smaller, improves the performance of garbage reclamation;Application server instance number and the linear growth of service ability, more conducively
The horizontal extension of distributed system;Session data are only between application server and session object Session storage server
Interaction, more conducively control of network flow quantity, avoid traffic bottlenecks.
It should be understood by those skilled in the art that, the embodiment of the present invention can provide as method, system or computer program
Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention
Apply the form of example.Moreover, it wherein includes the computer of computer usable program code that the present invention, which can be used in one or more,
The computer program implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) produces
The form of product.
The present invention be referring to according to the method for the embodiment of the present invention, the process of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that every one stream in flowchart and/or the block diagram can be realized by computer program instructions
The combination of process and/or box in journey and/or box and flowchart and/or the block diagram.It can provide these computer programs
Instruct the processor of general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine, so that being generated by the instruction that computer or the processor of other programmable data processing devices execute for real
The device for the function of being specified in present one or more flows of the flowchart and/or one or more blocks of the block diagram.
It should be noted that the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability
Contain, so that the process, method, article or equipment for including a series of elements not only includes those elements, but also including
Other elements that are not explicitly listed, or further include for elements inherent to such a process, method, article, or device.
In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including the element
Process, method, article or equipment in there is also other identical elements.
In specification of the invention, numerous specific details are set forth.Although it is understood that the embodiment of the present invention can
To practice without these specific details.In some instances, well known method, structure and skill is not been shown in detail
Art, so as not to obscure the understanding of this specification.Similarly, it should be understood that disclose in order to simplify the present invention and helps to understand respectively
One or more of a inventive aspect, in the above description of the exemplary embodiment of the present invention, each spy of the invention
Sign is grouped together into a single embodiment, figure, or description thereof sometimes.However, should not be by the method solution of the disclosure
Release is in reflect an intention that i.e. the claimed invention requires more than feature expressly recited in each claim
More features.More precisely, as the following claims reflect, inventive aspect is less than single reality disclosed above
Apply all features of example.Therefore, it then follows thus claims of specific embodiment are expressly incorporated in the specific embodiment,
It is wherein each that the claims themselves are regarded as separate embodiments of the invention.
The above examples are only used to illustrate the technical scheme of the present invention, rather than its limitations;Although with reference to the foregoing embodiments
Invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each implementation
Technical solution documented by example is modified or equivalent replacement of some of the technical features;And these are modified or replace
It changes, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution.
Claims (10)
1. the sharing method of session object Session in a kind of distributed type assemblies characterized by comprising
Receive the session object Session search request that application server is sent, the session object Session search request packet
Include session object Session identification number;
Fragment value is obtained according to the session object Session identification number;
Target session object Session storage clothes are determined from session object Session storage server cluster according to fragment value
Business device;
The session object Session search request is forwarded to the target session object Session storage server;
Receive the corresponding with session object Session identification number of the target session object Session storage server transmission
Session object Session data;
The session object Session data corresponding with session object Session identification number are sent to the application service
Device.
2. the method according to claim 1, wherein described obtain according to the session object Session identification number
Take fragment value, comprising:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
3. the method according to claim 1, wherein described store according to fragment value from session object Session
Target session object Session storage server is determined in server cluster, comprising:
The fragment value Storage Server List that registration center's server is sent is received, the fragment value Storage Server List includes
The corresponding relationship of fragment value and session object Session storage server;
It is stored according to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in server cluster.
4. the sharing method of session object Session in a kind of distributed type assemblies characterized by comprising
The session object Session search request that client is sent is received, the session object Session search request includes meeting
Talk about object Session identification number;
The selection target session object Session storage agent service from session object Session storage agent server cluster
Device;
The session object Session search request is forwarded to the target session object Session storage agent server;
Receive that the target session object Session storage agent server returns with session object Session identification number pair
The session object Session data answered.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
Receive the target session object Session storage agent server set group-list that registration center's server is sent.
6. the sharing means of session object Session in a kind of distributed type assemblies characterized by comprising
Session object search request receiving unit, for receiving the session object Session search request of application server transmission,
The session object Session search request includes session object Session identification number;
Fragment value acquiring unit, for obtaining fragment value according to the session object Session identification number;
Target session object storage server determination unit, for according to fragment value from session object Session storage server
Target session object Session storage server is determined in cluster;
Session object search request retransmission unit, for the session object Session search request to be forwarded to the target
Session object Session storage server;
Session object data receipt unit, the participant sent for receiving the target session object Session storage server
Talk about the corresponding session object Session data of object Session identification number;
Session object data transmission unit, for the session object corresponding with session object Session identification number by described in
Session data are sent to the application server.
7. device according to claim 6, which is characterized in that the fragment value acquiring unit is further used for:
Fragment value is obtained according to the session object Session identification number using hash algorithm.
8. device according to claim 6, which is characterized in that the target session object storage server determination unit into
One step is used for:
The fragment value Storage Server List that registration center's server is sent is received, the fragment value Storage Server List includes
The corresponding relationship of fragment value and session object Session storage server;
It is stored according to the corresponding relationship of the fragment value and session object Session storage server from session object Session
Target session object Session storage server is determined in server cluster.
9. the sharing means of session object Session in a kind of distributed type assemblies characterized by comprising
Session object search request receiving unit, it is described for receiving the session object Session search request of client transmission
Session object Session search request includes session object Session identification number;
Target session object storage agent server selecting unit is used for from session object Session storage agent server set
Selection target session object Session storage agent server in group;
Session object search request retransmission unit, for the session object Session search request to be forwarded to the target
Session object Session storage agent server;
Session object data receipt unit, for receiving the target session object Session storage agent server return
Session object Session data corresponding with session object Session identification number.
10. device according to claim 9, which is characterized in that further include:
Session object storage agent server cluster list reception unit, for receiving the target meeting of registration center's server transmission
Talk about object Session storage agent server set group-list.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710463414.1A CN109150936A (en) | 2017-06-19 | 2017-06-19 | The sharing method and device of session object Session in a kind of distributed type assemblies |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710463414.1A CN109150936A (en) | 2017-06-19 | 2017-06-19 | The sharing method and device of session object Session in a kind of distributed type assemblies |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109150936A true CN109150936A (en) | 2019-01-04 |
Family
ID=64804156
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710463414.1A Pending CN109150936A (en) | 2017-06-19 | 2017-06-19 | The sharing method and device of session object Session in a kind of distributed type assemblies |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109150936A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134372A (en) * | 2019-07-10 | 2019-08-16 | 启迪云计算有限公司 | A kind of rule-based zookeeper session external management system |
CN110633256A (en) * | 2019-10-10 | 2019-12-31 | 广东电网有限责任公司肇庆供电局 | Session Session sharing method in distributed cluster system |
CN111698299A (en) * | 2020-05-28 | 2020-09-22 | 平安银行股份有限公司 | Session object copying method, device, distributed micro-service architecture and medium |
CN113050890A (en) * | 2021-03-26 | 2021-06-29 | 北京沃东天骏信息技术有限公司 | Data migration method and device |
WO2021135114A1 (en) * | 2020-06-05 | 2021-07-08 | 平安科技(深圳)有限公司 | Cluster environment-based telephone session management method, apparatus, and computer device |
CN113645261A (en) * | 2020-04-27 | 2021-11-12 | ***通信集团江西有限公司 | Session data processing method, device, storage medium and computer equipment |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
CN103095859A (en) * | 2011-11-04 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Multi-domain-name dialogue information sharing method and system |
CN103200212A (en) * | 2012-01-04 | 2013-07-10 | ***通信集团公司 | Method and system achieving distributed conversation under cloud computing environment |
CN103389986A (en) * | 2012-05-09 | 2013-11-13 | 阿里巴巴集团控股有限公司 | Method, device and system for storing and searching Session information |
CN103473272A (en) * | 2013-08-20 | 2013-12-25 | 小米科技有限责任公司 | Data processing method, device and system |
US9083770B1 (en) * | 2013-11-26 | 2015-07-14 | Snapchat, Inc. | Method and system for integrating real time communication features in applications |
CN105701002A (en) * | 2014-11-26 | 2016-06-22 | 阿里巴巴集团控股有限公司 | Test based execution path recording method and apparatus |
CN105812351A (en) * | 2016-02-23 | 2016-07-27 | 平安科技(深圳)有限公司 | Method and system for sharing session |
CN105933408A (en) * | 2016-04-20 | 2016-09-07 | ***股份有限公司 | Implementation method and device of Redis universal middleware |
CN106357778A (en) * | 2016-09-27 | 2017-01-25 | 山东浪潮商用***有限公司 | Session information sharing method, device and system |
CN106603713A (en) * | 2016-12-29 | 2017-04-26 | 深圳Tcl新技术有限公司 | Session management method and system |
CN106713391A (en) * | 2015-11-13 | 2017-05-24 | 北京新媒传信科技有限公司 | Session information sharing method and sharing system |
-
2017
- 2017-06-19 CN CN201710463414.1A patent/CN109150936A/en active Pending
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN201682522U (en) * | 2010-02-08 | 2010-12-22 | 阿里巴巴集团控股有限公司 | Conversation information storage system and application server |
CN103095859A (en) * | 2011-11-04 | 2013-05-08 | 阿里巴巴集团控股有限公司 | Multi-domain-name dialogue information sharing method and system |
CN103200212A (en) * | 2012-01-04 | 2013-07-10 | ***通信集团公司 | Method and system achieving distributed conversation under cloud computing environment |
CN103389986A (en) * | 2012-05-09 | 2013-11-13 | 阿里巴巴集团控股有限公司 | Method, device and system for storing and searching Session information |
CN103473272A (en) * | 2013-08-20 | 2013-12-25 | 小米科技有限责任公司 | Data processing method, device and system |
US9083770B1 (en) * | 2013-11-26 | 2015-07-14 | Snapchat, Inc. | Method and system for integrating real time communication features in applications |
CN105701002A (en) * | 2014-11-26 | 2016-06-22 | 阿里巴巴集团控股有限公司 | Test based execution path recording method and apparatus |
CN106713391A (en) * | 2015-11-13 | 2017-05-24 | 北京新媒传信科技有限公司 | Session information sharing method and sharing system |
CN105812351A (en) * | 2016-02-23 | 2016-07-27 | 平安科技(深圳)有限公司 | Method and system for sharing session |
CN105933408A (en) * | 2016-04-20 | 2016-09-07 | ***股份有限公司 | Implementation method and device of Redis universal middleware |
CN106357778A (en) * | 2016-09-27 | 2017-01-25 | 山东浪潮商用***有限公司 | Session information sharing method, device and system |
CN106603713A (en) * | 2016-12-29 | 2017-04-26 | 深圳Tcl新技术有限公司 | Session management method and system |
Non-Patent Citations (1)
Title |
---|
SJFBJS: "redis分片", 《HTTPS://BLOG.51CTO.COM/11886896/1881832》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110134372A (en) * | 2019-07-10 | 2019-08-16 | 启迪云计算有限公司 | A kind of rule-based zookeeper session external management system |
CN110633256A (en) * | 2019-10-10 | 2019-12-31 | 广东电网有限责任公司肇庆供电局 | Session Session sharing method in distributed cluster system |
CN113645261A (en) * | 2020-04-27 | 2021-11-12 | ***通信集团江西有限公司 | Session data processing method, device, storage medium and computer equipment |
CN111698299A (en) * | 2020-05-28 | 2020-09-22 | 平安银行股份有限公司 | Session object copying method, device, distributed micro-service architecture and medium |
CN111698299B (en) * | 2020-05-28 | 2023-08-01 | 平安银行股份有限公司 | Session object replication method, device, distributed micro-service architecture and medium |
WO2021135114A1 (en) * | 2020-06-05 | 2021-07-08 | 平安科技(深圳)有限公司 | Cluster environment-based telephone session management method, apparatus, and computer device |
CN113050890A (en) * | 2021-03-26 | 2021-06-29 | 北京沃东天骏信息技术有限公司 | Data migration method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109150936A (en) | The sharing method and device of session object Session in a kind of distributed type assemblies | |
EP2852125B1 (en) | Server selection for content distribution | |
CN106031130B (en) | Content distribution network framework with edge proxies | |
CN110703980B (en) | File transmission method and device | |
CN101815033B (en) | Method, device and system for load balancing | |
CN106911780A (en) | Traffic ID generation method, apparatus and system | |
CN102137014A (en) | Resource management method, system and resource manager | |
WO2018232797A1 (en) | Data transmission method and system based on peer-to-peer network | |
CN111163130B (en) | Network service system and data transmission method thereof | |
CN110442610A (en) | The method, apparatus of load balancing calculates equipment and medium | |
CN108881354A (en) | A kind of pushed information storage method, device, server and computer storage medium | |
CN102257777A (en) | Route decision method, content distribution device, content distribution network interconnection system | |
US20160381127A1 (en) | Systems and methods for dynamic networked peer-to-peer content distribution | |
CN109413202B (en) | System and method for sorting block chain transaction information | |
CN109873855A (en) | A kind of resource acquiring method and system based on block chain network | |
CN108933847A (en) | A kind of method and device that address is quickly distributed | |
CN106027356B (en) | A kind of conversion method and device of Tunnel Identifier | |
CN110012050A (en) | Message Processing, storage method, apparatus and system | |
CN105978744B (en) | A kind of resource allocation methods, apparatus and system | |
CN102857547A (en) | Distributed caching method and device | |
CN103973747A (en) | Method and device for acquiring content | |
CN107295032B (en) | Data synchronization method and equipment for data center | |
CN105871972A (en) | Video resource distributed cathe method, device and system | |
CN104702646A (en) | Data transmission method and device and communication system | |
CN109981696B (en) | Load balancing method, device and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190104 |
|
RJ01 | Rejection of invention patent application after publication |