Data interactive method, service platform and the system of a kind of platform class service
Technical field
The present invention relates to the communications field, particularly relate to the data interaction side of a kind of platform class service
Method, service platform and system.
Background technology
Along with the development of science and technology, the application of cloud is more and more universal, and people are more therewith
Pay close attention to the performance of platform class service.Platform class service brings that people are stable, efficient high performance-price ratio
Service.Therefore the high efficiency serviced, expansibility is to need emphasis to close during the design of platform class system
The place of note.Plateform system is usually and is made up of multiple subsystems.Exist between these subsystems
A lot of mutual, and as service system, except externally providing service, to internal other system also
Service is provided equally.In order to provide these various services, interface service technology becomes must
Right selection.
When carrying out system design at present, system interface can use a kind of mode to realize i.e. using single
The interface of agreement realizes, this scheme have ignored bring because system service object is different to service
The difference required.Externally service request is stable, safe, easy-to-use;Internally service request is supported many
Language, efficiently.The problem using a kind of interface service to bring be can not meet institute systematic want
Ask.And mutual the most different from external interaction demand, according to external coordination between platform subsystem
It is mutual that view realizes between subsystem, then bring the problem that system is too fat to move, but prior art is also
These problems can not be solved timely and effectively.
Summary of the invention
Embodiments of the invention provide the data interactive method of a kind of platform class service, service platform
And system, it is possible to meet the different service requests of different service object, solve system too fat to move
Problem, substantially increases the quality of platform service.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
The present invention provides the data interactive method that a kind of platform class services, including:
Service platform is configuration RPC(Remote between described service platform and built-in system
Procedure Call Protocol, remote procedure call) agreement or HTTP(Hyper Text
Transfer Protocol, Hyper text transfer) agreement, so that when described service platform and institute
Stating built-in system when need to carry out data interaction, described service platform and described built-in system are based on institute
State the thrift interface or based on http protocol of remote procedure call protocol RPC agreement
Jersey interface carries out data interaction;
Described service platform is configuration http protocol between described service platform and external system,
So that when described service platform need to carry out data interaction with described external system, described service is put down
Platform and described external system jersey based on http protocol interface carry out data interaction.
Wherein, described method also includes:
Described service platform is configuration RPC agreement between the plurality of subsystem, so that when described
When needing to carry out data interaction between multiple subsystems, the plurality of subsystem is assisted based on described RPC
The thrift interface of view carries out data interaction
Described service platform receives from built-in system and/or the interface requests of external system, institute
State interface requests for indicating the described built-in system and/or external system need to be with described service platform
Carry out data interaction;
Described service platform uses load balancing instrument to be described built-in system and/or external system
The interface server that distribution is corresponding so that the interface server of correspondence process described built-in system and
/ or external system need to be mutual with described service platform data.
Wherein, described load balancing instrument is LVS(Linux Virtual Server, Linux
Virtual server), Nginx or LanderBalance.
The embodiment of the present invention provides a kind of service platform, including:
Configuration module, for between described service platform and built-in system configure RPC agreement or
HTTP http protocol and be between described service platform and external system configure
Http protocol;
Internal transmission module, for carrying out data when described service platform and described built-in system
Time mutual, described service platform and described built-in system are based on described remote procedure call protocol
Thrift interface or the jersey interface based on http protocol of RPC agreement carry out data friendship
Mutually;
External transmission module, for carrying out data when described service platform and described external system
Time mutual, described service platform and described external system jersey based on http protocol interface
Carry out data interaction.
Wherein, described configuration module, it is used for as configuring RPC agreement between the plurality of subsystem,
During so that needing to carry out data interaction between the plurality of subsystem, the plurality of subsystem based on
The thrift interface of described RPC agreement carries out data interaction.
Wherein, described internal transmission module and/or external transmission module, for receiving from interior
Portion's system and/or the interface requests of external system, described interface requests is used for indicating described inside
System and/or external system need to carry out data interaction with described service platform;
Described service platform, also includes:
Distribution module, being used for using load balancing instrument is described built-in system and/or outside system
The interface server that system distribution is corresponding, so that the interface server of correspondence processes described built-in system
And/or external system need to be mutual with described service platform data.
The embodiment of the present invention provides a kind of platform class service system, including:
Service platform, for between described service platform and built-in system configure RPC agreement or
HTTP http protocol, so that when described service platform needs with described built-in system
When carrying out data interaction, described service platform is adjusted based on described remote process with described built-in system
Thrift interface or jersey interface based on http protocol by agreement RPC agreement are carried out
Data interaction, and be configuration http protocol between described service platform and external system, with
Make when described service platform need to carry out data interaction with described external system, described service platform
Jersey interface based on http protocol with described built-in system carries out data interaction;
Built-in system, for when carrying out data interaction with described service platform, with described clothes
Business platform thrift interface based on described remote procedure call protocol RPC agreement or based on
The jersey interface of http protocol carries out data interaction;
External system, for when carrying out data interaction with described service platform, outside described
System jersey based on http protocol interface in portion's carries out data interaction.
Wherein, described service platform, it is used for as configuring RPC agreement between the plurality of subsystem,
During so that needing to carry out data interaction between the plurality of subsystem, the plurality of subsystem based on
The thrift interface of described RPC agreement carries out data interaction.
Described service platform, please for receiving the interface from built-in system and/or external system
Asking, described interface requests is used for indicating described built-in system and/or the external system need to be with described clothes
Business platform carries out data interaction;Described service platform uses load balancing instrument to be described internal system
System and/or the interface server of external system distribution correspondence, so that at the interface server of correspondence
Manage the data that described built-in system and/or external system need to be mutual with described service platform.
The invention provides data interactive method, the service platform of a kind of platform class service and be
System, service platform is to configure RPC agreement or Hyper text transfer between service platform and built-in system
Agreement http protocol, so that when service platform need to carry out data interaction with built-in system, clothes
Business platform and built-in system thrift interface based on remote procedure call protocol RPC agreement or
Jersey interface based on http protocol carries out data interaction, and then, service platform is service
Http protocol is configured between platform and external system, so that when service platform needs with external system
When carrying out data interaction, service platform and external system jersey based on http protocol interface
Carry out data interaction.Pass through the program, it is achieved that provide distinct interface scheme for different system
Thus meet the different service requests of different service object, the problems such as the system that solves is too fat to move, carry
The high quality of platform class service.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below
The accompanying drawing used required in embodiment or description of the prior art will be briefly described, aobvious and
Easily insight, the accompanying drawing in describing below is only some embodiments of the present invention, for this area
From the point of view of those of ordinary skill, on the premise of not paying creative work, it is also possible to according to these
Accompanying drawing obtains other accompanying drawing.
Fig. 1 is the stream of the data interactive method of a kind of platform class service of the embodiment of the present invention one
Journey schematic diagram;
Fig. 2 is the stream of the data interactive method of a kind of platform class service of the embodiment of the present invention two
Journey schematic diagram;
Fig. 3 is the structural representation of a kind of service platform of the embodiment of the present invention three;
Fig. 4 is the structural representation of a kind of service platform of the embodiment of the present invention four;
Fig. 5 is the schematic diagram of a kind of platform service system of the embodiment of the present invention four.
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, to the technical side in the embodiment of the present invention
Case is clearly and completely described, it is clear that described embodiment is only the present invention one
Divide embodiment rather than whole embodiments.Based on the embodiment in the present invention, this area is general
The every other embodiment that logical technical staff is obtained under not making creative work premise,
Broadly fall into the scope of protection of the invention.
The terms "and/or", a kind of incidence relation describing affiliated partner, table
Show and can there are three kinds of relations, such as, A and/or B, can represent: individualism A, with
Time there is A and B, individualism B these three situation.It addition, character "/" herein, one
As represent forward-backward correlation to as if the relation of a kind of "or".
Embodiment one
The invention provides the data interactive method of a kind of platform class service, as it is shown in figure 1, should
Method includes:
101, service platform be between described service platform and built-in system configure RPC agreement or
HTTP http protocol, so that when described service platform needs with described built-in system
When carrying out data interaction, described service platform is adjusted based on described remote process with described built-in system
Thrift interface or jersey interface based on http protocol by agreement RPC agreement are carried out
Data interaction.
Concrete, owing to built-in system has high requirements (such as: high efficiency) to service platform,
And to reach certain level of security in data transmission procedure, and interface phase based on RPC agreement
For interface based on http protocol, there is higher efficiency, support multilingual advantage, institute
With, relative to built-in system and platform subsystem, the quick response of this agreement well meets
Efficient requirement.But owing to existing ripe interfacing scheme based on RPC agreement realizes relatively
Complexity, and need the corresponding safety approach of tailor, therefore it is unfavorable for realizing outside
The service of system.Furthermore, it is contemplated that built-in system exists the phenomenon of multilingual realization, therefore make
The seamless across Programming with Pascal Language of RPC client and server communication is realized with thrift framework.
102, service platform is configuration http protocol between described service platform and external system,
So that when described service platform need to carry out data interaction with described external system, described service is put down
Platform and described external system jersey based on http protocol interface carry out data interaction.
Concrete, owing to external system is many by its hetero-organization (company, school etc.) or same
Other departments of tissue are responsible for, and the service to service platform offer has a demand, but comprehensive assessment
All many-sides such as desirability, safety certification, technical capability, it is impossible to reach to use thrift
The requirement of interface, therefore provides only the interface service of http protocol.
Here it should be noted that the method 101 and 102 in the present embodiment does not has logic
Order before and after on, it is possible to first operation 102 operates 101 again, and we do not limit herein
Fixed.
The invention provides the data interactive method of a kind of platform class service, service platform is service
RPC agreement or HTTP http protocol is configured between platform and built-in system, with
Make when service platform need to carry out data interaction with built-in system, service platform and built-in system base
Thrift interface or based on http protocol in remote procedure call protocol RPC agreement
Jersey interface carries out data interaction, and then, service platform is service platform and external system
Between configure http protocol so that when service platform and external system need to carry out data interaction,
Service platform and external system jersey based on http protocol interface carry out data interaction.Logical
Cross the program, it is achieved that provide distinct interface scheme for different system thus meet difference service
The different service requests of object, the problems such as the system that solves is too fat to move, improve platform class service
Quality.
Embodiment two
The invention provides the data interactive method of a kind of platform class service, as in figure 2 it is shown, should
Method includes:
201, service platform be between described service platform and built-in system configure RPC agreement or
Http protocol.
Concrete, described built-in system, is that service platform is preset according to the requirement institute of system object
's.Such as, certain video website is set up service platform, and allows user to this video website official
Online uploaded videos, if user is when its official website's uploaded videos, upload procedure requires efficiently,
Support multilingual, the client server in official website uploaded videos can be considered as built-in system, and
Use preset two kinds of interface protocols, i.e. RPC agreement or http protocol.Tool in data exchange
During body, built-in system can select connecing corresponding to corresponding agreement according to building of himself
Oral business.
202, service platform is configuration Hyper text transfer between described service platform and external system
Agreement http protocol.
Concrete, described external system, is also that service platform is pre-according to the requirement institute of system object
Put.Such as, certain video website is set up service platform, and allows user to this video website
Uploaded videos on official website, regards if user is uploaded to this website by third party's video software or website
Frequently, time, upload procedure to aspire for stability, safe, easy-to-use, can be by third party software or website
The client server of upper uploaded videos is considered as external system, and uses preset http protocol.
203, service platform is configuration RPC between described service platform and service platform subsystem
Agreement.
Concrete, described service platform includes multiple subsystem, due to the data between subsystem
Exchange requirement is efficient, it is multilingual to support, described service platform is to join between the plurality of subsystem
Put RPC agreement, during so that needing to carry out data interaction between the plurality of subsystem, described many
Individual subsystem thrift interface based on described RPC agreement carries out data interaction.
204, service platform receives from built-in system and/or the interface requests of external system.
Concrete, described interface requests is used for indicating described built-in system and/or external system to need
Data interaction is carried out with described service platform.
Such as, certain user wishes to upload one section of recording by official website, then user carries out phase
The button operation answered, at this moment service platform obtains the interface requests uploaded of user, and thinks this use
The server at family needs to carry out data interaction with service platform.
205, service platform is according to interface requests, and using load balancing instrument is described internal system
System and/or the interface server of external system distribution correspondence.
Concrete, after service platform receives the interface requests of client server, need for data
The corresponding interface server of cross allocation, now service platform uses load balancing instrument to connect
The distribution of mouth server.
Further, LVS load balancing processor it is used herein as, it is possible to use other loads are all
Weighing apparatus instrument, such as Nginx, LanderBalance, it is possible to reach identical effect.
Wherein, LVS is a virtual server cluster, it use IP load-balancing technique and
Based on content requests distribution technology.Scheduler is the sole inlet point of server cluster system, it
Can use IP load-balancing technique, based on content requests distribution technology or both combine.
It addition, scheduler has good throughput, different servers is balancedly transferred in request
Upper execution, and scheduler automatic shield falls the fault of server, thus one group of server is constituted
One high performance, virtual server of High Availabitity.The structure of whole server cluster is to client
It is transparent, and without revising the program of client and server end.
Nginx is Web server/Reverse Proxy and Email (IMAP/POP3)
Proxy server, and at a BSD (Berkeley Software Distribution, Bai Ke
Profit software suite) issue under-like agreement.Being characterized in occupying internal memory few, concurrent capability is strong.
LanderBalance is a enterprise-level load balancing software.By multiple servers with
The modes such as symmetry or function form in a server set, and LanderBalance passes through
Active activity load-balancing technique storehouse, sends, by outside, the request come and is evenly distributed to set
On a certain station server in structure, and taken by load after receiving the server process of request
The request of client responded by business device.LanderBalance sets up on existing network infrastructure, it
Provide the most transparent method extended network equipment of a kind of low input and the bandwidth of server, increasing
Add handling capacity, Strengthens network data-handling capacity, the flexibility improving network and availability.
206, according to the interface server of allocated correspondence, service platform and built-in system and/
Or between external system, complete data interaction.
The invention provides the data interactive method of a kind of platform class service, service platform is service
RPC agreement or HTTP http protocol is configured between platform and built-in system, with
Make when service platform need to carry out data interaction with built-in system, service platform and built-in system base
Thrift interface or based on http protocol in remote procedure call protocol RPC agreement
Jersey interface carries out data interaction, and then, service platform is service platform and external system
Between configure http protocol so that when service platform and external system need to carry out data interaction,
Service platform and external system jersey based on http protocol interface carry out data interaction.Logical
Cross the program, it is achieved that provide distinct interface scheme for different system thus meet difference service
The different service requests of object, the problems such as the system that solves is too fat to move, improve platform class service
Quality.
Embodiment three
The invention provides a kind of service platform, as it is shown on figure 3, the method includes:
Configuration module 01, for for configuring RPC association between described service platform and built-in system
View or HTTP http protocol and for join between described service platform and external system
Put http protocol;
Internal transmission module 02, for carrying out with described built-in system when described service platform
During data interaction, described service platform is assisted based on described remote procedure call with described built-in system
Thrift interface or the jersey interface based on http protocol of view RPC agreement carry out data
Alternately.
External transmission module 03, for carrying out with described external system when described service platform
During data interaction, described service platform and described external system jersey based on http protocol
Interface carries out data interaction.
Wherein, described configuration module, it is used for as configuring RPC agreement between the plurality of subsystem,
During so that needing to carry out data interaction between the plurality of subsystem, the plurality of subsystem based on
The thrift interface of described RPC agreement carries out data interaction.
Described internal transmission module and/or external transmission module, for receiving from built-in system
And/or the interface requests of external system, described interface requests be used for indicating described built-in system and/
Or external system need to carry out data interaction with described service platform;
Further, as shown in Figure 4, also include:
Distribution module 04, being used for using load balancing instrument is described built-in system and/or outside
The interface server that system distribution is corresponding, so that the interface server of correspondence processes described internal system
System and/or external system need to be mutual with described service platform data.
The invention provides a kind of service platform, service platform be service platform and built-in system it
Between configure RPC agreement or HTTP http protocol, so that when service platform is with interior
When portion's system need to carry out data interaction, service platform is assisted based on remote procedure call with built-in system
Thrift interface or the jersey interface based on http protocol of view RPC agreement carry out data
Alternately, and then, service platform is configuration http protocol between service platform and external system,
So that when service platform need to carry out data interaction with external system, service platform and external system
Jersey interface based on http protocol carries out data interaction.Pass through the program, it is achieved that pin
Servicing different system offer distinct interface scheme thus the difference of satisfied different service object will
Ask, the problems such as the system that solves is too fat to move, improve the quality of platform class service.
Embodiment four
The invention provides a kind of platform class service system, as it is shown in figure 5, include:
Service platform 11, for for configuring between described service platform 11 and built-in system 12
RPC agreement or HTTP http protocol, so that when described service platform 11 and institute
State built-in system 12 when need to carry out data interaction, described service platform 11 and described built-in system
12 thrift interfaces based on described remote procedure call protocol RPC agreement or based on HTTP
The jersey interface of agreement carries out data interaction, and is described service platform 11 and outside system
Http protocol is configured between system 13, so that when described service platform 11 and described external system
13 when need to carry out data interaction, and described service platform 11 and described built-in system 12 are based on HTTP
The jersey interface of agreement carries out data interaction;
Built-in system 12, is used for when carrying out data interaction with described service platform 11, with
Described service platform 11 thrift interface based on described remote procedure call protocol RPC agreement
Or jersey interface of based on http protocol carries out data interaction;
External system 13, is used for when carrying out data interaction with described service platform 11, with
Described external system 13 jersey based on http protocol interface carries out data interaction.
Wherein, described service platform 11 includes multiple subsystem.
Described service platform 11, is used for as configuring RPC agreement between the plurality of subsystem,
During so that needing to carry out data interaction between the plurality of subsystem, the plurality of subsystem based on
The thrift interface of described RPC agreement carries out data interaction.
Described service platform 11, for receiving from built-in system 12 and/or external system 13
Interface requests, described interface requests is used for indicating described built-in system 12 and/or external system
13 need to carry out data interaction with described service platform 11;Described service platform 11 uses load
Equilibrium instrument is the interface service that described built-in system 12 and/or external system 13 distribute correspondence
Device, so that the interface server of correspondence processes described built-in system 12 and/or external system 13
Data that need to be mutual with described service platform 11.
The invention provides a kind of platform class service system, service platform is that service platform is with internal
RPC agreement or HTTP http protocol is configured between system, so that when service is flat
When platform and built-in system need to carry out data interaction, service platform and built-in system are based on remote process
Thrift interface or the jersey interface based on http protocol of invocation protocol RPC agreement enter
Row data interaction, and then, service platform is configuration HTTP between service platform and external system
Agreement, so that when service platform need to carry out data interaction with external system, service platform is with outer
System jersey based on http protocol interface in portion's carries out data interaction.By the program, real
Show the difference providing distinct interface scheme for different system thus meet different service object
Service request, the problems such as the system that solves is too fat to move, improve the quality of platform class service.
In above description, in order to illustrate rather than in order to limit, it is proposed that such as particular system knot
The detail of structure, interface, technology etc, in order to thoroughly cut and understand the present invention.But, ability
The technical staff in territory is it should be clear that can also in the other embodiments do not have these details
Realize the present invention.In other situation, omit well-known device, circuit and method
Detailed description, in order to avoid unnecessary details hinders description of the invention.
Those skilled in the art is it can be understood that arrive, for convenience and simplicity of description,
Only it is illustrated with the division of above-mentioned each functional module, in actual application, can be according to need
Want and above-mentioned functions distribution is completed by different functional modules, will the internal structure of device draw
It is divided into different functional modules, to complete all or part of function described above.Above-mentioned retouch
The specific works process of the system stated, device and unit, is referred in preceding method embodiment
Corresponding process, do not repeat them here.
In several embodiments provided herein, it should be understood that disclosed system,
Apparatus and method, can realize by another way.Such as, device described above is real
Executing example is only that schematically such as, described module or the division of unit, the most only one are patrolled
Volume function divides, and actual can have other dividing mode, the most multiple unit or group when realizing
Part can in conjunction with or be desirably integrated into another system, or some features can be ignored, or not
Perform.Another point, shown or discussed coupling each other or direct-coupling or communication link
Connecing can be the INDIRECT COUPLING by some interfaces, device or unit or communication connection, Ke Yishi
Electrically, machinery or other form.
The described unit that illustrates as separating component can be or may not be and physically divide
Opening, the parts shown as unit can be or may not be physical location, the most permissible
It is positioned at a place, or can also be distributed on multiple NE.Can be according to reality
Need to select some or all of unit therein to realize the purpose of the present embodiment scheme.
It addition, each functional unit in each embodiment of the present invention can be integrated in a process
In unit, it is also possible to be that unit is individually physically present, it is also possible to two or more are single
Unit is integrated in a unit.Above-mentioned integrated unit both can realize to use the form of hardware,
The form that can also use SFU software functional unit realizes.
If described integrated unit realizes and as independent using the form of SFU software functional unit
When production marketing or use, can be stored in a computer read/write memory medium.Based on
Such understanding, prior art is contributed by technical scheme the most in other words
Part or completely or partially can the embodying with the form of software product of this technical scheme,
This computer software product is stored in a storage medium, including some instructions with so that one
Platform computer equipment (can be personal computer, server, or the network equipment etc.) or place
Reason device (processor) performs all or part of step of method described in each embodiment of the present invention
Suddenly.And aforesaid storage medium includes: USB flash disk, portable hard drive, read-only storage (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory),
The various medium that can store program code such as magnetic disc or CD.
The above, the only detailed description of the invention of the present invention, but protection scope of the present invention is also
Being not limited to this, any those familiar with the art is at the technology model that the invention discloses
In enclosing, change can be readily occurred in or replace, all should contain within protection scope of the present invention.
Therefore, protection scope of the present invention should be as the criterion with described scope of the claims.