CN107959719B - Cache-based multi-server calling method and system - Google Patents

Cache-based multi-server calling method and system Download PDF

Info

Publication number
CN107959719B
CN107959719B CN201711205607.3A CN201711205607A CN107959719B CN 107959719 B CN107959719 B CN 107959719B CN 201711205607 A CN201711205607 A CN 201711205607A CN 107959719 B CN107959719 B CN 107959719B
Authority
CN
China
Prior art keywords
server
broadcast
unordered
order
servers
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
Application number
CN201711205607.3A
Other languages
Chinese (zh)
Other versions
CN107959719A (en
Inventor
刘睿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Jinxi Intelligent Technology Co.,Ltd.
Original Assignee
Suzhou Joylin Wireless Information Technology Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Suzhou Joylin Wireless Information Technology Co ltd filed Critical Suzhou Joylin Wireless Information Technology Co ltd
Priority to CN201711205607.3A priority Critical patent/CN107959719B/en
Publication of CN107959719A publication Critical patent/CN107959719A/en
Application granted granted Critical
Publication of CN107959719B publication Critical patent/CN107959719B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Abstract

The invention discloses a cache-based multi-server calling method and a cache-based multi-server calling system, when a server requests an integral server cluster, the server is requested to send a first unordered broadcast to the server cluster, and the first unordered broadcast can be received by all servers; one of the servers, the response server, accepts the first out-of-order broadcast and is ready for execution; the request server or the response server sends a second out-of-order broadcast to the server cluster, wherein the content of the second out-of-order broadcast indicates a task that the response server is about to accept the first out-of-order broadcast request; the other servers which receive the first unordered broadcast and the second unordered broadcast give up the task of the first unordered broadcast request; the response server performs the task of the first out-of-order broadcast request. It can remove the central server and when a single server in the cluster fails, it does not affect the remaining servers to continue accepting requests. The request efficiency is improved, and resources are saved.

Description

Cache-based multi-server calling method and system
Technical Field
The invention relates to the technical field of multi-server calling strategies, in particular to a cache-based multi-server calling method and system.
Background
For current servers, more and more system servers are operating in a multi-server cluster, on the one hand more flexible than the single high-performance server in the past, and on the other hand more efficient than the single high-performance server. Today, where the architecture of distributed cluster servers is increasingly commonly used, strong command distributed server requests remain the mainstream, i.e., forcing the selection of a server to receive a single request from a user.
As described above, current multi-server clusters employ strongly-ordered allocation of server requests. This request mode consists in a central server for managing the cluster servers. The unified delivery is managed by the central server, the flexibility is not high, and any server needs to be restarted after deployment change. When a problem occurs with the central server, the system may face the possibility of temporarily failing to accept the response.
Therefore, the present inventors have earnestly demanded to conceive a new technology to improve the problems thereof.
Disclosure of Invention
The invention aims to provide a cache-based multi-server calling method and a cache-based multi-server calling system, which can remove a central server and do not influence the other servers to continuously accept requests when a single server in a cluster fails. The request efficiency is improved, and resources are saved.
In order to solve the technical problems, the technical scheme of the invention is as follows:
a cache-based multi-server calling method comprises the following steps:
s1: when one server requests the whole server cluster, the server is requested to send a first unordered broadcast to the server cluster, and the first unordered broadcast can be accepted by all the servers;
s2: one of the servers, the response server, accepts the first out-of-order broadcast and is ready for execution;
s3: a request server or a response server sends a second unordered broadcast to the server cluster, wherein the content of the second unordered broadcast represents the task that the response server is about to accept the request of the first unordered broadcast;
s4: the other servers which receive the first unordered broadcast and the second unordered broadcast give up the task of the first unordered broadcast request;
the response server performs the task of the first out-of-order broadcast request.
Preferably, before the step S1, the method further includes:
s01: starting all servers in a conventional java web server starting mode;
s02: two ports of each server are started, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port.
Preferably, each of the servers sends out-of-order broadcasts through the broadcast sending port.
Preferably, each of said servers accepts out-of-order broadcasts through said broadcast acceptance port.
A cache-based multi-server calling system comprises the following modules:
the system comprises a first unordered broadcast sending module, a second unordered broadcast sending module and a third unordered broadcast sending module, wherein the first unordered broadcast sending module is used for requesting a server to send a first unordered broadcast to a whole server cluster when the server requests the server, and the first unordered broadcast can be accepted by all servers;
a first response module, configured to enable a certain server, namely a response server, to receive the first unordered broadcast and prepare for execution;
a second out-of-order broadcast sending module, configured to request a server or a response server to send a second out-of-order broadcast to the server cluster, where content of the second out-of-order broadcast indicates that the response server is about to receive a task requested by the first out-of-order broadcast;
a second response module for giving up the task of the first out-of-order broadcast request by letting the rest of the servers which received the first out-of-order broadcast and the second out-of-order broadcast;
an execution module to cause the response server to execute the task of the first out-of-order broadcast request.
Preferably, the system further comprises a starting module, which is used for starting all the servers in a conventional javaweb server starting mode; then two ports of each server are started, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port.
Preferably, each of the servers sends out-of-order broadcasts through the broadcast sending port.
Preferably, each of said servers accepts out-of-order broadcasts through said broadcast acceptance port.
By adopting the technical scheme, the invention at least comprises the following beneficial effects:
the cache-based multi-server calling method and the cache-based multi-server calling system can remove the central server, and when a single server in the cluster fails, the other servers are not influenced to continuously receive the requests. The request efficiency is improved, and resources are saved.
Drawings
FIG. 1 is a flow chart of a cache-based multi-server call method according to the present invention;
fig. 2 is a schematic structural diagram of a cache-based multi-server call system according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example 1
As shown in fig. 1, a method for calling multiple servers based on cache according to this embodiment includes the following steps:
s1: when one server requests the whole server cluster, the server is requested to send a first unordered broadcast to the server cluster, and the first unordered broadcast can be accepted by all the servers;
s2: one of the servers, the response server, accepts the first out-of-order broadcast and is ready for execution;
s3: a request server or a response server sends a second unordered broadcast to the server cluster, wherein the content of the second unordered broadcast represents the task that the response server is about to accept the request of the first unordered broadcast;
s4: the other servers which receive the first unordered broadcast and the second unordered broadcast give up the task of the first unordered broadcast request;
the response server performs the task of the first out-of-order broadcast request.
Preferably, before the step S1, the method further includes:
s01: starting all servers in a conventional java web server starting mode;
s02: two ports of each server are started, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port.
Preferably, each of the servers sends out-of-order broadcasts through the broadcast sending port.
Preferably, each of said servers accepts out-of-order broadcasts through said broadcast acceptance port.
Example 2
As shown in fig. 2, the cache-based multi-server call system according to the present embodiment includes the following modules:
the system comprises a first unordered broadcast sending module, a second unordered broadcast sending module and a third unordered broadcast sending module, wherein the first unordered broadcast sending module is used for requesting a server to send a first unordered broadcast to a whole server cluster when the server requests the server, and the first unordered broadcast can be accepted by all servers;
a first response module, configured to enable a certain server, namely a response server, to receive the first unordered broadcast and prepare for execution;
a second out-of-order broadcast sending module, configured to request a server or a response server to send a second out-of-order broadcast to the server cluster, where content of the second out-of-order broadcast indicates that the response server is about to receive a task requested by the first out-of-order broadcast;
a second response module for giving up the task of the first out-of-order broadcast request by letting the rest of the servers which received the first out-of-order broadcast and the second out-of-order broadcast;
an execution module to cause the response server to execute the task of the first out-of-order broadcast request.
Preferably, the system further comprises a starting module, which is used for starting all the servers in a conventional javaweb server starting mode; then two ports of each server are started, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port.
Preferably, each of the servers sends out-of-order broadcasts through the broadcast sending port.
Preferably, each of said servers accepts out-of-order broadcasts through said broadcast acceptance port.
The invention aims to optimize a calling strategy for a server by using a cache-based mechanism, remove a central server and not influence the rest servers to continuously accept requests when a single server in a cluster fails. The request efficiency is improved, and resources are saved.
Specifically, the method comprises the following steps:
the server starts: and starting the server integrally through the remote connection of a program manager, wherein a conventional javaweb server starting mode is adopted to start a server cluster. But then two ports, one broadcast transmitting port and one broadcast receiving port, need to be enabled.
Out-of-order broadcast acceptance: when a request enters the cluster, it is broadcast as an unordered broadcast ensemble to all servers, all of which may respond to the broadcast through their own unordered broadcast receiver ports.
Out-of-order broadcast transmission: this is used to send out-of-order broadcasts through the port when a server captures a request while it is in a wandering state and ready to execute, and to drop the request for execution by the server when other servers receive the port sent by the server.
The overall process is summarized as follows: when a request is made to the entire server cluster, an out-of-order broadcast (the first out-of-order broadcast) is sent to all servers, which are acceptable, and when it occurs that a server accepts the broadcast and executes (there is no fear that several servers will get the broadcast and execute at the same time. The rest of the servers which receive the broadcast give up the request and give the request to execute the request task. Such an operation is that when a server is down, it is only in a wandering state, i.e. it does not interact with the surroundings, and it does not affect the execution of the overall task, and the presence of a central server is removed.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.

Claims (2)

1. A cache-based multi-server calling method is characterized by comprising the following steps:
s1: when one server requests the whole server cluster, the server is requested to send a first unordered broadcast to the server cluster, and the first unordered broadcast can be accepted by all the servers;
s2: one of the servers, the response server, accepts the first out-of-order broadcast and is ready for execution;
s3: a request server or a response server sends a second unordered broadcast to the server cluster, wherein the content of the second unordered broadcast represents the task that the response server is about to accept the request of the first unordered broadcast;
s4: the other servers which receive the first unordered broadcast and the second unordered broadcast give up the task of the first unordered broadcast request;
the response server executes the task of the first out-of-order broadcast request;
before the step S1, the method further includes:
s01: starting all servers in a conventional java web server starting mode;
s02: starting two ports of each server, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port;
each server sends out-of-order broadcast through the broadcast sending port;
each of the servers accepts out-of-order broadcasts through the broadcast receiving port.
2. A cache-based multi-server calling system is characterized by comprising the following modules:
the system comprises a first unordered broadcast sending module, a second unordered broadcast sending module and a third unordered broadcast sending module, wherein the first unordered broadcast sending module is used for requesting a server to send a first unordered broadcast to a whole server cluster when the server requests the server, and the first unordered broadcast can be accepted by all servers;
a first response module, configured to enable a certain server, namely a response server, to receive the first unordered broadcast and prepare for execution;
a second out-of-order broadcast sending module, configured to request a server or a response server to send a second out-of-order broadcast to the server cluster, where content of the second out-of-order broadcast indicates that the response server is about to receive a task requested by the first out-of-order broadcast;
a second response module, configured to enable the remaining servers that receive the first out-of-order broadcast and the second out-of-order broadcast to abandon the task of the first out-of-order broadcast request;
an execution module for causing the response server to execute a task of the first out-of-order broadcast request;
the system also comprises a starting module used for starting all the servers in a conventional java web server starting mode; then starting two ports of each server, wherein one port is a broadcast sending port, and the other port is a broadcast receiving port;
each server sends out-of-order broadcast through the broadcast sending port;
each of the servers accepts out-of-order broadcasts through the broadcast receiving port.
CN201711205607.3A 2017-11-27 2017-11-27 Cache-based multi-server calling method and system Active CN107959719B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711205607.3A CN107959719B (en) 2017-11-27 2017-11-27 Cache-based multi-server calling method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711205607.3A CN107959719B (en) 2017-11-27 2017-11-27 Cache-based multi-server calling method and system

Publications (2)

Publication Number Publication Date
CN107959719A CN107959719A (en) 2018-04-24
CN107959719B true CN107959719B (en) 2020-10-27

Family

ID=61962595

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711205607.3A Active CN107959719B (en) 2017-11-27 2017-11-27 Cache-based multi-server calling method and system

Country Status (1)

Country Link
CN (1) CN107959719B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1788259A (en) * 2003-04-08 2006-06-14 索尼株式会社 Content providing server, information processing device and method, and computer program
CN1976378A (en) * 2005-11-30 2007-06-06 阿尔卡特公司 Method for controlling a broadcast call
CN102447624A (en) * 2011-11-23 2012-05-09 成都市华为赛门铁克科技有限公司 Load balancing method in server cluster, as well as node server and cluster
CN104753994A (en) * 2013-12-27 2015-07-01 杭州海康威视系统技术有限公司 Method and device for data synchronization based on cluster server system
CN106227734A (en) * 2016-07-08 2016-12-14 大唐融合通信股份有限公司 A kind of data processing method based on problem search system and system
CN106656525A (en) * 2016-09-21 2017-05-10 华为技术有限公司 Data broadcasting system, data broadcasting method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1788259A (en) * 2003-04-08 2006-06-14 索尼株式会社 Content providing server, information processing device and method, and computer program
CN1976378A (en) * 2005-11-30 2007-06-06 阿尔卡特公司 Method for controlling a broadcast call
CN102447624A (en) * 2011-11-23 2012-05-09 成都市华为赛门铁克科技有限公司 Load balancing method in server cluster, as well as node server and cluster
CN104753994A (en) * 2013-12-27 2015-07-01 杭州海康威视系统技术有限公司 Method and device for data synchronization based on cluster server system
CN106227734A (en) * 2016-07-08 2016-12-14 大唐融合通信股份有限公司 A kind of data processing method based on problem search system and system
CN106656525A (en) * 2016-09-21 2017-05-10 华为技术有限公司 Data broadcasting system, data broadcasting method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Android 广播机制安全性研究;卿斯汉;《专研题究:与基开于发Android 系统的终端安全》;20161031;全文 *

Also Published As

Publication number Publication date
CN107959719A (en) 2018-04-24

Similar Documents

Publication Publication Date Title
US8856374B2 (en) Methods and systems for reconfiguration and repartitioning of a parallel distributed stream process
CN108696374B (en) Method and device for updating client configuration
US9176786B2 (en) Dynamic and automatic colocation and combining of service providers and service clients in a grid of resources for performing a data backup function
WO2018036133A1 (en) File download method and device
JP2014515152A (en) Method and apparatus for managing message subscriptions in a publish / subscribe messaging system and computer program
CN111294390B (en) Block data rapid synchronization method, device, equipment and storage medium
CN109173270B (en) Game service system and implementation method
CN109032796B (en) Data processing method and device
CN103116655A (en) Clustered data query method, client side and system
EP3120498A1 (en) Broadcasting management information using fountain codes
CN105373453A (en) Data backup method and system
CN105373563B (en) Database switching method and device
CN110602229A (en) Terminal system version downloading method, device and system based on dynamic slicing
CN108111630B (en) Zookeeper cluster system and connection method and system thereof
CN107547277B (en) Method for realizing virtualization control board and network communication equipment
CN107959719B (en) Cache-based multi-server calling method and system
CN106550021B (en) Push method and device for push message
CN112468310B (en) Streaming media cluster node management method and device and storage medium
CN109905459B (en) Data transmission method and device
CN109558254B (en) Asynchronous callback method, system, device and computer readable storage medium
CN115426361A (en) Distributed client packaging method and device, main server and storage medium
CN111767122A (en) Distributed task scheduling management method and device
EP4102367A1 (en) Message format indicator for resource-constrained devices
CN111478933A (en) Application cluster data preloading method, device, storage medium, equipment and system
CN110990213B (en) Method and device for monitoring user logs of cluster environment in real time

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211224

Address after: 215000 78 Keling Road, science and Technology City, high tech Zone, Suzhou City, Jiangsu Province

Patentee after: Suzhou Jinxi Intelligent Technology Co.,Ltd.

Address before: 215000 floor 6, building 12, Su hi tech software park, No. 78, Keling Road, Suzhou, Jiangsu

Patentee before: SUZHOU JOYLIN WIRELESS INFORMATION TECHNOLOGY CO.,LTD.