CN110022257A - Distributed information system - Google Patents

Distributed information system Download PDF

Info

Publication number
CN110022257A
CN110022257A CN201810014768.2A CN201810014768A CN110022257A CN 110022257 A CN110022257 A CN 110022257A CN 201810014768 A CN201810014768 A CN 201810014768A CN 110022257 A CN110022257 A CN 110022257A
Authority
CN
China
Prior art keywords
message
server
zookeeper
database
application server
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.)
Granted
Application number
CN201810014768.2A
Other languages
Chinese (zh)
Other versions
CN110022257B (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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810014768.2A priority Critical patent/CN110022257B/en
Publication of CN110022257A publication Critical patent/CN110022257A/en
Application granted granted Critical
Publication of CN110022257B publication Critical patent/CN110022257B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/067Distributed or networked storage systems, e.g. storage area networks [SAN], network attached storage [NAS]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • 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
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Environmental & Geological Engineering (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

This disclosure relates to which distributed data technique field, provides a kind of distributed information system, comprising: database, for storing the configuration parameter of message;Multiple message application servers, for generating information and sending to requesting party according to the message request and configuration parameter of requesting party;Server-side is configured, is used for when database update, Xiang Suoyou message application server issues database update notice, so that message application server reads the configuration parameter updated from database and is written in message application server local cache;Corresponding configuration parameter is read from local cache when wherein message application server generates message.The disclosure devises a set of high-availability cache system for supporting high concurrent, issue that database update is notified to all message application servers and trigger the server reloads database automatically and is configured to local cache by configuring server-side dynamic, it avoids using bring problems are restarted, improves system availability.

Description

Distributed information system
Technical field
This disclosure relates to distributed data technique field, and in particular to a kind of distributed information system.
Background technique
Before message push technology appearance, message server can only wait user's active pull to the message that user pushes Just can see, disappear to improve user activity, user's viscosity and user's retention ratio, messaging service end especially mobile device Breath server-side needs to obtain the initiative of message display, rather than passively user is waited to pull message.Message push-mechanism is answered It transports and gives birth to.For operation personnel by the product or third party's tool of oneself to user's mobile device active push message, user can be with The message informing of message server push is seen in mobile device screen lock state and notification bar, and user clicks notification bar message APP can be aroused and jump to the corresponding page.Wechat message QQ message usually seen in screen locking etc. belongs to mobile terminal and disappears Breath push ranks.
Up to more than 100 kinds of the message that message center accesses at present.And message center system architecture is not by every kind before The corresponding required argument configuration of message is in configuration file or database but is coupled in code.This cause it is every access it is a kind of new Not only server-side will add parameter verification relevant to new information, the class for the message that client will also be returned according to server-side to message Type distinguishes message, verifies required argument, adds corresponding service logic.So not only server-side will repair access new information every time Change code, it is necessary to consistent with the client hair version period.
In order to solve this problem, implementation in the prior art is largely directly to configure configuration parameter in data In library, but reading database is directed to network I/O and disk I/O every time, is affected in high concurrent to system performance.Especially In modification database with postponing, if by restarting application server manually to allow application server to read updated database Configuration, server is equivalent in of short duration delay machine state when because restarting, therefore seriously affects system availability.
Therefore, it is necessary to a kind of distributed information systems for supporting high concurrent and High Availabitity.
Above- mentioned information are only used for reinforcing the understanding to the background of the disclosure, therefore it disclosed in the background technology part It may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The disclosure is designed to provide a kind of distributed information system, and then is overcome at least to a certain extent due to phase One or more problem caused by the limitation and defect of pass technology.
Other characteristics and advantages of the disclosure will be apparent from by the following detailed description, or partially by the disclosure Practice and acquistion.
According to an embodiment of the disclosure, a kind of distributed information system is disclosed, comprising:
Database, for storing the configuration parameter of message;
Multiple message application servers are given for generating information and sending according to the message request and configuration parameter of requesting party Requesting party;
Server-side is configured, is used for when database update, Xiang Suoyou message application server issues database update notice, So that message application server reads the configuration parameter updated from database and is written in message application server local cache;
Corresponding configuration parameter is read from local cache when wherein message application server generates message.
According to an example embodiment of the disclosure, when the starting of the message application of message application server, message Application server reads configuration parameter from database and is written in message application server local cache.
According to an example embodiment of the disclosure, message is divided into different News Categories, the message of the same category Using identical configuration parameter.
According to an example embodiment of the disclosure, message template corresponding with News Category, messages application service are established Device generates message using message template corresponding with News Category belonging to message request.
According to an example embodiment of the disclosure, wherein message template includes that message center shows template, notification bar exhibition Show template, landing page shows template, Android screen locking template, in ios force touch template or the small picture and text template of ios at least It is a kind of.
According to an example embodiment of the disclosure, wherein configuration server-side is zookeeper server-side, each message is answered Use server while also as zookeeper client.
According to an example embodiment of the disclosure, wherein Zookeeper client registers are the interim suitable of Zookeeper Sequence node.
According to an example embodiment of the disclosure, one in plurality of zookeeper client is used as monitoring The main service whether zookeeper server-side survives, remaining zookeeper client are used as from whether the main service of service monitoring deposits Living, when main service delay machine, several compete again from service and elect one as new main service, to continue to monitor Whether zookeeper server-side survives.
According to an example embodiment of the disclosure, wherein several compete again from service and elect one as new Main service include: the smallest using several as the serial number of temporal order's node from the Zookeeper client of service One as new main service.
According to an example embodiment of the disclosure, wherein requesting party sends message request by information client side and receives Message.
According to an example embodiment of the disclosure, wherein database is mysql database.
According to some example embodiments of the disclosure, the high-availability cache system of high concurrent is supported by design, is passed through Configuration server-side dynamic issues that database update is notified to all message application servers and trigger the server is reloaded automatically Database is configured to local cache, avoids using bring problems are restarted, improves system availability.
According to some example embodiments of the disclosure, by the way that all message are sorted out by template, and by each template Configuration must be changed in the database by hard coded with optional parameters.As long as access new information server-side is looked into according to the message every time Asking its affiliated template can be obtained required and optional parameters, and the function of checking parameter is executed by unified tool-class;Client End also need to only know that the corresponding template of message can complete data check.
It is utilized according to some example embodiments of the disclosure by zookeeper server-side survival monitoring mechanism The characteristic of temporal order's node of zookeeper realizes distributed lock to support principal and subordinate's hot-swap under distributed environment, keeps away Exempt to monitor zookeeper server-side survival service Single Point of Faliure.
It should be understood that the above general description and the following detailed description are merely exemplary, this can not be limited It is open.
Detailed description of the invention
Its example embodiment is described in detail by referring to accompanying drawing, above and other target, feature and the advantage of the disclosure will It becomes more fully apparent.
Fig. 1 shows the block diagram of the distributed information system according to one example embodiment of the disclosure.
Fig. 2 shows according to the distributed information system using Zookeeper framework of one example embodiment of the disclosure Block diagram.
Fig. 3 shows the operational process that configuration parameter is updated according to the distributed information system of one example embodiment of the disclosure Figure.
Fig. 4 shows the Zookeeper client in the distributed information system according to one example embodiment of the disclosure Architecture diagram.
Specific example embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, providing these example embodiments makes the disclosure Description will be more full and complete, and the design of example embodiment is comprehensively communicated to those skilled in the art.Attached drawing The only schematic illustrations of the disclosure are not necessarily drawn to scale.Identical appended drawing reference indicates same or like in figure Part, thus repetition thereof will be omitted.
In addition, described feature, structure or characteristic can be incorporated in one or more examples in any suitable manner In embodiment.In the following description, many details are provided to provide filling to the example embodiment of the disclosure Sub-argument solution.It will be appreciated, however, by one skilled in the art that the specific detail can be omitted with technical solution of the disclosure In it is one or more, or can be using other systems, constituent element, step etc..In other cases, it is not shown in detail or retouches Known features, system, realization or operation are stated to avoid a presumptuous guest usurps the role of the host and all aspects of this disclosure is made to thicken.
Some block diagrams shown in the drawings are functional entitys, not necessarily must be with physically or logically independent entity phase It is corresponding.These functional entitys can be realized using software form, or in one or more hardware modules or integrated circuit in fact These existing functional entitys, or these functions reality is realized in heterogeneous networks and/or processor device and/or microcontroller device Body.
The disclosure is designed to provide a kind of distributed information system, comprising: database, for storing the configuration of message Parameter;Multiple message application servers, for being asked according to the message request and configuration parameter of requesting party generation information and sending The side of asking;Server-side is configured, is used for when database update, Xiang Suoyou message application server issues database update notice, with So that message application server is read the configuration parameter updated from database and is written in message application server local cache;Wherein Message application server reads corresponding configuration parameter when generating message from local cache.It is high that the disclosure devises a set of support Concurrent high-availability cache system issues database update and notifies to all message application servers by configuring server-side dynamic And trigger the server reloads database automatically and is configured to local cache, avoids using bring problems are restarted, mentions High system availability.Meanwhile by the way that all message are sorted out by template, and by the required and optional parameters of each template by compiling firmly Code is changed to configuration in the database.As long as according to the information query, its affiliated template can be obtained access new information server-side every time Required and optional parameters, and the function of checking parameter is executed by unified tool-class;Client also need to only know that message is corresponding Template can complete data check.In addition, utilizing facing for zookeeper by zookeeper server-side survival monitoring mechanism When sequential node characteristic realize distributed lock to support principal and subordinate's hot-swap under distributed environment, avoid monitoring Zookeeper server-side survival service Single Point of Faliure.
It is described in detail below with reference to the distributed information system of Fig. 1-4 pairs of disclosure, wherein Fig. 1 is shown according to this The block diagram of the distributed information system of one example embodiment is disclosed;Fig. 2 shows according to one example embodiment of the disclosure Using the block diagram of the distributed information system of Zookeeper framework;Fig. 3 shows point according to one example embodiment of the disclosure The operational flow diagram of cloth message system update configuration parameter;Fig. 4 shows the distribution according to one example embodiment of the disclosure The architecture diagram of Zookeeper client in message system.
It is specifically described first in conjunction with a distributed information system of Fig. 1-3 pairs of one example embodiments of the disclosure, In, Fig. 1 shows the block diagram of the distributed information system according to one example embodiment of the disclosure;Fig. 2 shows according to the disclosure The block diagram of the distributed information system using Zookeeper framework of one example embodiment;Fig. 3 is shown according to the disclosure one The distributed information system of example embodiment updates the operational flow diagram of configuration parameter.
As shown in Figure 1, distributed information system, comprising: database 1, for storing the configuration parameter of message;Multiple message Application server 21,22...2n constitute message application server cluster 2, for being joined according to the message request and configuration of requesting party Number generates information and sending to requesting party, and wherein configuration parameter includes required parameter and optional parameter;Server-side 3 is configured, For when database update, Xiang Suoyou message application server to issue database update notice, so that message application server The configuration parameter updated is read from database and is written in message application server local cache;Wherein message application server produces Corresponding configuration parameter is read from local cache when raw message.Wherein using special server as configuration server-side, and With can hot-swap hot-standby server.
In the prior art the implementation of distributed information system be usually directly by data configuration in the database, every time Reading database is directed to network I/O and disk I/O, especially influences when high concurrent on system performance very big.In contrast, The distributed information system of the disclosure only message application server service starting when and reading database when database update In data, other situations only read data from local cache, greatly reduce the number of network I/O and disk I/O, improve and be System handling capacity.Distributed information system big at present would generally have hundreds (such as more than 300) messages application service simultaneously Device will cause message request if database modification message configuration parameter requires to restart all message application servers every time It loses, or even service is unavailable.The distributed information system of the disclosure is i.e. readable without restarting server when database update Take the data in updated database.The distributed information system of the disclosure issues database more by configuring server-side dynamic New notice is to all message application servers and triggers message application server and reloads the configuration parameter of database automatically and arrives Local cache avoids using bring problems are restarted, improves system availability.
Further, in order to further ensure the strong consistency of data in distributed environment, the disclosure is as shown in Figure 1 Zookeeper framework is combined on the basis of distributed information system, wherein zookeeper is the distributed number an of High Availabitity According to management and system coordination frame, based on the realization to paxos algorithm, which ensure that the strong by one of data in distributed environment Cause property.It is illustrated below with reference to Fig. 2 to using the distributed information system of Zookeeper framework.
As shown in Fig. 2, including: database 1 using the distributed information system of Zookeeper framework, for storing message Configuration parameter;Multiple message application servers 21,22...2n constitute message application server cluster 2, for according to request The message request and configuration parameter of side generate information and sending to requesting party, and wherein configuration parameter includes required parameter and optional Parameter, while each message application server is also used as zookeeper client;Configuration as zookeeper server-side Server-side 3, for when database update, Xiang Suoyou zookeeper client to issue database update notice, so that message is answered The configuration parameter updated is read from database with server and is written in message application server local cache;Wherein messages application Server reads corresponding configuration parameter when generating message from local cache.Due to using zookeeper frame, avoiding While bring problems are restarted in application, the strong consistency of data in distributed environment is further ensured.
Illustrate how the distributed information system of the disclosure carries out the update of configuration parameter below with reference to Fig. 3, Fig. 3 shows root The operational flow diagram of configuration parameter is updated according to the distributed information system of one example embodiment of the disclosure.
As shown in figure 3, the process that distributed information system carries out the update of configuration parameter is as follows: in S31, starting;? Then S32 reads matching for message from database in S33 message application server when the service of message application server starting It sets parameter and is maintained into configuration parameter in a set of local cache system realized with ConcurrentHashMap in S34;Or In S32 ', when the zookeeper configuration center operated in configuration server-side 3 i.e. zookeeper server-side receive from When the information such as wide area information server update/degradation switch/system configuration, zookeeper configuration center issues database update It notifies to give each message application server (as zookeeper client), then in S33 message application server from database It reads the configuration parameter of message and is maintained into configuration parameter in S34 and delayed with a set of local that ConcurrentHashMap is realized In deposit system;Finally, update terminates in S35.Wherein, ConcurrentHashMap is frequent quilt in the practice of concurrency programming The data structure used allows multiple modifications to operate and concurrently carries out, and key is that data are divided into one using segmentation lock technology The storage of one section of section, then to every one piece of data with a lock, when a thread, which occupies lock, accesses one of segment data It waits, the data of other sections also can be can be realized and really concurrently be accessed by other thread accesses.
According to an example embodiment of the disclosure, wherein requesting party sends message request by information client side 4 and connects Receive message.
According to an example embodiment of the disclosure, wherein database is mysql database.
According to an example embodiment of the disclosure, message is divided into different News Categories, the message of the same category Using identical configuration parameter.
According to an example embodiment of the disclosure, message template corresponding with News Category, messages application service are established Device generates message using message template corresponding with News Category belonging to message request.Access new information messages application clothes every time As long as required and optional parameters can be obtained according to its affiliated template of the information query in business device, and the function of checking parameter is by unified Tool-class execute;Information client side also need to only know that the corresponding template of message can complete data check.Using message mould System can realize the parameter verification of message using template as dimension no longer using single message as dimension checking parameter after plate.
According to an example embodiment of the disclosure, wherein message template includes that message center shows template, notification bar exhibition Show template, landing page shows template, Android screen locking template, ios force touch template (wherein, ios, that is, apple operation system System;And Force Touch is that Apple Inc. is used for the one of Apple Watch, completely new MacBook and completely new MacBook Pro Item touch sensing technology.By Force Touch, equipment can perceive the dynamics of light pressure and weight, and recall different pairs At least one of answer function) or the small picture and text template of ios.About 3~5 seed type of every kind of template supports more than 30 kinds of bandwagon effects altogether.
In addition, the distributed information system of the disclosure can provide the energy as long as input template type for the third party of access The communication cost of new information access, exploitation test and joint debugging cost is greatly saved in the function of automatically generating access protocol.It is heavier Want be new information access be no longer dependent on information client side hair version, as long as the message newly accessed belongs to existing template, at any time It can access, and old information client side also can receive the message newly accessed.
Powerful dependence in view of the distributed information system using Zookeeper framework to zookeeper, therefore use The survival of zookeeper server-side must be paid close attention to/be monitored to the distributed information system of Zookeeper framework, when monitoring When zookeeper server-side delay machine, it is necessary to which timely distribution of notifications formula message system takes measures using responsible person with extensive as early as possible Multiple zookeeper server-side, such as restarts the server as zookeeper server-side or hot-swap others warm back-up service Device is as new zookeeper server-side.Therefore, in example embodiment below, in order to improve system availability, this public affairs The characteristic for opening temporal order's node using zookeeper is added in the distributed information system using Zookeeper framework Support the zookeeper server-side survival monitoring mechanism of principal and subordinate's hot-swap is with monitor full time zookeeper server-side No survival.
According to an example embodiment of the disclosure, wherein zookeeper client is multiple, each messages application service Device is also zookeeper client simultaneously, had not only received the database update notice that zookeeper server-side issues but also can monitor The survival of zookeeper server-side.Each message application server (as zookeeper client) is by being registered as Temporal order's node of zookeeper, to select the main service whether a monitoring zookeeper server-side survives, and Remaining zookeeper client is used as from whether the main service of service monitoring survives.When whether monitoring zookeeper server-side survives Main service delay machine when, will never be elected to re-electing as from other zookeeper clients of service for main service A survival for continuing to monitor zookeeper server-side as new main service out.Zookeeper server-side survival monitoring mechanism Distributed lock is realized using the characteristic of temporal order's node of zookeeper to support the principal and subordinate under distributed environment fervent It changes, avoids monitoring zookeeper server-side survival service Single Point of Faliure, improve system HA (high availability).
Before being specifically described, the general of transient node, sequential node, HA (high availability) and Single Point of Faliure is first introduced It reads as follows:
Transient node: its life cycle and zookeeper client session binding, if client session fails, that This node will be deleted by zookeeper automatically.
Sequential node: it is therefore named to conceive, if share three zookeeper clients, each zookeeper client 1 sequential node is created under/monitor/ catalogue (assuming that catalogue thus), then zookeeper cluster can be according to client The sequence of node is created to create node, node is respectively/monitor/01 ,/monitor/02 ,/monitor/03.
HA:(High Availability) high availability.A node failure in cluster, its task can pass to Other nodes.Single point failure can be effectively prevented.High-availability cluster is dedicated to providing highly reliable service, that is, utilizes cluster Fault-tolerance externally provides continual service in 7*24 hours.
Single Point of Faliure: a single point break down can feed through to whole system perhaps network so as to cause whole system or The paralysis of network.This is should be avoided when designing IT infrastructure, generally avoids single-point by active and standby and principal and subordinate's two ways Failure.The disclosure avoids Single Point of Faliure using principal and subordinate (master-slave) mode.
It is specifically described below with reference to Fig. 4.
Fig. 4 shows the Zookeeper client in the distributed information system according to one example embodiment of the disclosure Architecture diagram.As shown in figure 4, the temporal order that the information registering of oneself is zookeeper is saved when message application server starts Point, might as well there are three message application server as zookeeper client, be set to server1 (message application server 21), server2 (message application server 22), server3 (message application server 23), they are registered in zookeeper Temporal order's node be respectively/monitor/01 ,/monitor/02 ,/monitor/03.The smallest node is at this time Server1 creation /monitor/01 node, it can think that server1 is the main service of master/ to monitor zookeeper Whether server-side survives, and server2 and server3 is whether slave/ is survived from service with monitoring main service, because temporarily Life cycle and zookeeper client (message application server i.e. here) binding session of node, that is to say, that if The failure of zookeeper client session assumes server1 message then this node will be deleted by zookeeper automatically Application server delay machine, then transient node/monitor/01 that zookeeper can register the message application server is deleted It removes, and/monitor/02 has become the smallest node, i.e. server2 is at the main service of master/.Similarly, if server2 Also delay machine, then server3 becomes the main service of master/.
Realize that the principle of distributed lock is as follows using temporal order's node:
It is /temporal order's sub- section of monitor that 1.zookeeper client call create () method, which creates father node, Point.
2.zookeeper client call getChildren ("/monitor ") method obtains all created Child node.
After 3.zookeeper client gets all child node path, if it find that oneself was created in step 1 Node is that serial number is the smallest in all nodes, it is judged that this zookeeper client is locked, then should Zookeeper client becomes the main service of monitoring zookeeper server-side survival.
If 4. find in step 3 oneself not be it is the smallest in all child nodes, illustrate that oneself does not get lock, It then monitors whether the smallest node is survived and waited until when listening to minimum child node Notification of Changes, then carries out child node It obtains, judges whether to obtain lock.
The process for discharging lock is relatively simple, deletes the child node of oneself creation.
Assuming that the probability of separate unit message application server delay machine is 0.25 in message application server cluster, prison is not introduced When control service master-slave swap mechanism, no matter how many platform message application server in cluster, monitoring zookeeper server-side survival Service outage probability be all 0.25, this system be added using zookeeper temporal order node characteristic realize principal and subordinate After hot-swap mechanism, it is assumed that deploy n platform message application server in cluster, then the not available probability of monitoring service are as follows: (0.25)n.It can be seen that (ought have 8 message above application clothes when message application server quantity n reaches 8 or more in cluster When being engaged in device as zookeeper client), the not available probability of monitoring service is less than 0.0000001%, and when n is bigger, The not available probability of monitoring service is smaller, the limit 0.
By above detailed description, those skilled in the art according to the system of the embodiment of the present disclosure it can be readily appreciated that have Have the advantages that one or more of following.
According to some example embodiments of the disclosure, the high-availability cache system of high concurrent is supported by design, is passed through Configuration server-side dynamic issues that database update is notified to all message application servers and trigger the server is reloaded automatically Database is configured to local cache, avoids using bring problems are restarted, improves system availability.
According to some example embodiments of the disclosure, by the way that all message are sorted out by template, and by each template Configuration must be changed in the database by hard coded with optional parameters.As long as access new information server-side is looked into according to the message every time Asking its affiliated template can be obtained required and optional parameters, and the function of checking parameter is executed by unified tool-class;Client End also need to only know that the corresponding template of message can complete data check.
It is utilized according to some example embodiments of the disclosure by zookeeper server-side survival monitoring mechanism The characteristic of temporal order's node of zookeeper realizes distributed lock to support principal and subordinate's hot-swap under distributed environment, keeps away Exempt to monitor zookeeper server-side survival service Single Point of Faliure.
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (11)

1. a kind of distributed information system, comprising:
Database, for storing the configuration parameter of message;
Multiple message application servers, for generating information and sending to request according to the message request and configuration parameter of requesting party Side;
Server-side is configured, is used for when database update, Xiang Suoyou message application server issues database update notice, so that Message application server reads the configuration parameter updated from database and is written in message application server local cache;
Corresponding configuration parameter is read from local cache when wherein message application server generates message.
2. system according to claim 1, which is characterized in that when the message application of message application server starts When, message application server reads configuration parameter from database and is written in message application server local cache.
3. system according to claim 1, which is characterized in that message is divided into different News Categories, the same category Message use identical configuration parameter.
4. system according to claim 3, which is characterized in that establish message template corresponding with News Category, message is answered Message is generated using message template corresponding with News Category belonging to message request with server.
5. system according to claim 4, which is characterized in that wherein message template includes that message center shows template, is led to Know that column shows template, landing page shows template, Android screen locking template, in ios force touch template or the small picture and text template of ios At least one.
6. system according to claim 1, which is characterized in that wherein configuring server-side is zookeeper server-side, each Message application server is also used as zookeeper client simultaneously.
7. system according to claim 6, which is characterized in that wherein Zookeeper client registers are Zookeeper's Temporal order's node.
8. system according to claim 7, which is characterized in that a conduct in plurality of zookeeper client The main service whether monitoring zookeeper server-side survives, remaining zookeeper client, which is used as from the main service of service monitoring, is No survival, when main service delay machine, several compete again from service and elect one as new main service, to continue to supervise Whether control zookeeper server-side survives.
9. system according to claim 8, wherein several compete again from service and elect one as new master Service includes: one the smallest using several as the serial number of temporal order's node from the Zookeeper client of service As new main service.
10. system according to claim 1, which is characterized in that wherein requesting party sends message by information client side and asks It asks and receives message.
11. system according to claim 1, which is characterized in that wherein database is mysql database.
CN201810014768.2A 2018-01-08 2018-01-08 Distributed messaging system Active CN110022257B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810014768.2A CN110022257B (en) 2018-01-08 2018-01-08 Distributed messaging system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810014768.2A CN110022257B (en) 2018-01-08 2018-01-08 Distributed messaging system

Publications (2)

Publication Number Publication Date
CN110022257A true CN110022257A (en) 2019-07-16
CN110022257B CN110022257B (en) 2023-04-07

Family

ID=67187395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810014768.2A Active CN110022257B (en) 2018-01-08 2018-01-08 Distributed messaging system

Country Status (1)

Country Link
CN (1) CN110022257B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112035164A (en) * 2020-09-03 2020-12-04 中国银行股份有限公司 Method for updating node configuration of distributed system, application node and control node
CN112084065A (en) * 2020-08-24 2020-12-15 贵州易鲸捷信息技术有限公司 EsgynDB database-based rolling restart method
CN112463514A (en) * 2019-09-06 2021-03-09 北京京东尚科信息技术有限公司 Monitoring method and device for distributed cache cluster
CN113364822A (en) * 2020-03-05 2021-09-07 北京沃东天骏信息技术有限公司 Cache data updating method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073720A1 (en) * 2005-09-29 2007-03-29 Teamon Systems, Inc. Email Server for Processing a Threshold Number of Email Jobs for a Given User and Related Methods
CA2590581A1 (en) * 2007-05-31 2008-11-30 Strategic Connections Lead distribution and tracking with integrated corporate data usage and reporting capabilities with message templating
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN102739720A (en) * 2011-04-14 2012-10-17 中兴通讯股份有限公司 Distributed cache server system and application method thereof, cache clients and cache server terminals
CN103500173A (en) * 2013-09-03 2014-01-08 北京泰乐德信息技术有限公司 Method for inquiring rail transit monitoring data
CN105100200A (en) * 2015-06-02 2015-11-25 北京京东尚科信息技术有限公司 Method and system for distributed deployment, unified configuration and automatic adaptation
US20160261727A1 (en) * 2015-03-06 2016-09-08 Connie W. Yang Systems and methods of streaming data
CN106878053A (en) * 2016-12-22 2017-06-20 努比亚技术有限公司 A kind of config update devices and methods therefor based on ZOOKEEPER

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070073720A1 (en) * 2005-09-29 2007-03-29 Teamon Systems, Inc. Email Server for Processing a Threshold Number of Email Jobs for a Given User and Related Methods
CA2590581A1 (en) * 2007-05-31 2008-11-30 Strategic Connections Lead distribution and tracking with integrated corporate data usage and reporting capabilities with message templating
CN102739720A (en) * 2011-04-14 2012-10-17 中兴通讯股份有限公司 Distributed cache server system and application method thereof, cache clients and cache server terminals
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster
CN103500173A (en) * 2013-09-03 2014-01-08 北京泰乐德信息技术有限公司 Method for inquiring rail transit monitoring data
US20160261727A1 (en) * 2015-03-06 2016-09-08 Connie W. Yang Systems and methods of streaming data
CN105100200A (en) * 2015-06-02 2015-11-25 北京京东尚科信息技术有限公司 Method and system for distributed deployment, unified configuration and automatic adaptation
CN106878053A (en) * 2016-12-22 2017-06-20 努比亚技术有限公司 A kind of config update devices and methods therefor based on ZOOKEEPER

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王成耀: "一个可重用的应用服务器框架的设计与实现", 《计算机工程与设计》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112463514A (en) * 2019-09-06 2021-03-09 北京京东尚科信息技术有限公司 Monitoring method and device for distributed cache cluster
CN113364822A (en) * 2020-03-05 2021-09-07 北京沃东天骏信息技术有限公司 Cache data updating method and device
CN112084065A (en) * 2020-08-24 2020-12-15 贵州易鲸捷信息技术有限公司 EsgynDB database-based rolling restart method
CN112084065B (en) * 2020-08-24 2024-02-20 贵州易鲸捷信息技术有限公司 Rolling restarting method based on EsgynDB database
CN112035164A (en) * 2020-09-03 2020-12-04 中国银行股份有限公司 Method for updating node configuration of distributed system, application node and control node

Also Published As

Publication number Publication date
CN110022257B (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US10713135B2 (en) Data disaster recovery method, device and system
CN105703940B (en) Monitoring system and monitoring method for multi-level scheduling distributed parallel computation
CN110022257A (en) Distributed information system
US9984140B1 (en) Lease based leader election system
CN109639794A (en) A kind of stateful cluster recovery method, apparatus, equipment and readable storage medium storing program for executing
CN103973725B (en) A kind of distributed cooperative algorithm and synergist
US7146532B2 (en) Persistent session and data in transparently distributed objects
US8856091B2 (en) Method and apparatus for sequencing transactions globally in distributed database cluster
US20090292759A1 (en) Event server using clustering
Botelho et al. Smartlight: A practical fault-tolerant SDN controller
CN112230987B (en) Distributed modular plug-in frame realization system and method
CN106209943A (en) The system of selection of communication node and device
CN102843259A (en) Middleware self-management hot backup method and middleware self-management hot backup system in cluster
CN106681861A (en) New environment isolation configuration data management method and system
Santos et al. Distributed metadata with the AMGA metadata catalog
US20150324222A1 (en) System and method for adaptively integrating a database state notification service with a distributed transactional middleware machine
US20240061754A1 (en) Management of logs and cache for a graph database
CN112087506B (en) Cluster node management method and device and computer storage medium
CN116346834A (en) Session synchronization method, device, computing equipment and computer storage medium
Yang et al. Multi-Active Multi-Datacenter Distributed Database Architecture Design based-on Secondary Development Zookeeper
Vogels et al. An overview of the galaxy management framework for scalable enterprise cluster computing
CN113742336A (en) Data processing method and device and storage medium
Pham et al. An evaluation of zookeeper for high availability in system S
Suh et al. Towards reliable intelligent transportation systems for e-government
US20240106907A1 (en) Entity for implementing a service in a network, application device, and method for executing an operation of a service

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