CN108134696A - A kind of micro services configuration update method and device - Google Patents
A kind of micro services configuration update method and device Download PDFInfo
- Publication number
- CN108134696A CN108134696A CN201711380801.5A CN201711380801A CN108134696A CN 108134696 A CN108134696 A CN 108134696A CN 201711380801 A CN201711380801 A CN 201711380801A CN 108134696 A CN108134696 A CN 108134696A
- Authority
- CN
- China
- Prior art keywords
- server
- configuration
- configuration file
- micro services
- file
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/55—Push-based network services
Abstract
A kind of micro services configuration update method provided in an embodiment of the present invention and device, belong to field of computer technology.This method includes:First server obtains configuration file;The configuration file is sent to configuration server by the first server, so that preset configuration catalogue is written in the configuration file by the configuration server;The configuration server judges whether the configuration file being completely written to preset configuration catalogue;If so, the configuration server sends PUSH message to messaging bus, so that micro services are updated based on the configuration file under the config directory.By way of more new command is pushed to messaging bus, it is transmitted to accordingly using micro services by messaging bus again, solve the problems, such as a large amount of network flows wastes as caused by micro services timing request obtains more new command, alleviate server pressure and and the server that is needed in the case of equal pressure can reduce to alleviate hardware cost.
Description
Technical field
The present invention relates to field of computer technology, and update method and device is configured in particular to a kind of micro services.
Background technology
With the rising of business complexity and the differentiation of Technical Architecture, the configuration mode of application also proposed higher and higher
Requirement.One typical evolution process is often such, and originally all configurations are placed in code storage together with source code;
Later for security reasons, configuration file is separated or is placed on SVN servers by beating from code storage
It binds foot and originally squeezes under the particular category for the server for applying in packet or being placed directly on operation application, remaining non-document form
Key configuration be then stored in database.Above-mentioned this mode, it is very common in the monomer applications stage, also tend to what can be run
Very well, but the micro services stage has been arrived, in face of the number of applications and number of servers of explosive growth, just seemed helpless.
Therefore, how solve the above problems the technical issues of being current urgent need to resolve
Invention content
A kind of micro services configuration update method provided by the invention and device, it is intended to improve the above problem.
A kind of micro services configuration update method provided by the invention, including:First server obtains configuration file;Described
The configuration file is sent to configuration server by one server, so that the configuration file is written in advance the configuration server
If config directory;The configuration server judges whether the configuration file being completely written to preset configuration catalogue;It is if so, described
Configuration server sends PUSH message to messaging bus so that micro services based on the configuration file under the config directory into
Row update.
Optionally, the configuration file is sent to configuration server by the first server, so that described match
It puts server and preset configuration catalogue is written into the configuration file, including:The first server is looked into based on the configuration file
Micro services matched with the configuration file is looked for identify;The first server identifies the micro services and the configuration file
It is sent to the configuration server;The configuration server is based on micro services mark and the configuration file is written to described
Micro services identify corresponding config directory.
Optionally, the first server obtains configuration file, including:First server obtains storage in the database
Configuration file.
Optionally, the first server obtains configuration file, further includes before:The first server obtains user
The configuration file of upload, and the configuration file is stored into database.
Optionally, it is described if so, the configuration server sends PUSH message to messaging bus, so that micro services are based on
The configuration file under the config directory is updated, and is further included later:The first server obtains configuration file and deletes
Except instruction;The first server is based on the configuration file and deletes the instruction deletion configuration file, and sends second and delete
It instructs to the configuration server;The configuration server is based on the second deleting instruction and deletes under the write-in config directory
The configuration file.
A kind of micro services configuration updating device provided by the invention, including:First acquisition unit obtains for first server
Take configuration file;The configuration file is sent to configuration server by data processing unit for the first server, so that
Preset configuration catalogue is written in the configuration file by the configuration server;Judging unit judges for the configuration server
Whether the configuration file is completely written to preset configuration catalogue;Execution unit, for if so, configuration server transmission pushes away
Message is sent to messaging bus, so that micro services are updated based on the configuration file under the config directory.
Optionally, the data processing unit is specifically used for:The first server be based on the configuration file search with
The matched micro services mark of configuration file;The first server sends micro services mark with the configuration file
To the configuration server;The configuration server be based on the micro services identify by the configuration file be written to it is described in incognito
Business identifies corresponding config directory.
Optionally, the first acquisition unit is specifically used for the configuration text of first server acquisition storage in the database
Part.
Optionally, the first acquisition unit, further includes before;Data uploading unit obtains for the first server
The configuration file of family upload is taken, and the configuration file is stored into database.
Optionally, the execution unit, further includes later:Acquiring unit is instructed, is matched for first server acquisition
It puts file and deletes instruction;Instruction process unit is based on the configuration file for the first server and deletes instruction deletion institute
Configuration file is stated, and sends second deleting instruction to the configuration server;Instruction execution unit, for the configuration server
The configuration file being written under the config directory is deleted based on the second deleting instruction.
A kind of micro services configuration update method and device that the invention described above provides, first pass through first server and obtain configuration
File, then the configuration file is sent to configuration server by the first server, so that the configuration server is by institute
Configuration file write-in preset configuration catalogue is stated, judges whether completely to write the configuration file finally by the configuration server
Enter preset configuration catalogue;If so, the configuration server sends PUSH message to messaging bus, so that micro services are based on described match
The configuration file put under catalogue is updated.So that under non-development environment application configuration confidentiality, avoid by
Source code is written in key configuration.And causing the isolation of the application configuration under different deployed environments, such as nonproductive environment is matched
It puts and cannot be used for production environment.And the consistency of the server application configuration under same deployed environment, i.e. Servers-all
Use same a configuration.And under distributed environment application configuration manageability, that is, provide remote management configuration ability.
And it is transmitted to accordingly using micro services, solution by way of more new command is pushed to messaging bus, then by messaging bus
The problem of a large amount of network flows as caused by micro services timing request acquisition more new command of having determined waste alleviates the pressure of server
Power and and the server that is needed in the case of equal pressure can reduce to alleviate hardware cost.
For the above objects, features and advantages of the present invention is enable to be clearer and more comprehensible, preferred embodiment cited below particularly, and coordinate
Appended attached drawing, is described in detail below.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be to needed in the embodiment attached
Figure is briefly described, it should be understood that the following drawings illustrates only certain embodiments of the present invention, therefore is not construed as pair
The restriction of range, for those of ordinary skill in the art, without creative efforts, can also be according to this
A little attached drawings obtain other relevant attached drawings.
Fig. 1 is the signal that user terminal provided in an embodiment of the present invention, first server and configuration server interact
Figure;
Fig. 2 is the structure diagram of a kind of electronic equipment provided in an embodiment of the present invention;
Fig. 3 is the flow chart that update method is configured in the micro services that first embodiment of the invention provides;
Fig. 4 is the flow chart that update method is configured in the micro services that second embodiment of the invention provides;
Fig. 5 is the high-level schematic functional block diagram that updating device is configured in the micro services that third embodiment of the invention provides;
Fig. 6 is that the present invention the 4th applies the high-level schematic functional block diagram that updating device is configured in the micro services that example provides.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention
In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is
Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
All other embodiments obtained without creative efforts shall fall within the protection scope of the present invention.Therefore,
The detailed description of the embodiment of the present invention to providing in the accompanying drawings is not intended to limit the model of claimed invention below
It encloses, but is merely representative of the selected embodiment of the present invention.Based on the embodiments of the present invention, those of ordinary skill in the art are not having
All other embodiments obtained under the premise of creative work are made, shall fall within the protection scope of the present invention.
As shown in Figure 1, it is that first server, configuration server and user terminal that present pre-ferred embodiments provide carry out
Interactive schematic diagram.The first server 10 by network and one or more user terminals 20 and configuration server 30 into
Row communication connection, with into row data communication or interaction.The first server 10 can be network server, database server
Deng the configuration server 30 can be network server, database server etc..The user terminal 20 can be personal electricity
Brain (personal computer, PC), tablet computer, smart mobile phone, personal digital assistant (personal digital
Assistant, PDA) etc..Wherein, the user terminal 20 is used for through network upload configuration file to the first server
10, configuration file is sent to the configuration server 30, the configuration server 30 by the first server 10 based on network
After the configuration file is completely written to preset configuration catalogue, it is total to message that the configuration server 10 sends PUSH message
Line, so that micro services are updated based on the configuration file under the config directory.
As shown in Fig. 2, the structure diagram for a kind of electronic equipment provided in an embodiment of the present invention.The electronic equipment 300
Including micro services configuration updating device, memory 302, storage control 303, processor 304 and Peripheral Interface 305.
The memory 302, storage control 303, processor 304 and 305 each element of Peripheral Interface are direct between each other
Or be electrically connected indirectly, to realize the transmission of data or interaction.For example, these elements can pass through one or more between each other
Communication bus or signal wire, which are realized, to be electrically connected.Micro services configuration updating device include it is at least one can be with software or firmware
(firmware) form is stored in the memory 302 or is solidificated in the operating system of the electronic equipment 300
Software function module in (operating system, OS).The processor 304 is used to perform what is stored in memory 302
Executable module, such as the software function module or computer program that micro services configuration updating device includes.
Wherein, memory 302 may be, but not limited to, random access memory (Random Access Memory,
RAM), read-only memory (Read Only Memory, ROM), programmable read only memory (Programmable Read-
Only Memory, PROM), erasable read-only memory (Erasable Programmable Read-Only Memory,
EPROM), electricallyerasable ROM (EEROM) (Electric Erasable Programmable Read-Only Memory,
EEPROM) etc..Wherein, memory 302 is for storing program, and the processor 304 is after execute instruction is received, described in execution
Program, the method performed by server 100 that the stream process that aforementioned any embodiment of the embodiment of the present invention discloses defines can answer
For being realized in processor 304 or by processor 304.
Processor 304 may be a kind of IC chip, have the processing capacity of signal.Above-mentioned processor 304 can
To be general processor, including central processing unit (Central Processing Unit, abbreviation CPU), network processing unit
(Network Processor, abbreviation NP) etc.;Can also be digital signal processor (DSP), application-specific integrated circuit (ASIC),
Ready-made programmable gate array (FPGA) either other programmable logic device, discrete gate or transistor logic, discrete hard
Part component.It can realize or perform disclosed each method, step and the logic diagram in the embodiment of the present invention.General processor
Can be microprocessor or the processor can also be any conventional processor etc..
Various input/output devices are coupled to processor 304 and memory 302 by the Peripheral Interface 305.At some
In embodiment, Peripheral Interface 305, processor 304 and storage control 303 can be realized in one single chip.Other one
In a little examples, they can be realized by independent chip respectively.
Referring to Fig. 3, it is the flow chart of micro services configuration update method that first embodiment of the invention provides.It below will be right
Idiographic flow shown in Fig. 3 is described in detail.
Step S101, first server obtain configuration file.
What the configuration file was uploaded by user, for providing a newer file for micro services.Wherein, micro services
It can be application program.Here, it is not especially limited.
In the present embodiment, the first server can obtain the configuration file of storage in the database.Wherein, number
Can be database server according to library.Here, it is not especially limited.
In the present embodiment, the form of the configuration file of storage is obtained by first server, so that in non-exploitation
The confidentiality of application configuration under environment, efficiently avoids key configuration source code is written.
The configuration file is sent to configuration server by step S102, the first server, so that the configuration clothes
Preset configuration catalogue is written in the configuration file by business device.
Wherein, the preset configuration catalogue refers to the catalogue preassigned.The selection of the preset configuration catalogue can be with
Different catalogues is selected according to the difference of each configuration file, fixed config directory can also be selected.Here, it does not limit specifically
It is fixed.
As a kind of embodiment, the first server is based on configuration file lookup and is matched with the configuration file
Micro services mark;Micro services mark is sent to the configuration with the configuration file and serviced by the first server
Device;The configuration server, which identifies the configuration file to be written to micro services mark is corresponding based on the micro services, matches
Put catalogue.
Wherein, the micro services mark can prestore in the database.
In the present embodiment, by the way that configuration file is sent to the configuration server, so that same deployed environment
Under server application configuration consistency, i.e., Servers-all is used is configured, and then brought greatly for user with a
It is convenient.
Step S103, the configuration server judge whether the configuration file being completely written to preset configuration catalogue.
In the present embodiment, the configuration server is by supervising the write-in of configuration file, so as to monitor
Whether configuration file is successfully written to, and effective guarantee is provided for micro services update.For example, when failure is written, pass through hair
Prompt message is sent to first server, so that user can understand the write-in situation for grasping configuration file, so as to which success is real
Now to the update of micro services.Wherein, said write failure can be the write-in configuration file time-out or write-in configuration
During file, occur abnormal etc..Here, it is not specifically limited.For example, after failure is written, in order to delete infirm configuration text
Part, it is preferable that the first server acquisition is input by user to delete instruction, and delete database note based on the deletion instruction
Record and/or storage server in the relevant record of the configuration file.Wherein, the relative recording can be on configuration file
Time either write-in failure cause etc. is passed, here, being not especially limited.
Step S104, if so, the configuration server sends PUSH message to messaging bus, so that micro services are based on described
The configuration file under config directory is updated.
Wherein, the messaging bus refers to message queue, for notifying micro services.
In the present embodiment, by the way that after configuration file is successfully written, PUSH message is sent to messaging bus, so as to make
It obtains and receives the newer message of configuration using micro services, and then latest configuration can be obtained, and be updated from configuration server.From
And in a manner that update PUSH message is pushed to messaging bus, then be transmitted to by messaging bus and apply micro services accordingly,
And then solves the technology that a large amount of network flows as caused by micro services timing request obtains more new command waste in the prior art
Problem, realize the pressure that alleviates server and and the server that is needed in the case of equal pressure can reduce to subtract
The light technique effect of hardware cost.
In the present embodiment, in order to enable after configuration updates, it is rolled back to initial version, it is preferable that work as first server
After getting the configuration version rollback instruction of user terminal transmission, the first server is instructed according to the configuration version rollback
Corresponding configuration file is searched, and configuration file transmission is referred into the configuration server, so that the configuration server will
Target directory is written in the configuration file so that micro services based on the configuration file under the target directory carry out version rollback or
Update.
Referring to Fig. 4, it is the flow chart of micro services configuration update method that second embodiment of the invention provides.It below will be right
Idiographic flow shown in Fig. 4 is described in detail.
Step S201, the first server obtains the configuration file that user uploads, and the configuration file is deposited
In storage to database.
As a kind of embodiment, the configuration file is uploaded to the first server by user by user terminal,
Then the configuration file is stored in the database or is stored in storage server by the first server.
Step S202, first server obtain configuration file.
The configuration file is sent to configuration server by step S203, the first server, so that the configuration clothes
Preset configuration catalogue is written in the configuration file by business device.
Step S204, the configuration server judge whether the configuration file being completely written to preset configuration catalogue.
Step S205, if so, the configuration server sends PUSH message to messaging bus, so that micro services are based on described
The configuration file under config directory is updated.
The specific embodiment of step S202 to step S205 please refer to step corresponding in first embodiment, here, not
It repeats again.
Step S206, the first server obtain configuration file and delete instruction.
Wherein, it is user based on transmitted by user terminal that the configuration file, which deletes instruction, for deleting configuration file.
Step S207, the first server are based on the configuration file and delete the instruction deletion configuration file, concurrently
Second deleting instruction is sent to the configuration server.
Wherein, the second deleting instruction is generated by first server.For example, the second deleting instruction can be worked as
After the first server deletes the completion configuration file, generated.Can also be received in the first server
The configuration file deletes what is generated during instruction.Here, it is not especially limited.
Step S208, the configuration server delete the institute being written under the config directory based on the second deleting instruction
State configuration file.
Referring to Fig. 5, it is the high-level schematic functional block diagram of micro services configuration updating device that third embodiment of the invention provides.
The micro services configuration updating device 400 includes first acquisition unit 410, data processing unit 420, judging unit 430 and holds
Row unit 440.
First acquisition unit 410 obtains configuration file for first server.
The configuration file is sent to configuration server by data processing unit 420 for the first server, so that
Preset configuration catalogue is written in the configuration file by the configuration server.
Wherein, the data processing unit 420 is specifically used for:The first server be based on the configuration file search with
The matched micro services mark of configuration file;The first server sends micro services mark with the configuration file
To the configuration server;The configuration server be based on the micro services identify by the configuration file be written to it is described in incognito
Business identifies corresponding config directory.
Judging unit 430 judges whether the configuration file being completely written to preset configuration for the configuration server
Catalogue.
Execution unit 440, for if so, the configuration server sends PUSH message to messaging bus, so that micro services
It is updated based on the configuration file under the config directory.
Referring to Fig. 6, it is the high-level schematic functional block diagram of micro services configuration updating device that fourth embodiment of the invention provides.
Micro services configuration updating device 500 include data uploading unit 510, first acquisition unit 520, data processing unit 530,
Judging unit 540, execution unit 550, instruction acquiring unit 560, instruction process unit 570 and instruction execution unit 580.
Data uploading unit 510 obtains the configuration file that user uploads, and by the configuration for the first server
File is stored into database.
First acquisition unit 520 obtains configuration file for first server.
Wherein, the first acquisition unit 520 is specifically used for the configuration text of first server acquisition storage in the database
Part.
The configuration file is sent to configuration server by data processing unit 530 for the first server, so that
Preset configuration catalogue is written in the configuration file by the configuration server.
Wherein, the data processing unit 530 is specifically used for:The first server be based on the configuration file search with
The matched micro services mark of configuration file;The first server sends micro services mark with the configuration file
To the configuration server;The configuration server be based on the micro services identify by the configuration file be written to it is described in incognito
Business identifies corresponding config directory.
Judging unit 540 judges whether the configuration file being completely written to preset configuration for the configuration server
Catalogue.
Execution unit 550, for if so, the configuration server sends PUSH message to messaging bus, so that micro services
It is updated based on the configuration file under the config directory.
Acquiring unit 560 is instructed, obtaining configuration file for the first server deletes instruction.
Instruction process unit 570 is based on matching described in configuration file deletion instruction deletion for the first server
File is put, and sends second deleting instruction to the configuration server.
Instruction execution unit 580 is based on matching described in second deleting instruction deletion write-in for the configuration server
Put the configuration file under catalogue.
In conclusion a kind of micro services configuration update method provided by the invention and device, first pass through first server and obtain
Configuration file is taken, then the configuration file is sent to configuration server by the first server, so that the configuration service
Preset configuration catalogue is written in the configuration file by device, is judged whether finally by the configuration server by the configuration file
It is completely written to preset configuration catalogue;If so, the configuration server sends PUSH message to messaging bus, so that micro services are based on
The configuration file under the config directory is updated.So that under non-development environment application configuration confidentiality,
It avoids key configuration source code is written.And cause the isolation of the application configuration under different deployed environments, such as nonproductive ring
The configuration in border cannot be used for production environment.And the consistency of the server application configuration under same deployed environment, i.e., it is all
Server is used to be configured with a.And under distributed environment application configuration manageability, that is, provide remote management configuration
Ability.And it is transmitted to accordingly using micro- by way of more new command is pushed to messaging bus, then by messaging bus
Service solves the problems, such as a large amount of network flow wastes as caused by micro services timing request obtains more new command, alleviates clothes
Be engaged in device pressure and and the server that is needed in the case of equal pressure can reduce to alleviate hardware cost.
In several embodiments provided herein, it should be understood that disclosed device and method can also pass through
Other modes are realized.The apparatus embodiments described above are merely exemplary, for example, flow chart and block diagram in attached drawing
Show the device of multiple embodiments according to the present invention, the architectural framework in the cards of method and computer program product,
Function and operation.In this regard, each box in flow chart or block diagram can represent the one of a module, program segment or code
Part, a part for the module, program segment or code include one or more and are used to implement holding for defined logic function
Row instruction.It should also be noted that at some as in the realization method replaced, the function that is marked in box can also be to be different from
The sequence marked in attached drawing occurs.For example, two continuous boxes can essentially perform substantially in parallel, they are sometimes
It can perform in the opposite order, this is depended on the functions involved.It is it is also noted that every in block diagram and/or flow chart
The combination of a box and the box in block diagram and/or flow chart can use function or the dedicated base of action as defined in performing
It realizes or can be realized with the combination of specialized hardware and computer instruction in the system of hardware.
In addition, each function module in each embodiment of the present invention can integrate to form an independent portion
Point or modules individualism, can also two or more modules be integrated to form an independent part.
If the function is realized in the form of software function module and is independent product sale or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme of the present invention is substantially in other words
The part contribute to the prior art or the part of the technical solution can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, is used including some instructions so that a computer equipment (can be
People's computer, server or network equipment etc.) perform all or part of the steps of the method according to each embodiment of the present invention.
And aforementioned storage medium includes:USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access
The various media that can store program code such as memory (RAM, Random Access Memory), magnetic disc or CD.It needs
It is noted that herein, relational terms such as first and second and the like are used merely to an entity or operation
It is distinguished with another entity or operation, without necessarily requiring or implying between these entities or operation, there are any this
Practical relationship or sequence.Moreover, term " comprising ", "comprising" or its any other variant are intended to nonexcludability
Comprising so that process, method, article or equipment including a series of elements are not only including those elements, but also wrap
Include other elements that are not explicitly listed or further include for this process, method, article or equipment it is intrinsic will
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described
Also there are other identical elements in the process of element, method, article or equipment.
The foregoing is only a preferred embodiment of the present invention, is not intended to restrict the invention, for the skill of this field
For art personnel, the invention may be variously modified and varied.All within the spirits and principles of the present invention, that is made any repaiies
Change, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.It should be noted that:Similar label and letter exists
Similar terms are represented in following attached drawing, therefore, once being defined in a certain Xiang Yi attached drawing, are then not required in subsequent attached drawing
It is further defined and is explained.
Claims (10)
1. update method is configured in a kind of micro services, which is characterized in that including:
First server obtains configuration file;
The configuration file is sent to configuration server by the first server, so that the configuration server is by the configuration
Preset configuration catalogue is written in file;
The configuration server judges whether the configuration file being completely written to preset configuration catalogue;
If so, the configuration server sends PUSH message to messaging bus, so that micro services are based under the config directory
The configuration file is updated.
2. according to the method described in claim 1, it is characterized in that, the first server sends out the configuration file
It send to configuration server, so that preset configuration catalogue is written in the configuration file by the configuration server, including:
The first server is based on the configuration file and searches micro services mark matched with the configuration file;
Micro services mark is sent to the configuration server by the first server with the configuration file;
The configuration server configuration file is written based on micro services mark corresponding to micro services mark
Config directory.
3. according to the method described in claim 1, it is characterized in that, the first server obtains configuration file, including:
First server obtains the configuration file of storage in the database.
4. according to the method described in claim 1, it is characterized in that, the first server obtains configuration file, before also
Including:
The first server obtains the configuration file that user uploads, and the configuration file is stored into database.
It is 5. according to the method described in claim 1, it is characterized in that, described if so, the configuration server transmission push disappears
Breath, so that micro services are updated based on the configuration file under the config directory, further includes later to messaging bus:
The first server obtains configuration file and deletes instruction;
The first server is based on the configuration file and deletes the instruction deletion configuration file, and sends second deleting instruction
To the configuration server;
The configuration server deletes the configuration file being written under the config directory based on the second deleting instruction.
6. updating device is configured in a kind of micro services, which is characterized in that including:
First acquisition unit obtains configuration file for first server;
The configuration file is sent to configuration server, so that described match by data processing unit for the first server
It puts server and preset configuration catalogue is written into the configuration file;
Judging unit judges whether the configuration file being completely written to preset configuration catalogue for the configuration server;
Execution unit, for if so, the configuration server sends PUSH message to messaging bus, so that micro services are based on described
The configuration file under config directory is updated.
7. device according to claim 6, which is characterized in that the data processing unit is specifically used for:
The first server is based on the configuration file and searches micro services mark matched with the configuration file;
Micro services mark is sent to the configuration server by the first server with the configuration file;
The configuration server configuration file is written based on micro services mark corresponding to micro services mark
Config directory.
8. device according to claim 6, which is characterized in that the first acquisition unit is obtained specifically for first server
Take the configuration file of storage in the database.
9. device according to claim 6, which is characterized in that the first acquisition unit further includes before;
Data uploading unit, for the first server obtain user upload configuration file, and by the configuration file into
Row is stored into database.
10. device according to claim 6, which is characterized in that the execution unit further includes later:
Acquiring unit is instructed, obtaining configuration file for the first server deletes instruction;
Instruction process unit is based on the configuration file for the first server and deletes the instruction deletion configuration file,
And second deleting instruction is sent to the configuration server;
Instruction execution unit is based on the second deleting instruction for the configuration server and deletes under the write-in config directory
The configuration file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711380801.5A CN108134696A (en) | 2017-12-15 | 2017-12-15 | A kind of micro services configuration update method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711380801.5A CN108134696A (en) | 2017-12-15 | 2017-12-15 | A kind of micro services configuration update method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108134696A true CN108134696A (en) | 2018-06-08 |
Family
ID=62390718
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711380801.5A Pending CN108134696A (en) | 2017-12-15 | 2017-12-15 | A kind of micro services configuration update method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108134696A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062599A (en) * | 2018-09-11 | 2018-12-21 | 郑州云海信息技术有限公司 | The management method and device of code update under micro services framework |
CN110677475A (en) * | 2019-09-26 | 2020-01-10 | 亿企赢网络科技有限公司 | Micro-service processing method, device, equipment and storage medium |
CN110780979A (en) * | 2019-10-28 | 2020-02-11 | 北京海益同展信息科技有限公司 | Control method and device for configuration under micro-service framework, medium and electronic equipment |
CN111399822A (en) * | 2020-03-17 | 2020-07-10 | 深圳市炎华信息技术有限公司 | Micro-service development method, device, equipment and computer storage medium |
CN112235378A (en) * | 2020-09-29 | 2021-01-15 | 北京三快在线科技有限公司 | Data updating method and device, storage medium and electronic equipment |
CN112579118A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method, device, system, medium and equipment for updating configuration information of microservice |
CN112612541A (en) * | 2020-12-18 | 2021-04-06 | 北京中电普华信息技术有限公司 | Method and device for managing configuration files |
CN112860342A (en) * | 2021-02-10 | 2021-05-28 | 北京百度网讯科技有限公司 | Method, device, equipment, system and storage medium for microservice configuration |
CN115408055A (en) * | 2022-11-01 | 2022-11-29 | 北京领雁科技股份有限公司 | Method and system for generating micro-service item based on single body |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105959390A (en) * | 2016-06-13 | 2016-09-21 | 乐视控股(北京)有限公司 | Unified management system and method of micro services |
CN106533804A (en) * | 2016-12-22 | 2017-03-22 | 成都西加云杉科技有限公司 | Network operation support system |
US20170230349A1 (en) * | 2016-02-04 | 2017-08-10 | International Business Machines Corporation | Microservices inter-operational trust management |
-
2017
- 2017-12-15 CN CN201711380801.5A patent/CN108134696A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20170230349A1 (en) * | 2016-02-04 | 2017-08-10 | International Business Machines Corporation | Microservices inter-operational trust management |
CN105959390A (en) * | 2016-06-13 | 2016-09-21 | 乐视控股(北京)有限公司 | Unified management system and method of micro services |
CN106533804A (en) * | 2016-12-22 | 2017-03-22 | 成都西加云杉科技有限公司 | Network operation support system |
Non-Patent Citations (1)
Title |
---|
我爱大金子: "springClound(20):统一管理微服务配置-刷新配置", 《51CTO博客》 * |
Cited By (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062599A (en) * | 2018-09-11 | 2018-12-21 | 郑州云海信息技术有限公司 | The management method and device of code update under micro services framework |
CN109062599B (en) * | 2018-09-11 | 2021-11-26 | 郑州云海信息技术有限公司 | Management method and device for code update under micro-service architecture |
CN110677475A (en) * | 2019-09-26 | 2020-01-10 | 亿企赢网络科技有限公司 | Micro-service processing method, device, equipment and storage medium |
CN112579118A (en) * | 2019-09-30 | 2021-03-30 | 北京国双科技有限公司 | Method, device, system, medium and equipment for updating configuration information of microservice |
CN110780979A (en) * | 2019-10-28 | 2020-02-11 | 北京海益同展信息科技有限公司 | Control method and device for configuration under micro-service framework, medium and electronic equipment |
CN111399822A (en) * | 2020-03-17 | 2020-07-10 | 深圳市炎华信息技术有限公司 | Micro-service development method, device, equipment and computer storage medium |
CN111399822B (en) * | 2020-03-17 | 2023-08-08 | 深圳市炎华信息技术有限公司 | Micro-service development method, device, equipment and computer storage medium |
CN112235378B (en) * | 2020-09-29 | 2022-12-16 | 北京三快在线科技有限公司 | Data updating method and device, storage medium and electronic equipment |
CN112235378A (en) * | 2020-09-29 | 2021-01-15 | 北京三快在线科技有限公司 | Data updating method and device, storage medium and electronic equipment |
CN112612541A (en) * | 2020-12-18 | 2021-04-06 | 北京中电普华信息技术有限公司 | Method and device for managing configuration files |
WO2022170782A1 (en) * | 2021-02-10 | 2022-08-18 | 北京百度网讯科技有限公司 | Micro-service configuration method and apparatus, electronic device, system, and storage medium |
CN112860342A (en) * | 2021-02-10 | 2021-05-28 | 北京百度网讯科技有限公司 | Method, device, equipment, system and storage medium for microservice configuration |
CN112860342B (en) * | 2021-02-10 | 2024-03-12 | 北京百度网讯科技有限公司 | Method, device, equipment, system and storage medium for micro-service configuration |
CN115408055A (en) * | 2022-11-01 | 2022-11-29 | 北京领雁科技股份有限公司 | Method and system for generating micro-service item based on single body |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108134696A (en) | A kind of micro services configuration update method and device | |
CN106325933B (en) | Batch data synchronous method and device | |
JP6336675B2 (en) | System and method for aggregating information asset metadata from multiple heterogeneous data management systems | |
US9864736B2 (en) | Information processing apparatus, control method, and recording medium | |
CN103902589B (en) | Management method and device for downloaded files | |
US20160171505A1 (en) | Extract, transform, and load (etl) processing | |
CN109522751B (en) | Access right control method and device, electronic equipment and computer readable medium | |
US10938902B2 (en) | Dynamic routing of file system objects | |
US11036590B2 (en) | Reducing granularity of backup data over time | |
CN110895472A (en) | Method and device for identifying service change | |
CN109491962B (en) | File directory tree management method and related device | |
US10855750B2 (en) | Centralized management of webservice resources in an enterprise | |
US20200272642A1 (en) | Information processing apparatus, information processing method, and non-transitory computer readable medium | |
WO2020233013A1 (en) | Data processing method and device, and storage medium | |
CN107633026B (en) | data synchronization exception handling method and device and server | |
US10733148B2 (en) | Predicate based data deletion | |
CN115544050A (en) | Operation log recording method, device, equipment and storage medium | |
CN115757270A (en) | File version management system and method and computer equipment | |
CN103870603A (en) | Directory management method and electronic device | |
CN108595924B (en) | Business authority management method and device, computer equipment and storage medium | |
CN111506646A (en) | Data synchronization method, device, system, storage medium and processor | |
CN112417259A (en) | Media resource processing method, device, equipment and storage medium | |
CN110674137A (en) | Data processing method and device, storage medium and electronic equipment | |
CN107770265A (en) | A kind of method of data synchronization, data synchronization unit and mobile terminal | |
US11614993B1 (en) | System and method for restoring deleted objects and their assignments to other objects based on any deletion of the other objects |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180608 |
|
RJ01 | Rejection of invention patent application after publication |