A kind of active and standby handover management of parallel real-time data base system towards large electrical network
Technical field
The invention belongs to the control technique in power system field, be specifically related to a kind of active and standby handover management of parallel real-time data base system towards large electrical network.
Background technology
In existing power scheduling technology support system, use real-time data base storage and the real time datas such as management remote measurement amount, remote signalling amount.Along with the development of electrical network, it is large that the real-time measurement data volume constantly becomes, and the bottleneck of the existing employed real-time data base efficient of dispatch automated system and storage is more and more significant.
In order to overcome the above problems, arise at the historic moment in the real-time storehouse of distributed parallel.The distributed parallel real-time data base is comprised of a plurality of nodes, and they provide service simultaneously, very strong support is provided for high Concurrency Access.
But the active and standby switching in the electric system innately can not be supported in the real-time storehouse of distributed parallel.Real-time storehouse in the electric system provides Data Source for many application, and different application is different to active and standby demand.Having some to use needs the access host node, and other need to be accessed from node, so in actual applications, active and standby switching is very frequently.In the real-time storehouse of distributed parallel, how to allow each node can both perceive the switching state of other nodes in the native system, constantly keep unified view, this is the larger problem that the real-time storehouse of present distributed parallel faces.
Summary of the invention
In order to overcome above-mentioned the deficiencies in the prior art, the invention provides a kind of active and standby handover management of parallel real-time data base system towards large electrical network, guarantee correctly to switch main-standby nodes on the basis of the high concurrent response in parallel real-time storehouse, satisfy the requirement of application service.
In order to realize the foregoing invention purpose, the present invention takes following technical scheme:
A kind of active and standby handover management of parallel real-time data base system towards large electrical network is provided, described parallel database comprises N by the real-time data base of network service, described real-time data base comprises real-time data base host node and real-time data base slave node, and it is active and standby right that described real-time data base host node and real-time data base slave node consist of; Described system comprises
Select primary module, be used for selecting the real-time data base host node;
Active and standby handover module is used for switching real-time data base host node and real-time data base slave node; With
Synchronization module is used for the information synchronization on the real-time data base host node to local node.
Described primary module, the active and standby handover module of selecting is connected with synchronization module and connected.
The described primary module that selects comprises load judgment module, broadcast module, message sink module and communication module.
Described load judgment module is judged local loading condition, and obtains the load result by cum rights average; The time of described broadcast module load is broadcast to other all nodes that comprise real-time data base host node and real-time data base slave node; Described message sink module accepts to comprise from other broadcast of all nodes transmissions of real-time data base host node and real-time data base slave node, and load is compared, and selects the node of minimum load as real-time data base host node, i.e. coordinator node; Described communication module: after selecting coordinator node, other nodes just establish a communications link with this coordinator node, wait for the indication of coordinator node.
Described active and standby handover module comprises application type manager, logger module, local meta data manager and information sending module.
Described application type manager judges that request of data is from real-time data base host node or real-time data base slave node; The daily record of work that described logger module recording real-time data storehouse host node or real-time data base slave node switch; The address of described local meta data manager recording real-time data storehouse host node; Described information sending module sends all real-time data base host nodes to handover information.
Described synchronization module comprises change module, message transmission module and synchronous update module.
Described change module is upgraded local metadata information according to active and standby handover information; Metadata information after described message transmission module will be upgraded and the time of renewal send to coordinator node; Described synchronous update module receives the metadata information that coordinator node sends, and then upgrades the metadata information of local node.
Compared with prior art, beneficial effect of the present invention is: in the abundant situation of real-time data base number of nodes, parallel real-time data base will improve data manipulation performance significantly; And, under the prerequisite that does not affect parallel real-time storehouse access function, provide seamless active and standby handoff functionality.In the system of the real-time storehouse of distributed parallel, the active and standby information that each node is seen is that the overall situation is unified, and can guarantee the succession of active and standby switching.Can support to support more abundant application in the situation of local computing not affecting the standalone version dispatching technique by the active and standby handover management of distributing real-time data bank provided by the invention system, such as the whole network calculating etc.
Description of drawings
Fig. 1 is N the synoptic diagram that real-time data base communicates by network;
Fig. 2 is towards the active and standby handover management system construction drawing of the parallel real-time data base of large electrical network;
Fig. 3 is towards the active and standby switch managing method process flow diagram of the parallel real-time data base of large electrical network.
Embodiment
Below in conjunction with accompanying drawing the present invention is described in further detail.
Such as Fig. 1 and Fig. 2, a kind of active and standby handover management of parallel real-time data base system towards large electrical network is provided, described parallel database comprises N by the real-time data base of network service, described real-time data base comprises real-time data base host node and real-time data base slave node, and it is active and standby right that described real-time data base host node and real-time data base slave node consist of; Described system comprises
Select primary module, be used for selecting the real-time data base host node;
Active and standby handover module is used for switching real-time data base host node and real-time data base slave node; With
Synchronization module is used for the information synchronization on the real-time data base host node to local node.
Described primary module, the active and standby handover module of selecting is connected with synchronization module and connected.
The described primary module that selects comprises load judgment module, broadcast module, message sink module and communication module.
Described load judgment module is judged local loading condition, and obtains the load result by cum rights average; The time of described broadcast module load is broadcast to other all nodes that comprise real-time data base host node and real-time data base slave node; Described message sink module accepts to comprise from other broadcast of all nodes transmissions of real-time data base host node and real-time data base slave node, and load is compared, and selects the node of minimum load as real-time data base host node, i.e. coordinator node; Described communication module: after selecting coordinator node, other nodes just establish a communications link with this coordinator node, wait for the indication of coordinator node.
Described active and standby handover module comprises application type manager, logger module, local meta data manager and information sending module.
Described application type manager judges that request of data is from real-time data base host node or real-time data base slave node; The daily record of work that described logger module recording real-time data storehouse host node or real-time data base slave node switch; The address of described local meta data manager recording real-time data storehouse host node; Described information sending module sends all real-time data base host nodes to handover information.
Described synchronization module comprises change module, message transmission module and synchronous update module.
Described change module is upgraded local metadata information according to active and standby handover information; Metadata information after described message transmission module will be upgraded and the time of renewal send to coordinator node; Described synchronous update module receives the metadata information that coordinator node sends, and then upgrades the metadata information of local node.
Should be noted that at last: above embodiment is only in order to illustrate that technical scheme of the present invention is not intended to limit, although with reference to above-described embodiment the present invention is had been described in detail, those of ordinary skill in the field are to be understood that: still can make amendment or be equal to replacement the specific embodiment of the present invention, and do not break away from any modification of spirit and scope of the invention or be equal to replacement, it all should be encompassed in the middle of the claim scope of the present invention.