CN108363619A - Service procedure control method, server and computer readable storage medium - Google Patents

Service procedure control method, server and computer readable storage medium Download PDF

Info

Publication number
CN108363619A
CN108363619A CN201810189941.2A CN201810189941A CN108363619A CN 108363619 A CN108363619 A CN 108363619A CN 201810189941 A CN201810189941 A CN 201810189941A CN 108363619 A CN108363619 A CN 108363619A
Authority
CN
China
Prior art keywords
service
node
configuration information
zookeeper
control method
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
CN201810189941.2A
Other languages
Chinese (zh)
Other versions
CN108363619B (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.)
Shenzhen Coocaa Network Technology Co Ltd
Original Assignee
Shenzhen Coocaa Network 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 Shenzhen Coocaa Network Technology Co Ltd filed Critical Shenzhen Coocaa Network Technology Co Ltd
Priority to CN201810189941.2A priority Critical patent/CN108363619B/en
Publication of CN108363619A publication Critical patent/CN108363619A/en
Application granted granted Critical
Publication of CN108363619B publication Critical patent/CN108363619B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a kind of service procedure control method, server and computer readable storage medium, wherein service procedure control method includes:Receive the operation request of service, and the service is accessed into zookeeper, judge the node configuration information that the service whether is stored in zookeeper, if being stored with the node configuration information of the service in zookeeper, the configuration information is then obtained, the service procedure is controlled according to the configuration information;By the configuration information of the node of the service stored in zookeeper, control services whether each node runs, and to avoid the node that need not be run in service from also running simultaneously, causes server load big, influences the process performance of server.

Description

Service procedure control method, server and computer readable storage medium
Technical field
The present invention relates to a kind of field of computer technology more particularly to service procedure control method, server and computers Readable storage medium storing program for executing.
Background technology
Zookeeper is one distributed, the distributed application program coordination service of open source code, it is one and is Distributed Application provides the software of Consistency service, and the function of providing includes:Configuring maintenance, name Service, distributed synchronization, Group service etc..One zookeeper server can connect more application servers.One service includes multiple service operations Node, and each service operation node is run in a wherein application server.
Important complex services have many flows, these flows to be divided into as main flow and secondary stream in the Internet, applications Journey, main flow are crucial, and in being serviced at one, secondary flow may be necessarily in certain running environment;So taking Whole flow process is run in business operational process, larger load can be brought to server, seriously affects the process performance of server.
Invention content
The main purpose of the present invention is to provide a kind of service procedure control method, server and computer-readable storages Medium, it is intended to solve when servicing in operating status, whether the flow in dynamic control service carries out, to reduce clothes The resource consumption of business device.
To achieve the above object, the embodiment of the present invention provides a kind of service procedure control method, the service procedure control Method includes:
The operation request of service is received, and the service is accessed into zookeeper;
Judge whether service switch node table in zookeeper is stored with the node configuration information of the service;
If service switch node table is stored with the node configuration information of the service in zookeeper, the section is obtained Point configuration information controls the service according to the node configuration information and opens main flow, disables secondary flow.
Optionally, the node configuration for judging service switch node table in zookeeper and whether being stored with the service After the step of information, further include:
The original state of configuration information is controlled based on each service procedure, generates template table, and the template table is stored Into database.
Optionally, the original state that configuration information is controlled based on each service procedure, generates template table, and by institute After stating template table storage to the step in database, further include:
If service switch node table is not stored with the node configuration information of the service in the zookeeper, call Template table in database reads the configuration information of each node of the service in template table, and the configuration information is stored to clothes It is engaged in switching node table.
Optionally, after the storage to the step in service switch node table by the configuration information, further include:
Create the control node of the service on zookeeper, and by service node described in service switch node table In configuration information storage to the control node, control zookeeper monitors the service.
Optionally, described that the service unlatching main flow is controlled according to the node configuration information, disable the step of secondary flow Suddenly include:
Judge the setting state of the service node configuration information;
If setting state to open, the node flow is run, which is main flow;
If setting state as disabling, the node flow is not run, which is secondary flow.
Optionally, the service procedure control method further includes:
It is asked based on modification, service node configuration information in service node switch list is extracted;
Service node configuration information in service node switch list is changed, and the configuration information of modification is corresponded to and is stored Into service node switch list, new service node switch list is obtained.
Optionally, service node configuration information in the modification service node switch list, and confidence will be matched described in modification After breath corresponds to the step of storing into service node switch list, obtaining new service node switch list, including:
The new service node switch list is corresponded to storage to correspond in control node to zookeeper, is updated Zookeeper corresponds to the node configuration information of the service in control node.
Optionally, the service procedure control method further includes:
When the node configuration information of the service stored in zookeeper nodes is changed, changed based on preset node In the configuration information update changed described in Service controll to corresponding zookeeper nodes.
The present invention also provides a kind of server, the server includes:One or more processors;Memory, for depositing The one or more programs of storage, when one or more of programs are executed by one or more of processors so that one Or multiple processors realize above-mentioned service procedure control method.
The present invention also provides a kind of computer readable storage mediums, which is characterized in that the computer readable storage medium On be stored with service procedure control program, service procedure control program realizes above-mentioned service flow when being executed by processor The step of process control method.
The present invention is asked by receiving the operation of service, and the service is accessed zookeeper, judges zookeeper In whether be stored with the node configuration information of the service, if be stored in zookeeper the service node match confidence Breath, then obtain the configuration information, and the service procedure is controlled according to the configuration information;Pass through what is stored in zookeeper The configuration information of the node of service, control service whether each node runs, to avoid the node that need not be run in service Also it runs simultaneously, causes server load big, influence the process performance of server.
Description of the drawings
The structural schematic diagram of Fig. 1 optional servers of each embodiment one to realize the present invention;
Fig. 2 is the flow diagram of one embodiment of service procedure control method of the present invention;
Fig. 3 is the flow diagram of another embodiment of service procedure control method of the present invention;
Fig. 4 is the flow diagram of the another embodiment of service procedure control method of the present invention;
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to limit this hair It is bright.
In subsequent description, using for indicating that the suffix of such as " module ", " component " or " unit " of element is only The explanation for being conducive to the present invention, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix Ground uses.
As shown in Figure 1, the structural schematic diagram for the server that Fig. 1, which is the embodiment of the present invention, to be related to.
Fig. 1 shows the block diagram of the exemplary servers 1 suitable for being used for realizing embodiment of the present invention.The clothes that Fig. 1 is shown Business device 1 is only an example, should not bring any restrictions to the function and use scope of the embodiment of the present invention.
As shown in Figure 1, server 1 is showed in the form of universal computing device.The component of server 1 may include but not It is limited to:One or more processor or processing unit 12, system storage 11, connection different system component (including system Memory 11 and processing unit 12) bus 15.
Bus 15 indicates one or more in a few class bus structures, including memory bus or Memory Controller, Peripheral bus, graphics acceleration port, processor or the local bus using the arbitrary bus structures in a variety of bus structures. For example, these architectures include but not limited to industry standard architecture (ISA) bus, microchannel architecture (MAC) bus, enhanced isa bus, Video Electronics Standards Association (VESA) local bus and peripheral component interconnection (PCI) Bus.
Server 1 typically comprises a variety of computer system readable media.These media can any can be serviced The usable medium that device 1 accesses, including volatile and non-volatile media, moveable and immovable medium.
System storage 11 may include the computer system readable media of form of volatile memory, such as deposit at random Access to memory (RAM) 111 and/or cache memory 112.Server 1 may further include it is other it is removable/can not Mobile, volatile/non-volatile computer system storage medium.Only as an example, storage system 113 can be used for reading and writing Immovable, non-volatile magnetic media (Fig. 1 do not show, commonly referred to as " hard disk drive ").It, can although being not shown in Fig. 1 To provide for the disc driver to moving non-volatile magnetic disk (such as " floppy disk ") read-write, and to removable non-easy The CD drive that the property lost CD (such as CD-ROM, DVD-ROM or other optical mediums) is read and write.In these cases, often A driver can be connected by one or more data media interfaces with bus 15.Memory 11 may include at least one There is one group of (for example, at least one) program module, these program modules to be configured to perform for a program product, the program product The function of various embodiments of the present invention.
Program/utility 114 with one group of (at least one) program module 1141, can be stored in and for example store In device 11, such program module 1141 includes but not limited to operating system, one or more application program, other programs Module and program data may include the realization of network environment in each or certain combination in these examples.Program mould Block 1141 usually executes function and/or method in embodiment described in the invention.
Server 1 can also be communicated with one or more external equipments 3 (such as keyboard, sensing equipment, display 2 etc.), Can also enable a user to the equipment interacted with the server 1 communication with one or more, and/or with enable the server 1 Any equipment (such as network interface card, modem etc.) communication communicated with one or more of the other computing device.It is this Communication can be carried out by input/output (I/O) interface 13.Also, server 1 can also pass through network adapter 3 and one Or multiple networks (such as LAN (LAN), wide area network (WAN) and/or public network, such as internet) communication.As schemed Show, network adapter 14 is communicated by bus 15 with other modules of server 1.It should be understood that although not shown in the drawings, can To combine server 1 to use other hardware and/or software module, including but not limited to:Microcode, device driver, at redundancy Manage unit, external disk drive array, RAID system, tape drive and data backup storage system etc..
Processing unit 12 is stored in program in system storage 11 by operation, to perform various functions using with And data processing, such as realize the service configuration method that the embodiment of the present invention is provided.
As shown in Figure 1, as a kind of computer storage media, one or more computer-readable media may be used Arbitrary combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It calculates Machine readable storage medium storing program for executing for example may be-but not limited to-electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, Device or device, or the arbitrary above combination.The more specific example (non exhaustive list) of computer readable storage medium Including:Electrical connection, portable computer diskette, hard disk, random access memory (RAM) with one or more conducting wires, only Read that memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc is read-only deposits Reservoir (CDROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer Readable storage medium storing program for executing, which can be any, includes or the tangible medium of storage program, which can be commanded execution system, device Either device use or in connection.
Computer-readable signal media may include the data letter propagated in a base band or as a carrier wave part Number, wherein carrying computer-readable program code.The data-signal of this propagation may be used diversified forms, including but It is not limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be calculating Any computer-readable medium other than machine readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit For by instruction execution system, device either device use or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but not It is limited to wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
It can be write with one or more programming languages or combinations thereof for executing the computer that operates of the present invention Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++, Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with Fully execute, partly execute on the user computer on the user computer, being executed as an independent software package, Part executes or executes on a remote computer or server completely on the remote computer on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including LAN (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Based on above-mentioned server architecture, computer readable storage medium and communication network, service procedure of the present invention is proposed Control method and each embodiment of server.
The present invention provides a kind of service procedure control method, in one embodiment of service procedure control method, reference Fig. 2, This method includes:
Step S10, receives the operation request of service, and the service is accessed zookeeper;
When a certain service is triggered, into operational process, at this point, the service sends out operation request, when receiving the operation After request, which is linked on zookeeper, zookeeper realizes the monitoring to operation service.Service is same Period sends once operation request, and the operation of difference service is asked after being sent to zookeeper, corresponding storage to the service In control node in zookeeper.
Step S20 judges whether service switch node table is stored with the node of the service with confidence in zookeeper Breath;
Node configuration information, the information that service procedure control process includes, including address, service, unlatching, disabling, moment Point and operation sequential etc., the unlatching of the node predominantly serviced in the present invention or disabling.Service node switch list, storage The configuration information of each node, i.e., each node each serviced correspond to the state opened or disabled in each service.
The node configuration information of service is stored in the control node in zookeeper, when the operation that a certain service is sent out Request is received by zookeeper, and the node configuration information for whether being stored with the corresponding service is retrieved on zookeeper.
Step S30 is obtained if service switch node table is stored with the node configuration information of the service in zookeeper The node configuration information is taken, controlling the service according to the node configuration information opens main flow, disables secondary flow.
On the basis of above-mentioned steps, the case where for being stored with respective service node configuration information on zookeeper Under, the configuration information is obtained, in storage to local cache, and the whole flow process of the service is carried out according to the configuration information Control opens the main flow that must be run, disables nonessential secondary flow, to avoid the load excessive of service, influences to service The treatment effeciency of device.
Supplemented by assistant's solution include first as one example, such as a service A flow a1, a2, a3, a4 and a5 five in service A A flow, that is, it includes the node that five needs control to service A.Service A sends out operation request, and is stored on zookeeper The node configuration information I of A is serviced, the a1 stored in configuration information I is main flow, and state is to open, and a2 is main flow, shape State is to open, and a3 and a4 are secondary flow, and state is disabling, and a5 is main flow, and state is to open;At this point, reading the configuration information I controls the operational process for servicing A, then service A operations wherein a1, a2 and a5 flow, does not run a3 and a4 flows.
In the present embodiment, it is asked by receiving the operation of service, and the service is accessed into zookeeper, judged Whether the node configuration information of the service is stored in zookeeper, if being stored with the section of the service in zookeeper Point configuration information, then obtain the configuration information, and the service procedure is controlled according to the configuration information;Pass through zookeeper The configuration information of the node of the service of middle storage, control service whether each node runs, to avoid need not being transported in service Capable node is also run simultaneously, and causes server load big, influences the process performance of server.
Optionally, in another embodiment of service procedure control method of the present invention, step S20, the judgement Whether service switch node table was stored with after the step of node configuration information of the service in zookeeper, further included:
Step S21 controls the original state of configuration information based on each service procedure, generates template table, and by the mould In the storage to database of plate table.
Original state, services the original state of each flow, for example, the original state for servicing all flows is to open. So, the node configuration information that will open the service of this original state generates template table, and the template table is stored to data In library.
Described in step S21 based on each service procedure control configuration information original state, generate template table the step of it Afterwards, further include:
Step S22, if service switch node table is not stored with the node of the service with confidence in the zookeeper Breath then calls template table in database, reads the configuration information of each node of the service in template table, and described will match confidence In breath storage to service switch node table.
Service request for the operation received, but the node configuration information of the service is not stored in On zookeeper, then, it at this time can not be according to service node switch list interior joint configuration information to the flow section of the service Point is controlled.That is, the node for not storing the service in service node switch list in the examples above is related Configuration information reads template table interior joint configuration information, it is each that the service is arranged at this point it is possible to call the template table in database The configuration information of a node, and the node configuration information of the service of setting is stored again in service switch node table, Obtain new service node switch list.
On the basis of the template table obtained in above-mentioned steps, corresponding extraction services the configuration information of each node, and It will be in configuration information storage to service node switch list.The service node switch list is stored onto zookeeper, i.e., when certain One service sends out operation request, and the node configuration information of the service is stored in service node switch list, then Zookeeper controls the operating status of the service according to service node switch list.
For example, above-mentioned template table is:
Service Node 1 Node 2 Node N
A A1 (unlatching) A2 (disabling) AN (unlatching)
B B1 (unlatching) B2 (unlatching) BN (disabling)
N N1 (disabling) N2 (unlatching) NN (unlatching)
Service node switch list is:
Service Node 1 Node 2 Node N
A A1 (unlatching) A2 (disabling) AN (unlatching)
B B1 (unlatching) B2 (unlatching) BN (disabling)
C C1 (unlatching) C2 (unlatching) CN (disabling)
D D1 (disabling) D2 (unlatching) DN (disabling)
When the service for sending out operation request is X, service X is not stored in above-mentioned service node switch list, from template The configuration information of the extraction service each nodes of X in table, and store into service node switch list, obtain following new service section Point switch list:
Service Node 1 Node 2 Node N
A A1 (unlatching) A2 (disabling) AN (unlatching)
B B1 (unlatching) B2 (unlatching) BN (disabling)
C C1 (unlatching) C2 (unlatching) CN (disabling)
D D1 (disabling) D2 (unlatching) DN (disabling)
X X1 (disabling) X2 (disabling) XN (unlatching)
Step S23, creates the control node of the service on zookeeper, and by the service node configuration information It stores in the control node, zookeeper monitors the service.
For above-mentioned service X, the control node of a control service X, the control node are newly created on zookeeper The node configuration information of storage service X, then, zookeeper matches confidence according to the node of the service X stored in control node Breath, the operational process to servicing X are monitored and are controlled.
For the control node on zookeeper, only asks when service sends out operation, just created on zookeeper Corresponding control node, the control node store the node configuration information of respective service.
In the present embodiment, the original state that template table records each service node is established, is built and is serviced according to template table Node Switch table stores the configuration information of each each node of service, to avoid not deposited during service operation Unlatching or disabling that the service in service node switch list is unable to control its flow are stored up, is realized to service node switch list Update, furthermore the storage of the node configuration information of the service is realized into the control to the service procedure in zookeeper.And And operation request only is sent out in service, corresponding control node is just created on zookeeper, reduces zookeeper's Load, promotes the treatment effeciency of zookeeper.
Optionally, in another embodiment of service procedure control method of the present invention, according to the section described in step S30 Point configuration information controls the step of service opens main flow, disables secondary flow:
Judge the setting state of the service node configuration information;
If setting state to open, the node flow is run, which is main flow;
If setting state as disabling, the node flow is not run, which is secondary flow.
By judging the setting state in service node configuration information, and then determine that node setting is to open or prohibit With, and then the operating status of control node, then, the node of operation is the main flow of the service, and the node of disabling is should The secondary flow of service.
Optionally, in another embodiment of service procedure control method of the present invention, as shown in figure 4, the service flow is program-controlled Method processed further includes:
Step S40 extracts service node switch list interior joint configuration information based on modification request;
Step S41 changes service node configuration information in service node switch list, and by the configuration information of modification In corresponding storage to service node switch list, new service node switch list is obtained.
Service node configuration information in service node switch list is extracted, the node of the service is configured Information is modified according to demand, i.e., inconsistent with the node configuration information of the service stored before, by the clothes after modification The node configuration information of business corresponds in storage to service node switch list, and then obtains new service node switch list.
For example, for service A, a1 (unlatching) in above-mentioned service node switch list, a2 (disabling) ... aN (unlatching);It is right The node configuration information of service A is modified according to new demand, is revised as a1 (disabling), a2 (unlatching) ... aN (disabling);That , at this point, obtaining new service node switch list:
Service Node 1 Node 2 Node N
A A1 (disabling) A2 (unlatching) AN (disabling)
B B1 (unlatching) B2 (unlatching) BN (disabling)
C C1 (unlatching) C2 (unlatching) CN (disabling)
D D1 (disabling) D2 (unlatching) DN (disabling)
The new service node switch list is corresponded to storage and is corresponded in control node to zookeeper, more by step S42 New zookeeper corresponds to the node configuration information of the service in control node.
By the node configuration information a1 (disabling) of the above-mentioned service A newly obtained, the corresponding storages of a2 (unlatching) ... aN (disabling) Onto the control node in zookeeper, the node configuration information of the service A before covering or deletion updates The node configuration information of A is serviced on zookeeper.When receiving the operation request of service A again, zookeeper is according to service A New node configuration information, the node flow to servicing A control.
Supplemented by assistant Xie Xiugai service node configuration information, now lift scene an application example, by each service with it is each The on off state of each node of service is extracted from service node switch list, and provides the button of modification state.When wanting When changing some on off state, then selection service first selects node, selects the switch to be changed, clicks unlatching/taboo After button, the on off state of corresponding with service node is changed.After the on off state modification of service node, further, service section The configuration information of the service node is modified in point switch list, then changes the configuration in zookeeper for control node Information.Once the configuration information for corresponding to control node in zookeeper is changed, the node monitoring in service can obtain quilt Data after change, then in local cache more new demand servicing Node Switch configuration information.
In the present embodiment, when needing the node configuration information to a certain service to modify, the service is directly changed Configuration information, the configuration information after changing stores again in zookeeper in corresponding control node, without restarting The control new to the node of the service can be realized in the service.Further, the convenience controlled service node is optimized, It avoids after the node configuration information of modification service, needs the service of restarting that could realize and new control is realized to service Tedious steps.
Optionally, in another embodiment of service procedure control method of the present invention, the service procedure control method is also wrapped It includes:
When the node configuration information of the service stored in zookeeper nodes is changed, changed based on preset node In the configuration information update changed described in Service controll to corresponding zookeeper nodes.
The i.e. preset node modification service of a special services is extracted, is specially provided to zookeeper nodes Change because directly operating zookeeper and dangerous, and stored after the serializing of zookeeper node datas, So content can not be found out by being directly viewable, need to pass through procedure operation.
Supplemented by assistant solve the present invention, now as one example to service procedure control method of the present invention realize process be described. By taking a control data are sent to the switch (QUEUE_WRITE_SWITCH) of message queue as an example:
step1:In database masterplate table, it is inserted into the record of QUEUE_WRITE_SWITCH nodes, on off state is set It is set to disabling;
step2:In service routine, local switchgear distribution class increases attribute QUEUE_WRITE_SWITCH, and acquiescence is not assigned Value;
step3:Zokeeper node paths are the/addresses config/switchNode/ service ip, but this node will not It creates in advance, but has service-creation;
step4:Service starts, and obtains the data of node/addresses config/switchNode/ service ip, and creating should The monitoring of node;If node data is sky, then step5 is executed, otherwise, arrives step6;
step5:The node for obtaining the service in masterplate table, is written in the service node switch list of database, records The addresses zookeeper, service, switchgear distribution.Meanwhile switchgear distribution being written by the object (in the form of map) that key is mapped to value In zookeeper nodes;
step6:According to the data obtained from zookeeper, by the attitudinal reflexes of switch QUEUE_WRITE_SWITCH Into local switchgear distribution class, the value that sets a property;
step7:Listening to after data change for service interior joint, can also be reflected, change local switchgear distribution class.
step8:The state of one switch QUEUE_WRITE_SWITCH of modification service is to open.
step9:In management backstage, selection service, the node of reselection service one;
step10:In all switch lists of displaying, switch QUEUE_WRITE_SWITCH is found, clicks and opens;
step11:According to selected service and node, the note of the service node is matched from service node switch list Record;
step12:The record in previous step is changed, is opened the QUEUE_WRITE_SWITCH in switchgear distribution is corresponding Off status is set on;
step13:According to the path of the zookeeper in record, node data is found, and changes key QUEUE_WRITE_ The value of SWITCH is to open, and re-writes zookeeper;
step14:After previous step has executed, step7 will trigger execution;
Pass through above step, so that it may to establish a switch control service, service need not be restarted, so that it may open to change Off status controls program circuit.And different control can be carried out to the different nodes of same service.
The present invention also provides a kind of server, the server includes:One or more processors;Memory, for depositing The one or more programs of storage, when one or more of programs are executed by one or more of processors so that one Or multiple processors realize above-mentioned service procedure control method.
The present invention also provides a kind of computer readable storage medium, clothes are stored on the computer readable storage medium Business Row control program, the service procedure control program realize above-mentioned service procedure control method when being executed by processor The step of.
In the embodiment of server of the present invention and computer readable storage medium, above-mentioned service procedure control is contained The all technical features of each embodiment of method, specification expand and explain that content is respectively implemented with above-mentioned service procedure control method Example is essentially identical, and this will not be repeated here.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non- It is exclusive to include, so that process, method, article or device including a series of elements include not only those elements, But also include other elements that are not explicitly listed, or further include for this process, method, article or device institute Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or device including the element.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but many situations It is lower the former be more preferably embodiment.Based on this understanding, technical scheme of the present invention is substantially in other words to the prior art The part to contribute can be expressed in the form of software products, which is stored in a storage and is situated between In matter (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a mobile terminal (can be mobile phone, calculate Machine, server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited in above-mentioned tools Body embodiment, the above mentioned embodiment is only schematical, rather than restrictive, the ordinary skill of this field Personnel under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, can also make Many forms, all of these belong to the protection of the present invention.

Claims (10)

1. a kind of service procedure control method, which is characterized in that the service procedure control method includes:
The operation request of service is received, and the service is accessed into zookeeper;
Judge whether service switch node table in zookeeper is stored with the node configuration information of the service;
If service switch node table is stored with the node configuration information of the service in zookeeper, obtains the node and match Confidence ceases, and controlling the service according to the node configuration information opens main flow, disables secondary flow.
2. service procedure control method as described in claim 1, which is characterized in that service is opened in the judgement zookeeper Whether artis table was stored with after the step of node configuration information of the service, further included:
The original state of configuration information is controlled based on each service procedure, generates template table, and the template table is stored to number According in library.
3. service procedure control method as claimed in claim 2, which is characterized in that described to be matched based on the control of each service procedure The original state of confidence breath generates template table, and by after template table storage to the step in database, further includes:
If service switch node table is not stored with the node configuration information of the service in the zookeeper, data are called Template table in library reads the configuration information of each node of the service in template table, and the configuration information is stored to service and is opened In artis table.
4. service procedure control method as claimed in claim 3, which is characterized in that described by configuration information storage to clothes It is engaged in after the step in switching node table, further includes:
The control node of the service is created on zookeeper, and service node described in service switch node table is configured In information storage to the control node, control zookeeper monitors the service.
5. service procedure control method as described in claim 1, which is characterized in that described according to the node configuration information control Making the step of service opens main flow, disables secondary flow includes:
Judge the setting state of the service node configuration information;
If setting state to open, the node flow is run, which is main flow;
If setting state as disabling, the node flow is not run, which is secondary flow.
6. service procedure control method as described in claim 1, which is characterized in that the service procedure control method is also wrapped It includes:
It is asked based on modification, service node configuration information in service node switch list is extracted;
Service node configuration information in service node switch list is changed, and the configuration information of modification is corresponded into storage to service In Node Switch table, new service node switch list is obtained.
7. service procedure control method as claimed in claim 6, which is characterized in that taken in the modification service node switch list Business node configuration information, and the configuration information of modification is corresponded in storage to service node switch list, obtain new service After the step of Node Switch table, including:
The new service node switch list is corresponded to storage to correspond in control node to zookeeper, updates zookeeper pairs Answer the node configuration information of the service in control node.
8. service procedure control method as claimed in claims 6 or 7, which is characterized in that the service procedure control method is also Including:
When the node configuration information of the service stored in zookeeper nodes is changed, based on the modification service of preset node In the configuration information update to corresponding zookeeper nodes for controlling the modification.
9. a kind of server, which is characterized in that the server includes:One or more processors;Memory, for storing one A or multiple programs, when one or more of programs are executed by one or more of processors so that one or more A processor realizes such as service procedure control method described in any item of the claim 1 to 8.
10. a kind of computer readable storage medium, which is characterized in that be stored with service flow on the computer readable storage medium Process control program, the service procedure control program are realized when being executed by processor as described in any item of the claim 1 to 8 The step of service procedure control method.
CN201810189941.2A 2018-03-07 2018-03-07 Service flow control method, server, and computer-readable storage medium Active CN108363619B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810189941.2A CN108363619B (en) 2018-03-07 2018-03-07 Service flow control method, server, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810189941.2A CN108363619B (en) 2018-03-07 2018-03-07 Service flow control method, server, and computer-readable storage medium

Publications (2)

Publication Number Publication Date
CN108363619A true CN108363619A (en) 2018-08-03
CN108363619B CN108363619B (en) 2021-11-30

Family

ID=63003884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810189941.2A Active CN108363619B (en) 2018-03-07 2018-03-07 Service flow control method, server, and computer-readable storage medium

Country Status (1)

Country Link
CN (1) CN108363619B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140143367A1 (en) * 2012-11-19 2014-05-22 Board Of Regents, The University Of Texas System Robustness in a scalable block storage system
CN104767641A (en) * 2015-04-01 2015-07-08 北京京东尚科信息技术有限公司 Flow adjusting method, device and system
CN105824618A (en) * 2016-03-10 2016-08-03 浪潮软件集团有限公司 Real-time message processing method for Storm
US20160308721A1 (en) * 2015-04-14 2016-10-20 International Business Machines Corporation Replicating configuration between multiple geographically distributed servers using the rest layer, requiring minimal changes to existing service architecture
CN106911739A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of information dispensing method and device
CN106909456A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of information acquisition method and device
CN106990992A (en) * 2017-04-10 2017-07-28 深圳乐信软件技术有限公司 service configuration method, device, server and storage medium
CN107172230A (en) * 2017-07-24 2017-09-15 北京赛特斯信息科技股份有限公司 The method that service node address is found is realized based on third party database
CN107341051A (en) * 2016-05-03 2017-11-10 北京京东尚科信息技术有限公司 Cluster task coordination approach, system and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140143367A1 (en) * 2012-11-19 2014-05-22 Board Of Regents, The University Of Texas System Robustness in a scalable block storage system
CN104767641A (en) * 2015-04-01 2015-07-08 北京京东尚科信息技术有限公司 Flow adjusting method, device and system
US20160308721A1 (en) * 2015-04-14 2016-10-20 International Business Machines Corporation Replicating configuration between multiple geographically distributed servers using the rest layer, requiring minimal changes to existing service architecture
CN106909456A (en) * 2015-12-22 2017-06-30 北京奇虎科技有限公司 A kind of information acquisition method and device
CN106911739A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of information dispensing method and device
CN105824618A (en) * 2016-03-10 2016-08-03 浪潮软件集团有限公司 Real-time message processing method for Storm
CN107341051A (en) * 2016-05-03 2017-11-10 北京京东尚科信息技术有限公司 Cluster task coordination approach, system and device
CN106990992A (en) * 2017-04-10 2017-07-28 深圳乐信软件技术有限公司 service configuration method, device, server and storage medium
CN107172230A (en) * 2017-07-24 2017-09-15 北京赛特斯信息科技股份有限公司 The method that service node address is found is realized based on third party database

Also Published As

Publication number Publication date
CN108363619B (en) 2021-11-30

Similar Documents

Publication Publication Date Title
EP3403178B1 (en) Identifiers across application instances
CN103971316B (en) Computer system and drawing processing method thereof
US11249788B2 (en) Cloud management platform, and virtual machine management method and system
CN108737424A (en) Authority sharing method, server, system and the readable storage medium storing program for executing of smart home
US11546228B2 (en) Zero-touch configuration of network devices using hardware metadata
CN106031116A (en) Method, apparatus and system for associating NS with VNF
EP3703337A1 (en) Mobile edge host-machine service notification method and apparatus
CN108600344A (en) A kind of network access request dispatching method, device and storage medium
CN103346910A (en) Method and device for managing available mode of servers
US20240314133A1 (en) Restricted operations due to attachment of compute instances owned by different tenancies
WO2022116849A1 (en) Service allocation method, apparatus, electronic device, and storage medium
CN105700421A (en) Apparatus, system and method for allocating identifiers to components of a control system
US9098334B2 (en) Special values in oracle clusterware resource profiles
US11880791B2 (en) Attachment and detachment of compute instances owned by different tenancies
US20220138220A1 (en) Dedicated replication channels for replicating records between regions
CN110851186B (en) Network equipment restarting method and device, electronic equipment and readable storage medium
CN108363619A (en) Service procedure control method, server and computer readable storage medium
CN116032614A (en) Container network micro-isolation method, device, equipment and medium
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
WO2022188509A1 (en) Method and apparatus for task processing in distributed environment, and electronic device and medium
CN114546444A (en) Vehicle upgrading method and device, electronic equipment, medium and automatic driving vehicle
CN110198269B (en) Route synchronization system, method and related device for distributed cluster
CN109426572B (en) Task processing method and device and electronic equipment
CN115878296B (en) Resource management method and device, electronic equipment and readable storage medium
US11797209B2 (en) Storage pool determination system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: Room 2306, east block, Skyworth semiconductor design building, 18 Gaoxin South 4th Road, Gaoxin community, Yuehai street, Nanshan District, Shenzhen, Guangdong 518108

Applicant after: Shenzhen Kukai Network Technology Co.,Ltd.

Address before: 518108 room 1502, block a, South Skyworth building, Shennan Avenue, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: Shenzhen Coocaa Network Technology Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant