CN110417598A - The management method and component manager of gateway component - Google Patents

The management method and component manager of gateway component Download PDF

Info

Publication number
CN110417598A
CN110417598A CN201910697048.5A CN201910697048A CN110417598A CN 110417598 A CN110417598 A CN 110417598A CN 201910697048 A CN201910697048 A CN 201910697048A CN 110417598 A CN110417598 A CN 110417598A
Authority
CN
China
Prior art keywords
component
gateway
state
gateway component
manager
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
CN201910697048.5A
Other languages
Chinese (zh)
Other versions
CN110417598B (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.)
Puxin Hengye Technology Development (beijing) Co Ltd
Original Assignee
Puxin Hengye Technology Development (beijing) 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 Puxin Hengye Technology Development (beijing) Co Ltd filed Critical Puxin Hengye Technology Development (beijing) Co Ltd
Priority to CN201910697048.5A priority Critical patent/CN110417598B/en
Publication of CN110417598A publication Critical patent/CN110417598A/en
Application granted granted Critical
Publication of CN110417598B publication Critical patent/CN110417598B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Abstract

This application provides a kind of management methods of gateway component, comprising: component manager obtains gateway component;The component manager is managed whole life cycle state of the gateway component in gateway node;Wherein, whole life cycle state of the gateway component in gateway node includes load, routing binding, operation, unbinding and unloading.By introducing component manager, each life cycle state of gateway component is effectively managed, to realize the unified management to gateway component.So that user can be by component manager, easily management gateway node, to improve the O&M efficiency to the business realized by the micro services network architecture.On the other hand the application additionally provides a kind of component manager corresponded to the above method.

Description

The management method and component manager of gateway component
Technical field
The present invention relates to assembly management technical field, in particular to the management method and assembly management of a kind of gateway component Device.
Background technique
Micro services are a kind of network architectures popular in recent years, are a kind of using single application program as a set of small The method of type service development, every kind of application program are all run in the process of oneself, and are communicated with lightweight mechanism, thus A big business is realized jointly.
In micro services framework, the separation of front and back end generally can be all realized using gateway node.It, can by gateway node Unified processing is carried out to the call request that service call side initiates to realize, such as carries out direction routing, safety certification, current limliting Fusing, log monitoring etc..
Different function provided by gateway node, be realized by the different gateway components in gateway node, so One gateway node usually requires to integrate more gateway component.Also, the different gateway nodes in distributed type assemblies Gateway component can also be shared.But the pipe to gateway component is not all accounted for but in the exploitation of concern component now Reason, so not can guarantee the Life Cycle of gateway component during the gateway node being integrated into gateway component in gateway cluster The consistency of phase state, and but also the O&M efficiency to the business realized by the micro services network architecture is particularly slow.
Summary of the invention
Based on above-mentioned the deficiencies in the prior art, the present invention provides a kind of management method of gateway component and assembly managements Device causes gateway component being integrated into gateway cluster to solve not accounting for the management to gateway component in the prior art In gateway node during, not can guarantee the consistency of the life cycle state of gateway component, and make to by incognito The excessively slow problem of the O&M efficiency for the business that the network architecture of being engaged in is realized.
To achieve the goals above, the present invention provides following technical schemes:
One aspect of the present invention provides a kind of management method of gateway component, comprising:
Component manager obtains gateway component;
The component manager is managed whole life cycle state of the gateway component in gateway node, In, whole life cycle state of the gateway component in gateway node includes load, routing binding, runs, is unbinding And unloading.
Optionally, in the management method of above-mentioned gateway component, the component manager includes global state machine, described Component manager obtains gateway component, comprising:
The component manager loads the file packet of the gateway component from file server;
Alternatively, the component manager downloads the file packet of the gateway component by browser;
The component manager will be under the file packet storage to the folder content of corresponding gateway group of the gateway component;
The component manager stores the state of the gateway component, and by the state synchronized of the gateway component described in In global state machine;
Wherein, the state of the gateway component is editable state;The global state machine is for monitoring the gateway group The state of part, and by the state synchronized of the gateway component monitored to the component manager;The editable state State can be issued for illustrating that the gateway component is in.
Optionally, in the management method of above-mentioned gateway component, the component manager adds the gateway component Load is managed, comprising:
The component manager is receiving when issuing request of front end page transmission, under the gateway component that request is issued It is dealt into all gateway nodes of corresponding gateway group;
Wherein, if the file packet of the gateway component is loaded from the file server, by pushing away gateway component The mode being sent in gateway node issues the gateway component;If the file packet of the gateway component is downloaded by browser, In such a way that notification gateway node downloads the gateway component in a manner of pulling, the gateway component is issued;The front end The page is provided by the component manager;
The component manager receives the state of the gateway component of global state machine feedback, and will be stored The state of the gateway node is updated to the state of the gateway component of the global state machine feedback by editable state;
Wherein, if all gateway nodes in the gateway group all successfully download the gateway component, and institute is successfully parsed Gateway component is stated, then the state for the gateway component that the global state machine is fed back is can operating status;It is described to run shape State is for illustrating that the gateway component can be performed bindings;
If any one gateway node in the gateway group downloads the gateway component failure, the global state machine The state of the gateway component of feedback is to issue abnormality;
If any one gateway node in the gateway group parses the gateway component failure, the global state machine The state of the gateway component of feedback is parsing abnormality.
Optionally, in the management method of above-mentioned gateway component, road of the component manager to the gateway component It is managed by binding, comprising:
The component manager to routing component binder send Common Gateway component and in can operating status net Close the information of component;Wherein, the routing component binder is for realizing the dynamic binding routed with gateway component;
The component manager receive global state machine feedback with the gateway component of Route establishment binding relationship State;Wherein, the state of the gateway component of the global state feedback is operating status, and on the gateway component and road By being fed back after establishing binding relationship;The operating status, and can not for illustrating that the gateway component is in operating status It is unloaded;
The component manager by the state of the gateway component stored by can operating status be updated to operating status.
Optionally, in the management method of above-mentioned gateway component, the component manager ties up the gateway component Fixed release is managed, comprising:
The component manager receives the state of the gateway component of the unbinding relationship of the global state machine feedback;Its In, the state of the gateway component of the global state feedback is off-loadable state, and in the routing component binder solution It is fed back when binding relationship between the routing except the gateway component and bound in it;
The state of the gateway component stored is updated to off-loadable state by operating status by the component manager.
Optionally, in the management method of above-mentioned gateway component, the component manager unloads the gateway component Load is managed, comprising:
The component manager removes the gateway component in off-loadable state from gateway node;
The component manager receives the state of the gateway component of the global state machine feedback;Wherein, described complete The state of the gateway component of office's state feedback is down status;
The state of the gateway component stored is updated to down status by off-loadable state by the component manager.
Another aspect of the present invention provides a kind of component manager, comprising:
Acquiring unit, for obtaining gateway component;
Administrative unit, for being managed to whole life cycle state of the gateway component in gateway node, In, whole life cycle state of the gateway component in gateway node includes load, routing binding, runs, is unbinding And unloading.
Optionally, in above-mentioned component manager, the administrative unit, comprising:
State storage unit, for storing the state of gateway component;
Global state machine, for the state of monitor gateway component, and the state of the gateway component monitored is same It walks to the state storage unit.
Optionally, in above-mentioned component manager, the acquiring unit, comprising:
Subelement is obtained, is downloaded for loading the file packet of gateway component from file server, and by browser The file packet of gateway component;
Component storage unit, for the file packet of the gateway component to be stored to the folder content to corresponding gateway group Under;
Wherein, when the component storage unit is by the file packet of the gateway component, the text of corresponding gateway group is arrived in storage After under part clip directory, the state storage unit stores the state of the gateway component, and the state of the gateway component is same It walks in the global state machine;The state of the gateway component is editable state, for illustrating that the gateway component is in State can be issued.
Optionally, in above-mentioned component manager, the administrative unit executes the load to the gateway component When being managed, for receiving when issuing request of front end page transmission, the gateway component that issues of request is issued to pair In all gateway nodes for the gateway group answered, and the state of the gateway component of the global state machine feedback is received, and The state for the gateway node that the state storage unit is stored is updated to the global state machine by editable state The state of the gateway component of feedback;
Wherein, if the file packet of the gateway component is loaded from the file server, by pushing away gateway component The mode being sent in gateway node issues the gateway component;If the file packet of the gateway component is downloaded by browser, In such a way that notification gateway node downloads the gateway component in a manner of pulling, the gateway component is issued;The front end The page is provided by the administrative unit;
If all gateway nodes in the gateway group all successfully download the gateway component, and successfully parse the gateway Component, then the state for the gateway component that the global state machine is fed back is can operating status;It is described can operating status be used for Illustrate that the gateway component can be performed bindings;
If any one gateway node in the gateway group downloads the gateway component failure, the global state machine The state of the gateway component of feedback is to issue abnormality;
If any one gateway node in the gateway group parses the gateway component failure, the global state machine The state of the gateway component of feedback is parsing abnormality.
Optionally, in above-mentioned component manager, the administrative unit executes the routing to the gateway component Binding is when being managed, for routing component binder send Common Gateway component and in can operating status gateway group The information of part, and the state with the gateway component of Route establishment binding relationship of the global state machine feedback is received, and will The state for the gateway component that the state storage unit is stored by can operating status be updated to the global state and feed back The gateway component state;
Wherein, the state of the gateway component of the global state feedback is operating status, and in the gateway component It is fed back with after Route establishment binding relationship;The operating status for illustrating that the gateway component is in operating status, and It can not be unloaded.
Optionally, in above-mentioned component manager, the administrative unit executes the binding to the gateway component When releasing is managed, the state of the gateway component of the unbinding relationship for receiving the global state machine feedback, and will The state for the gateway component that the state storage unit is stored is updated to the global state machine by operating status and feeds back The screen component state;
Wherein, the state of the gateway component of the global state feedback is off-loadable state, and in the group of routes Part binder is fed back when releasing the binding relationship between the gateway component and routing bound in it.
Optionally, in above-mentioned component manager, the administrative unit executes the binding to the gateway component When releasing is managed, for removing the gateway component for being in off-loadable state from gateway node, and institute is received State the state of the gateway component of global state machine feedback, and the gateway component that the state storage unit is stored State down status is updated to by off-loadable state;
Wherein, the state of the gateway component of the global state feedback is down status.
The management method and component manager of a kind of gateway component provided by the invention, obtain gateway by component manager Component, and whole life cycle state of the gateway component in gateway node is managed by component manager.Wherein, gateway Whole life cycle state of the component in gateway node includes load, routing binding, operation, unbinding and unloading.It is logical Introducing component manager is crossed, each life cycle state of gateway component is effectively managed, is realized to gateway component Unified management, thus during the gateway node being integrated into gateway component in gateway cluster, it is ensured that gateway component Life cycle state consistency.Also, user is by component manager, can easily management gateway node, to mention O&M efficiency of the height to the business realized by the micro services network architecture.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this The embodiment of invention for those of ordinary skill in the art without creative efforts, can also basis The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of the management method of gateway component provided in an embodiment of the present invention;
Fig. 2 be another embodiment of the present invention provides a kind of gateway component management method flow diagram;
Fig. 3 be another embodiment of the present invention provides a kind of component manager structural schematic diagram;
Fig. 4 be another embodiment of the present invention provides a kind of component manager structural schematic diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
In this application, the terms "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, So that the process, method, article or equipment for including a series of elements not only includes those elements, but also including not having The other element being expressly recited, or further include for elements inherent to such a process, method, article, or device.Do not having There is the element limited in the case where more limiting by sentence "including a ...", it is not excluded that in the mistake including the element There is also other identical elements in journey, method, article or equipment.
The embodiment of the invention provides a kind of management methods of gateway component, as shown in Figure 1, comprising:
S101, component manager obtain gateway component.
It should be noted that component manager refers to the device for being managed to the gateway component in gateway node Or system etc..Wherein, the gateway component includes Common Gateway component and third party's gateway component.Common component refers to The shared gateway component of gateway node, is commonly referred to as providing the gateway group of most basic function for gateway node in gateway cluster Part.So these gateway components will be integrated into gateway node in gateway node initialization, for example, safety certification, day The gateway component on the bases such as will monitoring.And what third party's component then referred to being developed by third party is used to enrich gateway node function Gateway component, can be integrated into gateway node again in the later period.
In embodiments of the present invention, all gateway components that be applied in gateway node are all uploaded to component manager, I.e. by component manager obtain the gateway component in need for being uploaded to gateway node.That is, gateway component on be transmitted through What journey was equally managed by component manager.
Optionally, in order to which component manager can preferably carry out unified management to gateway component, the embodiment of the present invention Middle uploaded gateway component can be constructed by unified form work engineering, so as to the consistency of specification gateway component, just In carrying out unified management.Meanwhile but also gateway component building constitute it is more simple, convenient for third party according to oneself Demand correspondingly constructs third party's component.
Therefore, optionally, another embodiment of the present invention additionally provides a kind of construction method of gateway component, specifically: it is pre- A component construction template is first constructed, and in one note that can customize of component construction template definition.Pass through customized note Corresponding parameter is stated, so that building meets the gateway component of oneself demand.It should be noted that gateway component is the equal of One filter, thus specifically building gateway component composition in, need by customized notes statement filter type, The parameters such as good, the filter switch of execution sequence of filter, filter name.Also, constructed gateway component also needs to add Add item objects model (project object mode, the POM) dependence to component construction template.Finally by the gateway of building Component is packaged as a JAR APMB package, to complete the building of gateway component.
Specifically, in embodiments of the present invention, gateway component mainly can be uploaded to component by two different modes Manager, i.e. component manager mainly can obtain gateway component by two ways.First way are as follows: exist in gateway node When initialization, component manager loads the file packet of gateway component from file server.That is, the file of gateway component Coating is stored in advance in file server, when gateway node initialization is started, then net is loaded from file server Component is closed into component manager.The second way are as follows: component manager is arrived by the file packet that browser downloads gateway component In component manager.This mode is mainly used in gateway node and has been in the state of operation.
S102, component manager are managed whole life cycle state of the gateway component in gateway node.Wherein, Whole life cycle state of the gateway component in gateway node include load, routing binding, operation, unbinding and unload It carries.
That is, in embodiments of the present invention, gateway component processing is uploaded to outside component manager, in gateway node It further include having remaining five life cycle state.Specifically it is respectively as follows: the net after gateway component is loaded into gateway node, loads Component is closed to close with Route establishment binding relationship, the operation for the gateway component for establishing binding relationship, gateway component and the binding of routing The releasing of system and the unloading of gateway component.Five life cycles of this in gateway node of gateway component, in addition gateway group The upload procedure of part is all managed by component manager.
It should be noted that there are ordinal relations for the life cycle of gateway component.For example, being loaded into gateway node Gateway component, could be bound with routing;After being bound with routing, gateway component just enters operating status;And only have Gateway component could be unloaded after gateway component and the binding relationship of routing are released.But gateway component might not be by suitable Sequence, five above-mentioned life cycle states of whole experience, that is, the gateway component being under some life cycle state, and it is different Surely next life cycle can be transitioned into.For example, the gateway component of place under operation, if not needing to be unloaded, just The binding relationship for not needing releasing gateway component and routing, will not more be unloaded.
Specifically, component manager is responsible for gateway component from a life cycle state to another life cycle state Conversion, and monitor the life cycle state and real-time operating status of gateway component in real time, and store the life of gateway component Periodic state is realized to each life cycle state of gateway component and the monitoring of real-time running state, and coordinates gateway Global state of the component in entire distributed system.
Optionally, component manager can also provide a front end page, locating for showing gateway component currently to user Life cycle state and real-time operating status, and user is allowed to operate by front end page to gateway component, from reality Now to the visualized management of gateway component.
The management method of gateway component provided by the embodiment of the present invention obtains gateway component by component manager, and Whole life cycle state of the gateway component in gateway node is managed by component manager.Wherein, gateway component exists Whole life cycle state in gateway node includes load, routing binding, operation, unbinding and unloading.Pass through introducing Component manager effectively manages each life cycle state of gateway component, realizes the unification to gateway component Management, thus during the gateway node being integrated into gateway component in gateway cluster, it is ensured that the life of gateway component The consistency of periodic state.Also, user is by component manager, can easily management gateway node, to improve to industry The O&M efficiency of business.
Another embodiment of the present invention discloses a kind of management method of gateway component, as shown in Figure 2, comprising:
S201, component manager load the file packet of gateway component from file server, or are downloaded by browser The file packet of gateway component.
Wherein, file server is used to store the file packet of gateway component.It should be noted that in the embodiment of the present invention In, component manager in Gateway Initiative, by from file server obtain gateway component file packet, gateways and starting simultaneously After operation, the file packet of gateway component is obtained by browser.
Specifically, the specific implementation of this step constitutes the specific implementation that can be found in the step S101 in above method embodiment Process, details are not described herein again.
S202, component manager will be under the file packet storages to the folder content of corresponding gateway group of gateway component.
Wherein, what gateway group referred to is exactly gateway cluster, that is, contains the cluster of multiple gateway nodes.
It should be noted that single gateway node when loading gateway component, is according to the corresponding catalogue pair of gateway node What gateway node was loaded.Correspondingly, for gateway cluster, gateway node then according to the catalogue of gateway group to gateway component into Row load.It is therefore desirable to by under the file packet storage to the folder content of corresponding gateway group of gateway component.
The state of S203, component manager storage gateway component, and by the state synchronized of gateway component to global state machine In.
Wherein, the state of gateway component be editable state, and editable state for illustrate gateway component be in can Issued state.And global state machine is then one of the composition of component manager, for the state of monitor gateway component, and by institute The state synchronized of the gateway component monitored is to component manager.Optionally, global state machine is by sharing storing data library Redis saves the state of gateway component, while being become using the state that Relational DBMS Mysql saves gateway component More record.
Specifically, component manager starts the state for storing the gateway component after gateway component upload, and it is synchronized to complete In office's state machine.Wherein, the state of the gateway component stored is editable state.Backward, what component manager was stored should The state of gateway component can change accordingly with the variation of gateway component state.Specifically, passing through global state machine monitoring The state of gateway component, when the state of gateway component changes, global state machine will monitor the state of gateway component, and It is synchronized to component manager, so that the state for the gateway component that component manager updates storage accordingly.
It should be noted that component manager also provides a front end page for user.The front end page be used for Family provides a visual interface, shows life cycle state locating for gateway component to user and runs shape in real time State.Also, user can be managed operation to gateway component by the front end page.
It should also be noted that, after successfully uploading gateway component, if user executes gateway component by front end page Issue operation, then follow the steps S204.
S204, component manager are receiving when issuing request of front end page transmission, the gateway component that request is issued It is issued in all gateway nodes of corresponding gateway group.
Wherein, requesting the gateway component issued is the gateway component that life cycle is in editable state.
It should be noted that if the file packet of gateway component is loaded from file server, then by by gateway group Part is pushed to the mode in gateway node, issues the gateway component.If the file packet of gateway component is downloaded by browser, Then in such a way that notification gateway node downloads gateway component in a manner of pulling, the gateway component is issued.That is, this In inventive embodiments, component manager issues gateway component, and there are two types of modes.One is: it will be issued in a manner of push Gateway component is pushed to gateway node.This mode is primarily adapted for use in gateway node initialization, and gateway component at this time File packet is loaded from file server.So if the file packet of gateway component is loaded from file server, By the way that gateway component is pushed to the mode in gateway node, the gateway component is issued.Another kind is: passing through notification gateway section Point, by the gateway component for allowing gateway node to be issued from component manager in a manner of pulling.This mode is main When in operating status suitable for gateway node, the file packet of gateway component is downloaded by browser at this time.So if The file packet of gateway component is downloaded by browser, then gateway component is downloaded in a manner of pulling notification gateway node Mode issues the gateway component.
That is, gateway node needs to be passed through by component manager to the load of gateway component in the embodiment of the present invention Gateway component is issued to complete, i.e. the load of gateway component is managed by component manager.
Specifically, when user carries out load operation to the gateway component in editable state by front end page, front end The page issues request to component manager transmission.Optionally, issuing may include the mark for requesting the gateway component issued in request. The gateway component that request issues is issued to all gateway nodes of corresponding gateway group according to request is issued by component manager In.Gateway node response assemblies manager in gateway group issues operation, is issued by HTTP from component manager The file packet of gateway component, and the file packet for parsing gateway component is reflected by Classloader, complete the load of gateway component.Institute With the embodiment of the present invention is that gateway component is loaded into gateway node in a manner of cluster, and substitution is existing to be added by single-point The mode of load.So that the loading efficiency of gateway component is higher, and the life cycle state of gateway component also more one It causes.
It should be noted that global state chance is because gateway node downloads gateway component and parses the knot of gateway component Fruit is different, and monitors the different states of gateway component, and the state of gateway component is fed back to component manager, holds at this time Row step S205.
S205, component manager receive the state of the gateway component of global state machine feedback, and the gateway section that will be stored The state of point is updated to the state of the gateway component of global state machine feedback by editable state.
Wherein, the gateway component mentioned in this step refers to the gateway component being issued in gateway node.
Specifically, if all gateway nodes in gateway group all successfully download gateway component, and gateway component is successfully parsed, The state for the gateway component that then global state machine is fed back is can operating status.That is, component manager should by what is stored The state of gateway component is updated to by editable state can operating status.Can operating status for illustrating that gateway component can be performed Bindings.
If any one gateway node downloading gateway component failure in gateway group, the gateway group of global state machine feedback The state of part is to issue abnormality.That is, any one gateway node downloading gateway component failure in gateway group, then The state of the gateway component stored is updated to issue abnormality by component manager by editable state.Also, component Manager can will be deleted in the gateway component for issuing abnormality.
If any one gateway node in gateway group parses the gateway component failure, the net of global state machine feedback The state for closing component is parsing abnormality.That is, the gateway node in gateway group all successfully downloads gateway component, still Any one gateway node parsing gateway component failure, the then gateway component that component manager will be stored in resolving State by editable state be updated to parsing abnormality.Equally, component manager can be by the net in parsing abnormality Component is closed to delete.
Since it is an asynchronous event that gateway node, which loads gateway component,.So it is alternatively possible to passing through one letter of maintenance The mode of number amount realizes monitoring of the global state machine to gateway component, specifically, generating the semaphore that an initial value is 0. When gateway node is successfully downloaded or parses gateway component, semaphore increases by 1 automatically, and when gateway node is downloaded or is parsed When gateway component fails, semaphore subtracts 1 automatically.Global state machine finally determines the state of gateway component according to the value of semaphore. Certainly, in the realization of the life cycle state of gateway component is constituted, it again may be by the mode of semaphore, to realize to net Close the monitoring of the life cycle state of component.
It should also be noted that, after being successfully issued to gateway component in gateway node, if user passes through preceding end page Face executes the bindings of routing with gateway component, thens follow the steps S206.
S206, component manager to routing component binder send Common Gateway component and in can operating status net Close the information of component.
Wherein, the routing component binder is for realizing the dynamic binding routed with gateway component.
It should be noted that by binding gateway component in routing corresponding function can be increased for routing.Institute Can realize the mechanism of a set of dynamic routing and component binding by routing component binder in the embodiment of the present invention.
Optionally, when equally can be user by front end page execution gateway component and the bindings of routing, front end The page sends bind request to routing component binder.Routing component binder then sends inquiry request to component manager, with Inquire Common Gateway component and in can operating status third party's gateway component message.Wherein, Common Gateway component is net What artis was shared, and there must be, for realizing the gateway component of the basic function of gateway node.Third party's gateway component The gateway component then uploaded for third party.Component manager then can send Common Gateway component and place to routing component binder In can operating status gateway component information.Routing component binder is routed accordingly according to the information architecture and gateway component Binding relationship.
Specifically, as shown in table 1, routing component binder can be reflected the binding relationship of routing and gateway component with relationship The mode of firing table stores in database.Also, it is routing with after component binding success, inquiry operation is being carried out to data, and lead to Cross it is two-way itself route locating device route-caching information, so that by newest routing and the relation mapping table of component, update is arrived In the caching of gateway node.It, can be according to newest routing and the relation mapping table of component, phase with when HTTP request passes through gateway The starting gateway component answered, to realize corresponding service logic.
Table 1
Gateway group Routing Component ID Renewal time
Basic research and development group RouteidA Safety certification component 2019:06:12
Research and develop one group RouteidB Safety certification component 2019:06:12
It should also be noted that, global state is anti-to component manager after gateway component and Route establishment binding relationship The state of the gateway component of feedback.At this point, the state of the gateway component of global state feedback is operating status.Operating status is used In illustrating that gateway component is in operating status, i.e., gateway component is routed in use, and can not be unloaded.Only release gateway Gateway component could be unloaded after component and the binding relationship of routing.Correspondingly, component manager receives the global state machine The state of the gateway component of the unbinding relationship of feedback, and execute step S207.
S207, component manager by the state of the gateway component stored by can operating status be updated to operating status.
Wherein, the corresponding gateway component of state that the global state machine that the gateway component stored refers to is fed back.
It should be noted that component manager passes through global state machine monitoring when under gateway component is in operating status The real-time operating status of gateway component, and it is supplied to front end page, so that user passes through the fortune of front end page inquiry gateway component Row state.Also, when gateway component is abnormal, the timely notification component manager of energy, so as to timely feedback to user.
It should also be noted that, when not use gateway component in operating status or it is in operating status under It, can will be between gateway component and routing bound in it by routing component manager when gateway component is abnormal Binding relationship release, further gateway component to be unloaded.At this point, global state feeds back gateway component to component manager State.Wherein, the state of the gateway component of global state feedback is off-loadable state.So when routing component binder When releasing the binding relationship between the gateway component and routing bound in it, step S208 is executed.
The state of the gateway component stored is updated to off-loadable state by operating status by S208, component manager.
It should be noted that gateway component, which is in the off-loadable state description gateway component, to be unloaded from gateway node It carries.It is off-loadable although and then will be unloaded from gateway node by the gateway component for being in off-loadable state State can not illustrate to have to unload the gateway component.
S209, component manager remove the gateway component in off-loadable state from gateway node.
Specifically, equally can be, user executes unloading to the gateway component in off-loadable state by front end page Operation.At this point, component manager moves the respective byte code of the file packet of the gateway component from the Classloader of gateway node It removes, so that gateway component be removed from gateway node.
It should be noted that global state machine is anti-to component manager in gateway component by after removing in gateway node The state of the gateway component of feedback.Wherein, the state of the gateway component of global state feedback is down status.Correspondingly, component Manager receives the state of the gateway component of global state machine feedback, and executes step S210.
The state of the gateway component stored is updated to down status by off-loadable state by S210, component manager.
Wherein, gateway component mentioned by this step is the gateway component removed from gateway node.
The management method of gateway component provided in an embodiment of the present invention, by component manager acquisition gateway component, and by Component manager is managed whole life cycle state of the gateway component in gateway node.Wherein, gateway component is in net Whole life cycle state in artis includes load, routing binding, operation, unbinding and unloading.And by complete Office's state is monitored the life cycle state of gateway component, is preferably managed to the life cycle of gateway component, with And coordinate the global state of gateway component.By introducing component manager, to each life cycle state of gateway component into The effective management of row, realizes the unified management to gateway component, thus in the gateway being integrated into gateway component in gateway cluster In node process, it is ensured that the consistency of the life cycle state of gateway component.Also, front end page also is provided for user, Realize the visualized management to gateway component.So that user can unusual easily management gateway node, to improve pair The O&M efficiency of business.
Another embodiment of the present invention provides a kind of component manager, as shown in Figure 3, comprising:
Acquiring unit 301, for obtaining gateway component.
It should be noted that the specific work process of acquiring unit 301 can be found in the step in above method embodiment S101, details are not described herein again.
Administrative unit 302, for being managed to whole life cycle state of the gateway component in gateway node.
Wherein, whole life cycle state of the gateway component in gateway node includes load, routing binding, fortune Capable, unbinding and unloading.
It should be noted that administrative unit 302, specific work process can be found in the step in aforesaid way embodiment S102, details are not described herein again.
Optionally, in another embodiment of the present invention, administrative unit 302, comprising:
State storage unit, for storing the state of gateway component.
Global state machine, for the state of monitor gateway component, and the state of the gateway component monitored is same It walks to the state storage unit.
Optionally, in another embodiment of the present invention, as shown in figure 4, acquiring unit, comprising:
Subelement 401 is obtained, for the file packet of the load gateway component from file server, and by under browser Carry the file packet of gateway component.
Component storage unit 402, for the file packet of the gateway component to be stored to the file to corresponding gateway group Under catalogue.
Wherein, when the component storage unit 402 is by the file packet of the gateway component, corresponding gateway group is arrived in storage After under folder content, the state storage unit stores the state of the gateway component, and by the state of the gateway component It is synchronized in the global state machine.The state of the gateway component is editable state, for illustrating at the gateway component In state can be issued.
It should be noted that the specific work process when said units in the embodiment of the present invention realize above-mentioned function, it can Accordingly referring to step S201~S203 in above method embodiment, details are not described herein again.
Optionally, in another embodiment of the present invention, administrative unit 302 executes the load to the gateway component and carries out When management, it is used for:
When issuing request of front end page transmission is being received, the gateway component that request issues is issued to corresponding gateway In all gateway nodes of group, and the state of the gateway component of global state machine feedback is received, and by the shape The state for the gateway node that state storage unit is stored is updated to the institute of the global state machine feedback by editable state State the state of gateway component.
Wherein, if the file packet of the gateway component is loaded from the file server, by pushing away gateway component The mode being sent in gateway node issues the gateway component;If the file packet of the gateway component is downloaded by browser, In such a way that notification gateway node downloads the gateway component in a manner of pulling, the gateway component is issued.The front end The page is provided by the administrative unit.
If also, all gateway nodes of the gateway group all successfully download the gateway component, and successfully described in parsing Gateway component, then the state for the gateway component that the global state machine is fed back is can operating status;It is described can operating status For illustrating that the gateway component can be performed bindings.
If any one gateway node of the gateway group downloads the gateway component failure, the global state machine is anti- The state of the gateway component of feedback is to issue abnormality.
If any one gateway node of the gateway group parses the gateway component failure, the global state machine is anti- The state of the gateway component of feedback is parsing abnormality.
It should be noted that the specific work process when said units in the embodiment of the present invention state function in realization, Can be accordingly with reference to step S204~S205 in above method embodiment, details are not described herein again.
Optionally, in another embodiment of the present invention, administrative unit 302 executes the routing to the gateway component and ties up When being managed surely, it is used for:
To routing component binder send Common Gateway component and in can operating status gateway component information, with And the state with the gateway component of Route establishment binding relationship of the global state machine feedback is received, and the state is stored The state for the gateway component that unit is stored by can operating status be updated to the gateway group of global state feedback The state of part.
Wherein, the state of the gateway component of the global state feedback is operating status, and in the gateway component It is fed back with after Route establishment binding relationship.The operating status for illustrating that the gateway component is in operating status, and It can not be unloaded.
It should be noted that the specific work process when said units in the embodiment of the present invention state function in realization, Can be accordingly with reference to step S206~S207 in above method embodiment, details are not described herein again.
Optionally, in another embodiment of the present invention, administrative unit 302 executes the binding solution to the gateway component When except being managed, it is used for:
The state of the gateway component of the unbinding relationship of the global state machine feedback is received, and the state is stored The state for the gateway component that unit is stored is updated to the screen component of the global state machine feedback by operating status State.
Wherein, the state of the gateway component of the global state feedback is off-loadable state, and in the group of routes Part binder is fed back when releasing the binding relationship between the gateway component and routing bound in it.
It should be noted that the specific work process when said units in the embodiment of the present invention state function in realization, Can be accordingly with reference to the step S208 in above method embodiment, details are not described herein again.
Optionally, in another embodiment of the present invention, administrative unit 302 executes the binding solution to the gateway component When except being managed, it is used for:
The gateway component in off-loadable state is removed from gateway node, and receives the global state machine The state of the gateway component of feedback, and the state for the gateway component that the state storage unit is stored is by detachable Load state is updated to down status.
Wherein, the state of the gateway component of the global state feedback is down status.
It should be noted that the specific work process when said units in the embodiment of the present invention state function in realization, Can be accordingly with reference to step S209~S210 in above method embodiment, details are not described herein again.
The component manager of gateway component provided in an embodiment of the present invention, by acquiring unit acquisition gateway component, and by Administrative unit is managed whole life cycle state of the gateway component in gateway node.Wherein, gateway component is in gateway Whole life cycle state in node includes load, routing binding, operation, unbinding and unloading.Also, pass through the overall situation State is monitored the life cycle state of gateway component, by the state storage state storage unit of gateway component, from And preferably the life cycle of gateway component is managed, and coordinate the global state of gateway component.Pass through assembly management Device effectively manages each life cycle state of gateway component, realizes the unified management to gateway component, thus During the gateway node being integrated into gateway component in gateway cluster, it is ensured that the life cycle state of gateway component Consistency.Also, user is by component manager, can unusual easily management gateway node, to improve the fortune to business Tie up efficiency.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered Think beyond the scope of this invention.
The foregoing description of the disclosed embodiments enables those skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, of the invention It is not intended to be limited to the embodiments shown herein, and is to fit to and the principles and novel features disclosed herein phase one The widest scope of cause.

Claims (13)

1. a kind of management method of gateway component characterized by comprising
Component manager obtains gateway component;
The component manager is managed whole life cycle state of the gateway component in gateway node, wherein Whole life cycle state of the gateway component in gateway node include load, routing binding, operation, it is unbinding and Unloading.
2. the method according to claim 1, wherein the component manager includes global state machine, described group Part manager obtains gateway component, comprising:
The component manager loads the file packet of the gateway component from file server;
Alternatively, the component manager downloads the file packet of the gateway component by browser;
The component manager will be under the file packet storage to the folder content of corresponding gateway group of the gateway component;
The component manager stores the state of the gateway component, and by the state synchronized of the gateway component to the overall situation In state machine;
Wherein, the state of the gateway component is editable state;The global state machine is for monitoring the gateway component State, and by the state synchronized of the gateway component monitored to the component manager;The editable state is used for State can be issued by illustrating that the gateway component is in.
3. according to the method described in claim 2, it is characterized in that, the component manager to the load of the gateway component into Row management, comprising:
The component manager is receiving when issuing request of front end page transmission, and the gateway component that request issues is issued to In all gateway nodes of corresponding gateway group;
Wherein, if the file packet of the gateway component is loaded from the file server, by the way that gateway component to be pushed to Mode in gateway node issues the gateway component;If the file packet of the gateway component is downloaded by browser, pass through In the way of notification gateway node downloads the gateway component in a manner of pulling, the gateway component is issued;The front end page It is provided by the component manager;
The component manager receives the state of the gateway component of global state machine feedback, and described in being stored The state of gateway node is updated to the state of the gateway component of the global state machine feedback by editable state;
Wherein, if all gateway nodes in the gateway group all successfully download the gateway component, and the net is successfully parsed Component is closed, then the state for the gateway component that the global state machine is fed back is can operating status;It is described can operating status use Bindings can be performed in the explanation gateway component;
If any one gateway node in the gateway group downloads the gateway component failure, the global state machine feedback The gateway component state be issue abnormality;
If any one gateway node in the gateway group parses the gateway component failure, the global state machine feedback The gateway component state be parsing abnormality.
4. according to the method described in claim 2, it is characterized in that, the component manager ties up the routing of the gateway component Surely it is managed, comprising:
The component manager to routing component binder send Common Gateway component and in can operating status gateway group The information of part;Wherein, the routing component binder is for realizing the dynamic binding routed with gateway component;
The component manager receives the state with the gateway component of Route establishment binding relationship of the global state machine feedback; Wherein, the state of the gateway component of the global state feedback is operating status, and is built in the gateway component with routing It is fed back after vertical binding relationship;The operating status can not be unloaded for illustrating that the gateway component is in operating status It carries;
The component manager by the state of the gateway component stored by can operating status be updated to operating status.
5. according to the method described in claim 4, it is characterized in that, the component manager is to the binding solution of the gateway component Except being managed, comprising:
The component manager receives the state of the gateway component of the unbinding relationship of the global state machine feedback;Wherein, The state of the gateway component of the global state feedback is off-loadable state, and releases institute in the routing component binder It is fed back when stating the binding relationship between gateway component and routing bound in it;
The state of the gateway component stored is updated to off-loadable state by operating status by the component manager.
6. according to the method described in claim 2, it is characterized in that, the component manager is loaded into unloading for the gateway component Row management, comprising:
The component manager removes the gateway component in off-loadable state from gateway node;
The component manager receives the state of the gateway component of the global state machine feedback;Wherein, the global shape The state of the gateway component of state feedback is down status;
The state of the gateway component stored is updated to down status by off-loadable state by the component manager.
7. a kind of component manager characterized by comprising
Acquiring unit, for obtaining gateway component;
Administrative unit, for being managed to whole life cycle state of the gateway component in gateway node, wherein institute State whole life cycle state of the gateway component in gateway node include load, it is routing binding, operation, unbinding and unload It carries.
8. component manager according to claim 7, which is characterized in that the administrative unit, comprising:
State storage unit, for storing the state of gateway component;
Global state machine, for the state of monitor gateway component, and extremely by the state synchronized of the gateway component monitored The state storage unit.
9. component manager according to claim 8, which is characterized in that the acquiring unit, comprising:
Subelement is obtained, downloads gateway for loading the file packet of gateway component from file server, and by browser The file packet of component;
Component storage unit, under the file packet storage to the folder content of corresponding gateway group by the gateway component;
Wherein, when the component storage unit is by the file packet of the gateway component, the file of corresponding gateway group is arrived in storage After under catalogue, the state storage unit stores the state of the gateway component, and the state synchronized of the gateway component is arrived In the global state machine;The state of the gateway component be editable state, for illustrate the gateway component be in can quilt Issue state.
10. component manager according to claim 9, which is characterized in that the administrative unit executes described to the net When the load of pass component is managed, for receiving when issuing request of front end page transmission, the gateway that request is issued Component is issued in all gateway nodes of corresponding gateway group, and receives the gateway group of the global state machine feedback The state of part, and the state for the gateway node that the state storage unit is stored is updated to institute by editable state State the state of the gateway component of global state machine feedback;
Wherein, if the file packet of the gateway component is loaded from the file server, by the way that gateway component to be pushed to Mode in gateway node issues the gateway component;If the file packet of the gateway component is downloaded by browser, pass through In the way of notification gateway node downloads the gateway component in a manner of pulling, the gateway component is issued;The front end page It is provided by the administrative unit;
If all gateway nodes in the gateway group all successfully download the gateway component, and successfully parse the gateway group Part, then the state for the gateway component that the global state machine is fed back is can operating status;It is described can operating status for saying The bright gateway component can be performed bindings;
If any one gateway node in the gateway group downloads the gateway component failure, the global state machine feedback The gateway component state be issue abnormality;
If any one gateway node in the gateway group parses the gateway component failure, the global state machine feedback The gateway component state be parsing abnormality.
11. component manager according to claim 9, which is characterized in that the administrative unit executes described to the net The routing binding of component is closed when being managed, for sending Common Gateway component to routing component binder and in can run The information of the gateway component of state, and receive the gateway component with Route establishment binding relationship of the global state machine feedback State, and by the state for the gateway component that the state storage unit is stored by can operating status be updated to it is described complete The state of the gateway component of office's state feedback;
Wherein, the state of the gateway component of the global state feedback is operating status, and on the gateway component and road By being fed back after establishing binding relationship;The operating status, and can not for illustrating that the gateway component is in operating status It is unloaded.
12. component manager according to claim 9, which is characterized in that the administrative unit executes described to the net When the binding releasing of pass component is managed, the gateway component of the unbinding relationship for receiving the global state machine feedback State, and the state for the gateway component that the state storage unit is stored is updated to the overall situation by operating status The state of the screen component of state machine feedback;
Wherein, the state of the gateway component of the global state feedback is off-loadable state, and is tied up in the routing component Determine to be fed back when device releases the binding relationship between the gateway component and routing bound in it.
13. component manager according to claim 9, which is characterized in that the administrative unit executes described to the net When the binding releasing of pass component is managed, for the gateway component for being in off-loadable state to be moved from gateway node It removes, and receives the state of the gateway component of the global state machine feedback, and the state storage unit is stored The state of the gateway component down status is updated to by off-loadable state;
Wherein, the state of the gateway component of the global state feedback is down status.
CN201910697048.5A 2019-07-30 2019-07-30 Management method of gateway component and component manager Active CN110417598B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910697048.5A CN110417598B (en) 2019-07-30 2019-07-30 Management method of gateway component and component manager

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910697048.5A CN110417598B (en) 2019-07-30 2019-07-30 Management method of gateway component and component manager

Publications (2)

Publication Number Publication Date
CN110417598A true CN110417598A (en) 2019-11-05
CN110417598B CN110417598B (en) 2022-05-20

Family

ID=68364630

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910697048.5A Active CN110417598B (en) 2019-07-30 2019-07-30 Management method of gateway component and component manager

Country Status (1)

Country Link
CN (1) CN110417598B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112769687A (en) * 2020-12-10 2021-05-07 前海飞算科技(深圳)有限公司 API gateway platform
WO2021111235A1 (en) * 2019-12-03 2021-06-10 International Business Machines Corporation Microservices change management and analytics
CN113590213A (en) * 2021-06-24 2021-11-02 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1360695A (en) * 1999-07-13 2002-07-24 太阳微系统有限公司 Methods and apparatus for managing application according to application lifecycle
CN101359999A (en) * 2007-07-30 2009-02-04 中兴通讯股份有限公司 Method and apparatus for network element data synchronization
US20110138441A1 (en) * 2009-12-09 2011-06-09 Microsoft Corporation Model based systems management in virtualized and non-virtualized environments
CN102346460A (en) * 2011-05-27 2012-02-08 运软网络科技(上海)有限公司 Transaction-based service control system and method
CN102541644A (en) * 2011-12-30 2012-07-04 深圳市万兴软件有限公司 Method and device for message driving based on state machine
CN102662668A (en) * 2012-03-31 2012-09-12 奇智软件(北京)有限公司 Method and device for optimizing application by utilizing webpage life cycle
CN109656528A (en) * 2018-10-29 2019-04-19 中国航空无线电电子研究所 Measured modularization software development methodology

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1360695A (en) * 1999-07-13 2002-07-24 太阳微系统有限公司 Methods and apparatus for managing application according to application lifecycle
CN101359999A (en) * 2007-07-30 2009-02-04 中兴通讯股份有限公司 Method and apparatus for network element data synchronization
US20110138441A1 (en) * 2009-12-09 2011-06-09 Microsoft Corporation Model based systems management in virtualized and non-virtualized environments
CN102346460A (en) * 2011-05-27 2012-02-08 运软网络科技(上海)有限公司 Transaction-based service control system and method
CN102541644A (en) * 2011-12-30 2012-07-04 深圳市万兴软件有限公司 Method and device for message driving based on state machine
CN102662668A (en) * 2012-03-31 2012-09-12 奇智软件(北京)有限公司 Method and device for optimizing application by utilizing webpage life cycle
CN109656528A (en) * 2018-10-29 2019-04-19 中国航空无线电电子研究所 Measured modularization software development methodology

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021111235A1 (en) * 2019-12-03 2021-06-10 International Business Machines Corporation Microservices change management and analytics
US11175947B2 (en) 2019-12-03 2021-11-16 International Business Machines Corporation Microservices change management and analytics
GB2605273A (en) * 2019-12-03 2022-09-28 Kyndryl Inc Microservices change management and analytics
CN112769687A (en) * 2020-12-10 2021-05-07 前海飞算科技(深圳)有限公司 API gateway platform
CN113590213A (en) * 2021-06-24 2021-11-02 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device, and storage medium
CN113590213B (en) * 2021-06-24 2023-04-25 深圳开源互联网安全技术有限公司 Component maintenance method, electronic device and storage medium

Also Published As

Publication number Publication date
CN110417598B (en) 2022-05-20

Similar Documents

Publication Publication Date Title
CN110417598A (en) The management method and component manager of gateway component
CN103841170B (en) A kind of cloud storage method and server
CN104536809B (en) A kind of distributed timing task scheduling system based on client, server system
CN108563425B (en) A kind of event driven multipaths coprocessing system
Ellert et al. Advanced Resource Connector middleware for lightweight computational Grids
CN102760074B (en) Method and its system for high load capacity operation flow scalability
Sellami et al. PaaS-independent provisioning and management of applications in the cloud
CN101848245B (en) SSL/XML-based database access proxy method and system
US8719780B2 (en) Application server with a protocol-neutral programming model for developing telecommunications-based applications
US8949308B2 (en) Building large scale infrastructure using hybrid clusters
CN108574702A (en) A kind of cloud application dispositions method and system
CN108829384A (en) Management method, device, computer equipment and the storage medium of container
CN106888256B (en) Distributed monitoring system and monitoring and scheduling method and device thereof
CN102945175A (en) Terminal software online upgrading system and method based on cloud computing environment
CN105653425A (en) Complicated event processing engine based monitoring system
CN102571420A (en) Method and system for network element data management
CN109684036A (en) A kind of container cluster management method, storage medium, electronic equipment and system
CN109639782A (en) Message sends platform, method
CN109471730A (en) A kind of elastic calculation service management system
CN105320577B (en) A kind of data backup and resume method, system and device
CN110231956A (en) The method, system and device of application version building
Schantz et al. An object-level gateway supporting integrated-property quality of service
CN113630310A (en) Distributed high-availability gateway system
Chen et al. Research and application of distributed OSGi for cloud computing
JP2004535626A (en) Systems and methods for dynamic delivery of data and / or services

Legal Events

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