CN104052723B - information processing method, server and system - Google Patents
information processing method, server and system Download PDFInfo
- Publication number
- CN104052723B CN104052723B CN201310084536.1A CN201310084536A CN104052723B CN 104052723 B CN104052723 B CN 104052723B CN 201310084536 A CN201310084536 A CN 201310084536A CN 104052723 B CN104052723 B CN 104052723B
- Authority
- CN
- China
- Prior art keywords
- server
- receiving terminal
- terminal server
- task
- client
- 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.)
- Active
Links
Landscapes
- Computer And Data Communications (AREA)
Abstract
The invention discloses an information processing method and a server. The method is applied to a sending end server in an information processing system. The information processing system at least comprises the sending end server and a receiving end server. The sending end server is connected with a sending end client, and the receiving end server is connected with a receiving end client. The method comprises: receiving information from the sending end client; generating an information sending task; establishing task scheduling connection between the sending end server and the receiving end server; and sending the information sending task to the receiving end server through the task scheduling connection to enable the receiving end server to execute the information sending task so as to send the information to the receiving end client. Therefore, the information processing system can realize a cluster scheme of servers through a task scheduling mode to support a larger number of clients.
Description
Technical field
The present invention relates to field of computer technology, more particularly it relates to a kind of information processing method and server.
Background technology
Instant messaging(IM)It is a kind of terminal service, it allows two or more users to carry out immediately mutually biography using network
Pass text message and multimedia messages(Such as, Voice & Video information)Deng to realize linking up purpose.
With continuing to develop for IM technologies, scalable message transmits and presents agreement(XMPP)Agreement is arisen at the historic moment.XMPP
It is based on extensible markup language(XML)Agreement, it be intended to promote server between quasi- real time operation.
Typically, Openfire is a kind of IM servers realized based on XMPP, write using Java language.By
It is powerful, mature and stable in its and increase income, so it is in the industry cycle used widely.However, due to transmission control protocol
(TCP)Connection long and the limitation of Java language, cause the client connection number that the Openfire servers of current separate unit are supported
Between only 6000 to 10000 users, and this is clearly far from being enough for large-scale IM service provider.
For this technical problem, the first solution of the prior art is, by using Openfire connection managements
Module(Connection Manager Module), the client increased using master slave mode in IM systems connection quantity.
Specifically, in IM systems, using an Openfire server as management server, and other are mounted with connection management
The server of module as connection server, because each connection management module can connect more than 5000 user, so in IM
The support of more users quantity is realized in system.However, total connection quantity that this solution is supported is still present the upper limit,
About 300,000 or so.That is, this solution is limited in one's ability by the dilatation that whole IM systems are brought, when wishing IM systems
When providing IM services to more than 300,000 user, it is mounted with that the server of connection management module will be unable to realize only by increase
This target.
Additionally, the second solution of the prior art is, by increase more Openfire servers and with
The mode of Openfire clusters supports in an IM system user of magnanimity.For example, the inscriptions on bones or tortoise shells(Oracle)Company proposes
Relevant cluster key middleware(Oracle Coherence Clustering Plugin)It is exactly such cluster solution party
Case.However, because Coherence is business software, inside realize it is invisible, so in the event of program error(bug), IM clothes
Business provider oneself cannot repair, and have to wait for corresponding manufacturer and issue service packs to be upgraded and solved, and this is undoubtedly effect
Rate is low.And, Coherence points is standard edition, enterprise version, grid version.Wherein standard edition is free, but can only unit make
With, it is impossible to realize above-mentioned clustering functionality;And enterprise version and grid version realize clustering functionality, but it is charging software, price is pressed
According to CPU(CPU)Quantity charge, and unit price it is high, so the large numbers of feelings of clustered node in IM systems
Under condition, this will be a huge cost.
Accordingly, it would be desirable to a kind of new information processing method and server solve the above problems.
The content of the invention
In order to solve the above-mentioned technical problem, according to an aspect of the invention, there is provided a kind of information processing method, described
Method is applied to the transmitting terminal server in information processing system, and described information processing system at least includes the transmitting terminal service
Device and receiving terminal server, the transmitting terminal server are connected to transmitting terminal client, and the receiving terminal server is connected to and connects
Receiving end client, methods described includes:When the transmitting terminal client sends information to the receiving terminal client, from described
Transmitting terminal client receives described information;Generation information sends task, and described information sends task to be used for receiving terminal visitor
Family end sends described information;Task call address based on the receiving terminal server come the transmitting terminal server with it is described
Task call connection is set up between receiving terminal server;And connected come to the receiving terminal server by the task call
Send described information and send task, task is sent to cause that the receiving terminal server performs described information, so as to be connect to described
Receiving end client sends described information.
Additionally, according to another aspect of the present invention, there is provided a kind of information processing method, methods described is applied at information
Receiving terminal server in reason system, described information processing system at least includes transmitting terminal server and the receiving terminal service
Device, the transmitting terminal server is connected to transmitting terminal client, and the receiving terminal server is connected to receiving terminal client, described
Method includes:Task call address based on the transmitting terminal server takes in the transmitting terminal server and the receiving terminal
Task call connection is set up between business device;Connect to be sent from the transmitting terminal server receive information by the task call
Task, described information sends task to be used to send described information to the receiving terminal client;And perform described information transmission
Task, so as to send described information to the receiving terminal client.
According to another aspect of the invention, there is provided a kind of transmitting terminal server, the transmitting terminal server belongs to information
Processing system, described information processing system at least includes the transmitting terminal server and receiving terminal server, the transmitting terminal clothes
Business device is connected to transmitting terminal client, and the receiving terminal server is connected to receiving terminal client, the transmitting terminal server bag
Include:Information receiving unit, for when the transmitting terminal client sends information to the receiving terminal client, from the transmission
End client receives described information;Task generation unit, for generate information send task, described information send task be used for
The receiving terminal client sends described information;Connection establishment unit, for the task call based on the receiving terminal server
Address come set up between the transmitting terminal server and the receiving terminal server task call connection;And task sends single
Unit, is sent described information and sends task, to cause institute for being connected by the task call to the receiving terminal server
State receiving terminal server and perform described information transmission task, so as to send described information to the receiving terminal client.
According to another aspect of the invention, there is provided a kind of receiving terminal server, the receiving terminal server belongs to information
Processing system, described information processing system at least includes transmitting terminal server and the receiving terminal server, the transmitting terminal clothes
Business device is connected to transmitting terminal client, and the receiving terminal server is connected to receiving terminal client, the receiving terminal server bag
Include:Connection establishment unit, for the task call address based on the transmitting terminal server come the transmitting terminal server with
Task call connection is set up between the receiving terminal server;Task receiving unit, for by the task call connect come
Task is sent from the transmitting terminal server receive information, described information sends task to be used to be sent to the receiving terminal client
Described information;And task executing units, task is sent for performing described information, so as to be sent to the receiving terminal client
Described information.
According to another aspect of the invention, there is provided a kind of information processing system, described information processing system includes:It is above-mentioned
Transmitting terminal server;Above-mentioned receiving terminal server;State server, the state server is used to store the transmitting terminal
The identifier of server and the receiving terminal server, task call address and the client for being connected.
Compared with prior art, using information processing method of the invention, transmitting terminal server and receiving terminal service
Device, when transmitting terminal client sends information to receiving terminal client, transmitting terminal server receives described from transmitting terminal client
Information simultaneously generates information transmission task, and the task call address based on receiving terminal server is come in the transmitting terminal server and institute
State and set up between receiving terminal server task call connection, connect to be sent out to the receiving terminal server by the task call
Send described information to send task, and described information is performed by receiving terminal server and send task, so as to receiving terminal visitor
Family end sends described information.Therefore, in the present invention, information processing system can realize service by way of task call
The group scheme of device, it is without maximum and with low cost and maintenance efficiency is high to support the client of greater number.
Other features and advantages of the present invention will be illustrated in the following description, also, the partly change from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing a further understanding of the present invention, and constitutes a part for specification, with reality of the invention
Applying example is used to explain the present invention together, is not construed as limiting the invention.In the accompanying drawings:
Fig. 1 illustrates the technical problem for existing in the prior art.
Fig. 2 illustrates the solution according to prior art.
Fig. 3 illustrates information processing method of the invention.
Fig. 4 illustrates transmitting terminal server of the invention.
Fig. 5 illustrates information processing method of the invention.
Fig. 6 illustrates receiving terminal server of the invention.
Fig. 7 illustrates information processing method according to embodiments of the present invention.
Fig. 8 illustrates the framework of information processing system according to embodiments of the present invention.
Fig. 9 illustrates the functional block diagram of information processing system according to embodiments of the present invention.
Specific embodiment
Will be described in detail with reference to the accompanying drawings each embodiment of the invention.Here it is to be noted that it in the accompanying drawings,
The substantially part with same or like 26S Proteasome Structure and Function is assigned by identical reference, and will be omitted on it
Repeated description.
First, problem of the prior art and its solution will be described with reference to Fig. 1 and 2.
Fig. 1 illustrates the technical problem for existing in the prior art, and Fig. 2 illustrates the solution party according to prior art
Case.
As illustrated in figure 1, the IM systems based on XMPP generally include an Openfire clothes in the prior art
Business device and multiple XMPP clients.In the IM systems, some can be by Openfire using the user of XMPP clients
Server and carry out instant messaging using the user of XMPP clients with another.However, due to based on XMPP and Java language
The Openfire servers of realization are limited to TCP connections long and Java language, so the Openfire servers of separate unit are supported
Client connection number be restricted(About 6000 to 10000).
In order that obtaining IM systems can support that the client of greater number, the first solution of prior art propose to exist
Connection server is added between Openfire servers and XMPP clients, the connection server is to be provided with connection management module
Server.
As illustrated in Figure 2, in the first solution, the IM systems based on XMPP include an Openfire clothes
Business device, multiple connection servers and multiple XMPP clients.Wherein, separate unit Openfire servers can be with multiple Connection Services
Device communicates, and is responsible for the IM communications that treatment belongs between the client of identical or different connection server.Due to every connection
The client connection number that connection management module in server can be supported is about 5000, so when the use in the IM systems
Family connection number is when using up, and can be supported by adding a connection server and connecting it to the Openfire servers
More XMPP clients.
Although first solution expands the client capacity of IM systems to a certain extent, what it was supported
Total connection quantity is still present maximum(About 300,000), that is to say, that when the client sum in IM systems exceedes
When 300000, even if continuing to increase connection server to connect more clients, separate unit Openfire servers also cannot be right again
The IM communication logics of these newly-increased clients are managed.
In addition, as described in the background art, although the second solution of the prior art proposes to pass through
The mode of Openfire server clusters come in an IM system support magnanimity user, but it also exist it is with high costs,
The low problem of maintenance efficiency.
In this regard, present inventors have proposed a kind of new information processing method and server.
Hereinafter, information processing method of the invention and server will be described referring to figs. 3 to Fig. 6.
Fig. 3 illustrates information processing method of the invention, and Fig. 4 illustrates transmitting terminal service of the invention
Device.
Information processing method illustrated in Fig. 3 is applied to the transmitting terminal server in information processing system, at described information
Reason system at least includes the transmitting terminal server and receiving terminal server, and the transmitting terminal server is connected to transmitting terminal client
End, the receiving terminal server is connected to receiving terminal client.Specifically, as illustrated in figure 4, the transmitting terminal server
100 include:Information receiving unit 110, task generation unit 120, connection establishment unit 130 and task transmitting element 140.
As illustrated in fig. 3, described information processing method includes:
In step s 110, when the transmitting terminal client sends information to the receiving terminal client, information is received
Unit 110 receives described information from the transmitting terminal client;
In the step s 120, the generation of task generation unit 120 information sends task, and described information sends task to be used for institute
State receiving terminal client and send described information;
In step s 130, connection establishment unit 130 based on the task call address of the receiving terminal server come in institute
State and task call connection is set up between transmitting terminal server and the receiving terminal server;And
In step S140, task transmitting element 140 is connected come to the receiving terminal server by the task call
Send described information and send task, task is sent to cause that the receiving terminal server performs described information, so as to be connect to described
Receiving end client sends described information.
Fig. 5 illustrates information processing method of the invention, and Fig. 6 illustrates receiving terminal service of the invention
Device.
Information processing method illustrated in Fig. 5 is applied to the receiving terminal server in information processing system, at described information
Reason system at least includes transmitting terminal server and the receiving terminal server, and the transmitting terminal server is connected to transmitting terminal client
End, the receiving terminal server is connected to receiving terminal client.Specifically, as illustrated in FIG. 6, the receiving terminal server
200 include:Connection establishment unit 210, task receiving unit 220 and task executing units 230.
As illustrated in fig. 5, described information processing method includes:
In step S210, task call address of the connection establishment unit 210 based on the transmitting terminal server is come in institute
State and task call connection is set up between transmitting terminal server and the receiving terminal server;
In step S220, task receiving unit 220 is connected come from the transmitting terminal server by the task call
Receive information sends task, and described information sends task to be used to send described information to the receiving terminal client;And
In step S230, task executing units 230 perform described information and send task, so as to the receiving terminal client
End sends described information.
As can be seen here, using information processing method of the invention, transmitting terminal server and receiving terminal server, in hair
When sending end client sends information to receiving terminal client, transmitting terminal server receives described information and life from transmitting terminal client
Task is sent into information, the task call address based on receiving terminal server is come in the transmitting terminal server and the receiving terminal
Task call connection is set up between server, connects to send the letter to the receiving terminal server by the task call
Breath transmission task, and described information transmission task is performed by receiving terminal server, so as to be sent to the receiving terminal client
Described information.Therefore, in the present invention, information processing system can realize the cluster of server by way of task call
Scheme, it is without maximum and with low cost and maintenance efficiency is high to support the client of greater number.
Hereinafter, information processing method and information processing according to embodiments of the present invention is described into reference Fig. 7 and Fig. 8
System.
Fig. 7 illustrates information processing method according to embodiments of the present invention, and Fig. 8 illustrates letter according to embodiments of the present invention
The framework of processing system 1000 is ceased, and Fig. 9 illustrates the functional block diagram of information processing system 1000 according to embodiments of the present invention.
Information processing method according to embodiments of the present invention illustrated in Fig. 7 can be by the information processing illustrated in Fig. 8
System 1000 is realized.As illustrated in Figure 8, information processing system 1000 can at least include multiple service nodes 100,200
With at least one state server 300.For example, the information processing system 1000 can be based on XMPP and have cluster work(
The information processing system of energy, and service node 100,200 can be Openfire servers.
Between multiple service nodes 100,200, instant messaging number can be transmitted according to the Realization Method of Communication of agreement
According to.Serviced with providing IM to the client for belonging to these service nodes.
For example, in an embodiment of the present invention, the Realization Method of Communication of the agreement can use Java RMIs
(RMI).The RMI is the java application interface for supporting development DDB application program(API).Java is used as a kind of wind
Network development language for the moment is wasted, its huge power is just embodied in the ability of its powerful exploitation distributed network application,
And RMI is exactly exploitation absolutely one of Core Solution of network distribution type application system of pure Java.In fact, it can
To be counted as remote procedure call(RPC)Java versions.But tradition RPC can not be advantageously applied to distributed objects
System;And Java RMI then support to be communicated with each other between the program level object for being stored in different address space, to realize
Seamless far call between remote object.
Specifically, RMI has gathered Java serializings and Java Remote Method Protocols, and generally include two it is independent
Program:Server program and client-side program.Typical server application will create multiple remote objects, make these long-range
Object can be cited, the method for then waiting these remote objects of client call.And typical client-side program is then from clothes
The reference of one or more remote objects, the method for then calling remote object are obtained in business device.Therefore, RMI be server and
Client carries out communication and information transmission provides a kind of mechanism, and fully simplifies the complexity of program development.
In addition, each service node 100,200 can add the information processing system 1000 as clustered node, with
Other service nodes and state server 300 set up communication connection.Once the service node of new addition is detected the presence of, state clothes
Business device 300 will distribute a unique identifier to it(For example, service node numbering etc.), with the information processing system
This service node is uniquely identified in 1000.Then, state server 300 creates one in the database for oneself being preserved
New data entries, and the identifier and other relevant informations of the service node are recorded in the data entries.
For example, in order to it is cost-effective and improve search efficiency, in an embodiment of the present invention, it is possible to use the key assignments increased income
(K-V)Database(Such as Redis databases or Memcached databases)To build the state server 300.
Hereafter, each service node in the process of running, such as by heartbeat function, periodically, randomly or in real time
Ground submits the operation information of oneself to state server 300, to enable that state server 300 learns the work of the service node
Dynamic state.If being not received by the operation information of some service node in a period of time(Or heartbeat message), then state
Server 300 thinks that the service node goes wrong(For example, machine of delaying), the whole group system having been moved off.
Therefore, in addition to the identifier of each service node, the state server 300 can also preserve the service section
The active state of point and RMI task calls address(RMI URL), the service node be that it provides IM clients etc. of service,
As the other information related to service node.
Below, for convenience, only information processing according to embodiments of the present invention is illustrated during unidirectional IM communicates
Method and information processing system.
Assuming that in the unidirectional IM communication process, service node 100 is transmitting terminal server, service node 200 is to receive
End server, and transmitting terminal server 100, receiving terminal server 200 and state server 300 pass through network(For example, having
Gauze network and/or wireless network)And link together.
In addition, the transmitting terminal server 100 is connected to transmitting terminal client 10, and the receiving terminal server 200 is connected to
Receiving terminal client 20.By the interactive communication between transmitting terminal server 100 and receiving terminal server 200, transmitting terminal is used
The first user of client 10 can be according to the Realization Method of Communication of agreement come the second user with use receiving terminal client 20
Instant messaging is carried out, to transmit text message and/or multimedia messages etc..
Specifically, as illustrated in fig. 9, the same with Fig. 4, the transmitting terminal server 100 includes:Information receiving unit
110th, task generation unit 120, connection establishment unit 130 and task transmitting element 140.Moreover it is preferred that in order to realize one
Plant or additional functions, the transmitting terminal server 100 also includes:Identifier query unit 150, condition adjudgement unit 160,
Location determining unit 170, and/or heartbeat delivery unit 180.
The same with Fig. 6, the receiving terminal server 200 includes:Connection establishment unit 210, task receiving unit 220,
With task executing units 230.Moreover it is preferred that in order to realize additional function, the receiving terminal server 200 also includes:Heartbeat
Delivery unit 240.
In addition, the state server 300 can include:Information memory cell 310, for storage and information processing system
The various information that server in 1000 is associated.
As illustrated in figure 7, information processing method according to embodiments of the present invention includes:
In step S310, from transmitting terminal client receive information.
When first user wishes to carry out instant messaging to second user, to transmit text message and/or multimedia messages etc.
When, first user can be input into IM information by the transmitting terminal client 10 being presently using, and the IM information is sent
To for oneself provide IM service information processing system 1000, be currently in use reception so that the IM information is ultimately delivered to
Hold the second user of client 20.
As illustrated in fig. 9, in information processing system 1000, provided to the transmitting terminal client 10 of first user
The service node of IM services is transmitting terminal server 100.
Correspondingly, in the transmitting terminal server 100, information receiving unit 110 receives the IM from transmitting terminal client 10
Information.
In order that information processing system 1000 can be supported in the way of Openfire server clusters can be any
The client terminal quantity of dilatation, in an embodiment of the present invention, transmitting terminal server 100 is not simply to directly transmit IM information
To receiving terminal server 200, but a remote object for being used to send the information will be created(RMI tasks), and make this long-range
Object can receiving end server 200 quote, so as to the method that the receiving terminal server 200 calls remote object.
So, the IM information is sent to task generation unit 120 by the information receiving unit 110, to carry out subsequent treatment.
In step s 320, generation information sends task.
After the IM information is received from information receiving unit 110, the generation information of task generation unit 120 sends appoints
Business, described information sends task to be used to cause that perform entity sends described information to the receiving terminal client 20.
For example, the title that the information sends task can be " task (IM information) ", its specific form is
“send IM information to client20”。
In step S330, the task call address of receiving terminal server is determined.
Next, address determination unit 170 determines the task call address of receiving terminal server 200.
In one example, transmitting terminal server 100 can be stored in whole information processing system in the database of oneself
The task call address of all service nodes in system 1000, to ensure most fast inquiry velocity.
In another example, the task call address of service node can store in a distributed manner mode and be dispersed in letter
In each service node in breath processing system 1000.So, it is possible to reduce each service node is used to store relevant information institute
The memory space of occupancy, and remain able to ensure inquiry velocity faster.
In another example, in order to uniformly safeguard the various information on service node and discharge each service node
Memory space, can be stored the task call address of all service nodes, so as to address determination unit by state server 300
170 are adjusted by the communication between transmitting terminal server 100 and state server 300 come the task of inquire-receive end server 200
Use address.
Identifier, the task call of each service node therefore, the state server 300 can be stored with database
Address(RMI URL)And the set of client that the service node is serviced.
In transmitting terminal server 100, identifier query unit 150 can inquire about the reception to state server 300
The identifier of the receiving terminal server 200 that end client 20 is connected to.
For example, the identifier query unit 150 can first determine the identification information of receiving terminal client 20.This mark
Information can be ID, the Yong Hubian of the identifier, and/or second user for being currently in use receiving terminal client 20 itself
Number, user account title etc..So, identifier query unit 150 can utilize the identification information of receiving terminal client 20 to shape
State server 300 is inquired about, to determine that the service node that the receiving terminal client 20 is connected to is receiving terminal server
200, determine the identifier of the receiving terminal server 200, and the identifier is returned into address determination unit 170.
Then, address determination unit 170 inquires about state server according to the identifier of the receiving terminal server 200
300, to determine the task call address of the receiving terminal server 200.
In addition, as described above, because service node may due to network failure, server delay the reasons such as machine and from information
Depart from reason system 1000, it is preferable that the determining the receiving terminal server 200 in address determination unit 170 of the task is adjusted
Before address, condition adjudgement unit 160 can judge the receiving terminal according to the identifier of the receiving terminal server 200
The active state of server, and only when judging that the receiving terminal server 200 is active, just notify described
Address determination unit 170 determines the task of the receiving terminal server 200 according to the identifier of the receiving terminal server 200
Call address.
Therefore, each service node 100,200 is in the process of running, such as by heartbeat function, periodically, randomly
Or in real time to the submission of state server 300 operation information of oneself, to enable that state server 300 learns the service section
The active state of point.Specifically, in transmitting terminal server 100, heartbeat delivery unit 180 constantly can take to the state
The business transmission heartbeat message of device 300, the heartbeat message is used to show at the transmitting terminal server 100 to the state server
In active state.If being not received by the heartbeat message of some service node, state server in a period of time
The service node is designated inactive state by 300 in database.
So, the state server 300 can be stored with identifier, the moving type of each service node in database
The set of the client that state, RMI URL and the service node are serviced, as shown in table 1.
Identifier server | Active state | Task call address | The client for being serviced |
Server100 | Activity | URL1 | Client10、Client30… |
Server200 | Activity | URL2 | Client20... |
... | ... | ... | ... |
Table 1
Preferably, the access in order to improve the inquiry velocity and simplified database of database is operated, it is possible to use key assignments(K-
V)Database builds the state server 300.For example, can using the identifier of server an as key, and by remaining
Parameter is used as corresponding value.Similarly, it is also possible to the client that will be serviced as a key, and using remaining parameter as corresponding
Value.
Correspondingly, in transmitting terminal server 100, condition adjudgement unit 160 can be according to the institute of identifier query unit 150
The identifier of the receiving terminal server 200 of determination, to inquire about the activity of the receiving terminal server 200 to state server 300
State.
If it is judged that the receiving terminal server 200 is active, then the condition adjudgement unit 160 notifies described
Address determination unit 170 determines that the task of the receiving terminal server 200 is adjusted according to the identifier of the receiving terminal server
Use address.If it is judged that the receiving terminal server is in inactive state, then the transmitting terminal server 100 can stop this
The transmission of IM information, to save the process resource and the network bandwidth of oneself.For example, the condition adjudgement unit 160 can be direct
Lose or notify that task generation unit 120 abandons described information and sends task.
In step S340, task call connection is set up between transmitting terminal server and receiving terminal server.
The task call address of the receiving terminal server 200 is determined in address determination unit 170(RMIURL)Afterwards,
Transmitting terminal server 100 is based on the task call address come in the transmitting terminal server 100 and the receiving terminal server 200
Between set up task call connection.Correspondingly, receiving terminal server 200 is equally based on the task call of the transmitting terminal server
Address come set up between the transmitting terminal server 100 and the receiving terminal server 200 task call connection.
Specifically, in transmitting terminal server 100, task call connection request is generated in the connection establishment unit 130,
And the request is addressed to by receiving terminal server 200 according to the RMI URL.In the receiving terminal server 200, connection is built
Vertical unit 210 receives the task call connection request from transmitting terminal server 100, and is returned to the transmitting terminal server 100
Return task call connection response.Thus, set up for transmitting between transmitting terminal server 100 and receiving terminal server 200
The interface of RMI tasks(Or be referred to as to connect).
In step S350, send information to receiving terminal server and send task.
After task call connection is set up between transmitting terminal server 100 and receiving terminal server 200, sending
In the server 100 of end, task transmitting element 140 connects to be sent to the receiving terminal server 200 by the task call
The information generated by task generation unit 120 sends task.
Correspondingly, in receiving terminal server 200, task receiving unit 220 is connected come from institute by the task call
Transmitting terminal server 100 is stated to receive for the information transmission task to the receiving terminal client 20 transmission described information.
In step S360, execution information sends task.
After task receiving unit 220 receives the information transmission task, task executing units 230 perform described information
Transmission task, so as to send described information to the receiving terminal client 20.
Specifically, the task executing units 230 call the RMI on receiving terminal server 200 to service so that the receiving terminal takes
Business device 200 as tasks carrying entity, perform from transmitting terminal server 100 receive for being sent to receiving terminal client 20
The RMI tasks of IM information.
In step S370, information is sent to receiving terminal client.
So, once the task executing units 230 are performed for the RMI tasks, receiving terminal server 200 i.e. can be by
The IM messagings sent to second user from first user that the RMI tasks include to the receiving terminal client 20, and
Presented to second user.
Although for convenience, hereinbefore only from transmitting terminal client 10 to transmitting terminal server 100 to receiving terminal
Server 200 illustrates information processing side according to embodiments of the present invention during being communicated to the unidirectional IM of receiving terminal client 20
Method and information processing system, it is clear that the embodiments of the invention can also be applied to from receiving terminal client 20 to connecing
During rightabout IM of the receiving end server 200 to transmitting terminal server 100 to transmitting terminal client 10 communicates.
At this moment, with transmitting terminal server 100 in similarly, also will be including heartbeat transmission in receiving terminal server 200
Unit 240, for constantly transmitting heartbeat message to the state server 300, to show at the receiving terminal server 200
In active state.
In addition, if in step S310, first user 10 be not a desirable to oneself belong to the second of different server
User 20 transmits IM information, and is desirable to transmit the IM information to the 3rd user 30 for also belonging to transmitting terminal server 100, then
In one example, above-mentioned step S310 to S370 can be performed, realizes that this is operated in the method using task call.
However, in another example, for the process resource of the system of saving, can be with head in the transmitting terminal server 100
First judge the recipient of the IM information whether among the service of oneself.If it is, according to prior art, being assisted using XMPP
View directly transmits the IM information to it, the process without performing any task call.
As can be seen here, using information processing method and information processing system according to embodiments of the present invention, in initialization rank
Duan Zhong, each Openfire server adds information processing system as clustered node, as a service node, and by believing
Breath processing system distributes a unique identifier.Next, each service node is when operation, depending on heartbeat message
When ground running status is submitted on state server.For example, the status information at least includes:Identifier server, RMI
URL, active state, the client for being serviced etc..In tasks execution phases, the task that transmitting terminal server will be performed is submitted to
In oneself task queue, after obtaining a task from task queue by scheduler module, inquiry state server is specified to find
Service node nodal information(RMI URL including this node), the RMI URL provided by this node are called on this node
RMI service, thus task be transferred on the service node perform, to realize instant messaging.
Therefore, in an embodiment of the present invention, following beneficial effect is realized:
1. use Java RMIs to be realized as the communication of information processing system, simplify programming complexity.
Java RMI are that the built-in RMI of Java language is realized, it be a process fully test crossed with practice test,
Reliable efficient communications protocol, so being utilized to realize that task scheduling between cluster interior nodes is relatively heavy newly developed writes association
For view, simply, functions reliably and efficiently.
2. KV databases of increasing income conventional at present are used(Such as Redis or Memcached)As state server.In state
The configuration information safeguarded unity on server, can be dynamically added and delete server, simplify deployment operation.Additionally, current
KV databases had many ripe, cheap realizations of increasing income, and have the scheme of various extensions high, make system cost further
Reduce, and with high reliability.
3. all nodes are peer node, it is only necessary to the address information and RMI serve ports of unified configuration status server
.
Although it should be noted that for convenience, hereinbefore using transmitting terminal server and receiving terminal server as list
Only server is illustrated, but in practice, in order to realize two-way communication, each service node can include sending
All units in end server and receiving terminal server.
Although in addition, hereinbefore using Java RMI as the communication implementation in information processing system and to increase income
Key assignments(K-V)Database describes embodiments of the invention as the implementation of state server, however it is necessary that explanation
, the invention is not restricted to this.Other communication implementations with identical characteristics can also be used in the information processing system,
And the state server can also in centralized manner be realized using other kinds of database, or distribution ground is realized
In each service node.
Through the above description of the embodiments, those skilled in the art can be understood that the present invention can be by
Realized in the mode of software plus required hardware platform, naturally it is also possible to all implemented by software or hardware.Based on this
The understanding of sample, what technical scheme contributed to background technology in whole or in part can be in the form of software product
Embody, the computer software product can be stored in storage medium, such as ROM/RAM, disk, CD, including it is some
Instruction is used to so that a computer equipment(Can be personal computer, server, or network equipment etc.)Perform the present invention
Method described in some parts of each embodiment or embodiment.
Each embodiment of the invention has been described in detail above.However, it should be appreciated by those skilled in the art that not taking off
In the case of principle of the invention and spirit, these embodiments can be carried out with various modifications, combination or sub-portfolio, and so
Modification should fall within the scope of the present invention.
Claims (27)
1. a kind of information processing method, methods described is applied to the transmitting terminal server in information processing system,
Described information processing system at least includes the transmitting terminal server and receiving terminal server, and the transmitting terminal server connects
Transmitting terminal client is connected to, the receiving terminal server is connected to receiving terminal client,
Characterized in that, methods described includes:
When the transmitting terminal client sends information to the receiving terminal client, receive described from the transmitting terminal client
Information;
Generation information sends task, and described information sends task to be used to send described information to the receiving terminal client;
Task call address based on the receiving terminal server is come in the transmitting terminal server and the receiving terminal server
Between set up task call connection;And
Connect to send described information transmission task to the receiving terminal server by the task call, to cause described connecing
Receiving end server performs described information and sends task, so as to send described information to the receiving terminal client.
2. method according to claim 1, it is characterised in that described information processing system also includes state server, the shape
State server is used to store identifier, task call address and the institute of the transmitting terminal server and the receiving terminal server
The client of connection, and
Methods described also includes:
The identifier of the receiving terminal server that the receiving terminal client is connected to is inquired about to the state server;With
And
Identifier according to the receiving terminal server determines the task call address of the receiving terminal server.
3. method according to claim 2, it is characterised in that the state server is additionally operable to store the transmitting terminal server
With the active state of the receiving terminal server, and
Methods described also includes:
Identifier according to the receiving terminal server judges the active state of the receiving terminal server;
If it is judged that the receiving terminal server is in inactive state, then abandons described information and send task;And
If it is judged that the receiving terminal server is active, then the identifier according to the receiving terminal server is come really
The task call address of the fixed receiving terminal server.
4. method according to claim 3, it is characterised in that methods described also includes:
Heartbeat message is transmitted to the state server, the heartbeat message is used to show the transmission to the state server
End server is active.
5. method according to claim 4, it is characterised in that the heartbeat message includes:The mark of the transmitting terminal server
Symbol, task call address and the client for being connected.
6. method according to claim 2, it is characterised in that the state server uses key assignments(K-V)Database is realized.
7. method according to claim 1, it is characterised in that the task call address is Java RMIs(RMI)
URL(URL).
8. a kind of information processing method, methods described is applied to the receiving terminal server in information processing system,
Described information processing system at least includes transmitting terminal server and the receiving terminal server, and the transmitting terminal server connects
Transmitting terminal client is connected to, the receiving terminal server is connected to receiving terminal client,
Characterized in that, methods described includes:
Task call address based on the transmitting terminal server is come in the transmitting terminal server and the receiving terminal server
Between set up task call connection;
Connect to send task from the transmitting terminal server receive information by the task call, described information sends task
For sending described information to the receiving terminal client;And
Perform described information and send task, so as to send described information to the receiving terminal client.
9. method according to claim 8, it is characterised in that described information processing system also includes state server, the shape
State server is used to store the active state of the transmitting terminal server and the receiving terminal server, and
Methods described also includes:
Heartbeat message is transmitted to the state server, the heartbeat message is used to show the reception to the state server
End server is active.
10. method according to claim 9, it is characterised in that the state server is additionally operable to store the transmitting terminal service
The identifier of device and the receiving terminal server, task call address and the client for being connected, and
The heartbeat message includes:The identifier of the receiving terminal server, task call address and the client for being connected.
11. methods according to claim 9, it is characterised in that the state server uses key assignments(K-V)Database comes real
It is existing.
12. methods according to claim 8, it is characterised in that the task call address is Java RMIs(RMI)
URL(URL).
A kind of 13. transmitting terminal servers, the transmitting terminal server belongs to information processing system, and described information processing system is at least
Including the transmitting terminal server and receiving terminal server, the transmitting terminal server is connected to transmitting terminal client, described to connect
Receiving end server is connected to receiving terminal client,
Characterized in that, the transmitting terminal server includes:
Information receiving unit, for when the transmitting terminal client sends information to the receiving terminal client, from the hair
Sending end client receives described information;
Task generation unit, task is sent for generating information, and described information sends task to be used for the receiving terminal client
Send described information;
Connection establishment unit, for the task call address based on the receiving terminal server come the transmitting terminal server with
Task call connection is set up between the receiving terminal server;And
Task transmitting element, is sent described information and sent for being connected by the task call to the receiving terminal server
Task, sends task, so as to send institute to the receiving terminal client to cause that the receiving terminal server performs described information
State information.
14. transmitting terminal servers according to claim 13, it is characterised in that described information processing system also includes status service
Device, the state server is used to store identifier, the task call of the transmitting terminal server and the receiving terminal server
Address and the client for being connected, and
The transmitting terminal server also includes:
Identifier query unit, for inquiring about the reception that the receiving terminal client is connected to the state server
Hold the identifier of server;And
Address determination unit, the task of the receiving terminal server is determined for the identifier according to the receiving terminal server
Call address.
15. transmitting terminal servers according to claim 14, it is characterised in that the state server is additionally operable to store the hair
The active state of sending end server and the receiving terminal server, and
The transmitting terminal server also includes:
Condition adjudgement unit, the activity of the receiving terminal server is judged for the identifier according to the receiving terminal server
State, if it is judged that the receiving terminal server is in inactive state, then abandons described information and sends task;And if
Judge that the receiving terminal server is active, then notify the address determination unit according to the receiving terminal server
Identifier determine the task call address of the receiving terminal server.
16. transmitting terminal servers according to claim 15, it is characterised in that the transmitting terminal server also includes:
Heartbeat delivery unit, for transmitting heartbeat message to the state server, the heartbeat message is used for the state
Server shows that the transmitting terminal server is active.
17. transmitting terminal servers according to claim 16, it is characterised in that the heartbeat message includes:The transmitting terminal clothes
It is engaged in the identifier of device, task call address and the client that is connected.
18. transmitting terminal servers according to claim 14, it is characterised in that the state server uses key assignments(K-V)Number
Realized according to storehouse.
19. transmitting terminal servers according to claim 13, it is characterised in that the task call address is Java remote methods
Call(RMI)URL(URL).
A kind of 20. receiving terminal servers, the receiving terminal server belongs to information processing system, and described information processing system is at least
Including transmitting terminal server and the receiving terminal server, the transmitting terminal server is connected to transmitting terminal client, described to connect
Receiving end server is connected to receiving terminal client,
Characterized in that, the receiving terminal server includes:
Connection establishment unit, for the task call address based on the transmitting terminal server come the transmitting terminal server with
Task call connection is set up between the receiving terminal server;
Task receiving unit, is sent from the transmitting terminal server receive information for being connected by the task call and appointed
Business, described information sends task to be used to send described information to the receiving terminal client;And
Task executing units, task is sent for performing described information, so as to send described information to the receiving terminal client.
21. receiving terminal servers according to claim 20, it is characterised in that described information processing system also includes status service
Device, the state server is used to store the active state of the transmitting terminal server and the receiving terminal server, and
The receiving terminal server also includes:
Heartbeat delivery unit, for transmitting heartbeat message to the state server, the heartbeat message is used for the state
Server shows that the receiving terminal server is active.
22. receiving terminal servers according to claim 21, it is characterised in that the state server is additionally operable to store the hair
The identifier of sending end server and the receiving terminal server, task call address and the client for being connected, and
The heartbeat message includes:The identifier of the receiving terminal server, task call address and the client for being connected.
23. receiving terminal servers according to claim 21, it is characterised in that the state server uses key assignments(K-V)Number
Realized according to storehouse.
24. receiving terminal servers according to claim 20, it is characterised in that the task call address is Java remote methods
Call(RMI)URL(URL).
25. a kind of information processing systems, it is characterised in that described information processing system includes:
Transmitting terminal server according to any one of claim 13 to 19;
Receiving terminal server according to any one of claim 20 to 24;And
State server, the state server is used to store the mark of the transmitting terminal server and the receiving terminal server
Symbol, task call address and the client for being connected.
26. information processing systems according to claim 25, it is characterised in that the state server is additionally operable to store the hair
The active state of sending end server and the receiving terminal server.
27. methods according to claim 25, it is characterised in that the state server uses key assignments(K-V)Database comes real
It is existing.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310084536.1A CN104052723B (en) | 2013-03-15 | 2013-03-15 | information processing method, server and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310084536.1A CN104052723B (en) | 2013-03-15 | 2013-03-15 | information processing method, server and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104052723A CN104052723A (en) | 2014-09-17 |
CN104052723B true CN104052723B (en) | 2017-05-24 |
Family
ID=51505095
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310084536.1A Active CN104052723B (en) | 2013-03-15 | 2013-03-15 | information processing method, server and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104052723B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105451091B (en) * | 2015-11-18 | 2019-09-10 | Tcl集团股份有限公司 | It is a kind of based on the instant message processing method concurrently communicated and system |
CN106506490B (en) * | 2016-11-03 | 2019-07-09 | 深圳智高点知识产权运营有限公司 | A kind of distributed computing control method and distributed computing system |
CN107040455B (en) * | 2017-05-27 | 2021-05-11 | 北京思特奇信息技术股份有限公司 | Instant message communication method and system based on redis |
CN109068183A (en) * | 2018-08-08 | 2018-12-21 | 湖南快乐阳光互动娱乐传媒有限公司 | Live broadcast bullet screen distribution method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7228353B1 (en) * | 2002-03-28 | 2007-06-05 | Emc Corporation | Generating and launching remote method invocation servers for individual client applications |
CN101504764A (en) * | 2009-01-19 | 2009-08-12 | 西安交通大学 | Ancient architecture oil-decorative painting virtual repairing system and method |
CN102202102A (en) * | 2011-07-05 | 2011-09-28 | 施昊 | Network service polymerization system and polymerization method thereof based on cloud computing configuration |
-
2013
- 2013-03-15 CN CN201310084536.1A patent/CN104052723B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7228353B1 (en) * | 2002-03-28 | 2007-06-05 | Emc Corporation | Generating and launching remote method invocation servers for individual client applications |
CN101504764A (en) * | 2009-01-19 | 2009-08-12 | 西安交通大学 | Ancient architecture oil-decorative painting virtual repairing system and method |
CN102202102A (en) * | 2011-07-05 | 2011-09-28 | 施昊 | Network service polymerization system and polymerization method thereof based on cloud computing configuration |
Also Published As
Publication number | Publication date |
---|---|
CN104052723A (en) | 2014-09-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8032780B2 (en) | Virtualization based high availability cluster system and method for managing failure in virtualization based high availability cluster system | |
CN105472042B (en) | The message-oriented middleware system and its data transferring method of WEB terminal control | |
US20200052982A1 (en) | In situ triggered function as a service within a service mesh | |
US10454795B1 (en) | Intermediate batch service for serverless computing environment metrics | |
CN102355413A (en) | Method and system for unifying message space on large scale in real time | |
US8606908B2 (en) | Wake-up server | |
CN104052723B (en) | information processing method, server and system | |
US8812718B2 (en) | System and method of streaming data over a distributed infrastructure | |
CN110071965B (en) | Data center management system based on cloud platform | |
TWI786527B (en) | User code operation method of programming platform, electronic equipment and computer-readable storage medium | |
CN106293847B (en) | Method for supporting service of virtualization platform | |
CN113163016B (en) | Network long connection service clustering deployment system and control flow | |
CN105183299A (en) | Human-computer interface service processing system and method | |
WO2020206783A1 (en) | Data transmission scheduling method and system | |
CN114710571B (en) | Data packet processing system | |
CN114443940A (en) | Message subscription method, device and equipment | |
CN101751297A (en) | Information system to which a large number of clients can log in and method for large number of clients to log in to same | |
CN108259605B (en) | Data calling system and method based on multiple data centers | |
CN105493444A (en) | Fault management apparatus, device and method for network function virtualization (nfv) | |
CN109063140A (en) | A kind of data query method, transfer server and computer readable storage medium | |
CN105205735A (en) | Power dispatching data cloud service system and implementation method | |
Hou et al. | Design scheme for data transmission component of electric internet of things management platform | |
CN108076111A (en) | A kind of system and method for distributing data in big data platform | |
Zhai et al. | An improved DDS publish/subscribe automatic discovery algorithm | |
CN209313868U (en) | A kind of distribution cloud stocking system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |