CN105490938B - Design method of router of configurable server engine - Google Patents
Design method of router of configurable server engine Download PDFInfo
- Publication number
- CN105490938B CN105490938B CN201610063578.0A CN201610063578A CN105490938B CN 105490938 B CN105490938 B CN 105490938B CN 201610063578 A CN201610063578 A CN 201610063578A CN 105490938 B CN105490938 B CN 105490938B
- Authority
- CN
- China
- Prior art keywords
- node
- message queue
- configuration file
- data
- service
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 18
- 238000013461 design Methods 0.000 title claims abstract description 7
- 238000004891 communication Methods 0.000 claims abstract description 11
- 230000008569 process Effects 0.000 claims abstract description 8
- 238000012217 deletion Methods 0.000 claims description 6
- 230000037430 deletion Effects 0.000 claims description 6
- 239000000872 buffer Substances 0.000 claims description 3
- 230000003139 buffering effect Effects 0.000 claims description 3
- 238000005538 encapsulation Methods 0.000 claims description 3
- 238000011161 development Methods 0.000 abstract description 6
- 238000005516 engineering process Methods 0.000 abstract description 4
- 238000012545 processing Methods 0.000 abstract description 2
- 230000005540 biological transmission Effects 0.000 description 4
- 230000001934 delay Effects 0.000 description 2
- 238000004080 punching Methods 0.000 description 2
- 101150034273 SYS1 gene Proteins 0.000 description 1
- 229910002056 binary alloy Inorganic materials 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000008570 general process Effects 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 239000010985 leather Substances 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/04—Interdomain routing, e.g. hierarchical routing
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a design method of a route selector of a configurable server engine, wherein the route selector comprises a service management module, a route management module and a node communication module; setting configuration information of each service node through an XML configuration file, initializing the nodes, and establishing a process for each node; setting specific service of the node through the def configuration file; sending the received message to a process of a destination node according to a routing table set by a route.xml file; writing the message into the message queue by combining a pipeline and the message queue, and identifying that data in the queue is readable; reading data from the message queue, firstly reading one byte of information from the pipeline, and judging that the message queue has readable data. The invention can flexibly customize the required service processing flow and the data route among a plurality of service modules through the configuration file; the workload of secondary development is greatly saved, and the development trend of the server engine technology in the future is certainly reached.
Description
Technical field
The present invention relates to main frame security fields, the routing of specifically a kind of configurable server engine is selected
Select the design method of device.
Background technique
Nearly ten years, information technology especially computer networking technology is developed rapidly.People have benefited from information leather
While ordering bring huge opportunity, various server communication frameworks come into being, for developer's secondary development side of providing
Just.For existing route selector when handling different business, the code for needing to modify engine could complete the work of exploitation customization,
The workload of secondary development is very big, causes research and development cost very high.
Disclosed related patents file: entitled " signal router and signal method for routing ", this document disclose
A kind of " signal router (14), between a pair of the source (1) and destination (2,5,6) by a plurality of alternate routing
Signal routed.This signal router includes being for determining between source and destination routing by upper transmission
No successful response monitor (17), the record for safeguarding the failure of transmission success in the routing and determine in any routing at
The device (18) of the transmission probability of function and the Route Selection for selecting transmission route according to the probability of success of alternate routing
Device ".
File disclosed above and the content of present invention technical problems to be solved, the technological means of use are different from.
Summary of the invention
Technical assignment of the invention is to provide a kind of design method of the router of configurable server engine.
Technical assignment of the invention realizes that the router includes service management module, routing in the following manner
Management module and node communication module;
Service management module: each business section in multiple service nodes is arranged by XML configuration file for abbreviation BM module
The configuration information of point initializes node by loading the above configuration file, creates a process for each node;Each business
Node has the configuration file of the corresponding .def of a nodename, and the specific industry of the node is arranged by .def configuration file
Business;
Routing management module: abbreviation RM module, according to the routing table that route.xml file is arranged, the message that will be received
It is sent to the process of destination node;
Node communication module: the communication mode between node will be disappeared by the way of combining pipeline and message queue to combine
Message queue is written in breath, while the information of a byte being written into pipeline, and identifying in queue has data readable;From message queue
Data are read, the information of a byte is read first from pipeline, judges that message queue there are data readable.
The specific business of the setting node can be simple pretreatment, can be completed by configuration file;It can also
To be complicated service logic, realized by writing dynamic base.
The message queue source file mainly includes message queue bottom layer driving function and delays for handling queuing data
The public function of punching, the encapsulation of creation, connection, deletion power function including message queue;Server engine can certain intervals
Time data buffering of time sweep, and the data that can be sent are sent in specified queue message queue, while being provided with maximum
Buffer time, more than the deletion message of time.
The workflow of the router is as follows:
1) startup program;
2) initial work is carried out;
3) data are received;
4) code compilation and DECLARE partial code is executed;
5) BEGIN-END partial code is executed;
6) destination node is sent data to.
A kind of design method of the router of configurable server engine of the invention compared to the prior art, can
To pass through the routing of data between the flexible customized required business processing flow of configuration file and multiple business modules;According to not
Same business, it is only necessary to configuration file and dynamic base are write, it is not necessary to modify the codes of engine, and the work that exploitation customizes can be completed,
The workload of secondary development is greatly saved, the trend of future server engine technique development will be become.
Detailed description of the invention
Attached drawing 1 is a kind of work flow diagram of the router of configurable server engine.
Specific embodiment
Embodiment 1:
The router includes service management module, routing management module and node communication module;
Service management module: each business section in multiple service nodes is arranged by XML configuration file for abbreviation BM module
The configuration information of point initializes node by loading the above configuration file, creates a process for each node;Each business
Node has the configuration file of the corresponding .def of a nodename, and the specific industry of the node is arranged by .def configuration file
Business;It can be simple pretreatment, can be completed by configuration file;It is also possible to complicated service logic, it is dynamic by writing
It realizes in state library.
For example, general process flow is different to execute according to the actuating code (act_cod) received in message
The content of dynamic base, specific node1.def is as follows:
DECLARE
BEGIN
STEP001:
SET #sys1="00001"
GOTO STEP003
STEP002:
CHECK #act_code
GOTO STEP003 IF 8501
GOTO STEP004 IF 8502
STEP003:
DO update_1000
GOTO STEP005
STEP004:
DO waf_update_2000
GOTO STEP005
STEP005
END
Wherein: DECLARE keyword is preparation;
BEGIN keyword is the beginning for identifying configuration file;
The end of END keyword identification configuration file;
The value of CHECK keyword inspection variable;
IF keyword is condition judgement;
DO keyword is the dynamic base for executing respective name;
GOTO keyword is skip instruction.
Routing management module: abbreviation RM module, according to the routing table that route.xml file is arranged, the message that will be received
It is sent to the process of destination node;
The profile instance of routing configuration file route.xml is as follows:
<?xml version= "1.0" encoding= "GBK" ?>
<ROUTE>
<ENTRY TARGET="front_req" CONTINUE="TRUE" SEQ="0">
<CHECK NAME="$node0" VALUE="front" />
<CHECK NAME="$node1" VALUE="front" />
</ENTRY>
<ENTRY TARGET="mif" CONTINUE="TRUE" SEQ="1">
<CHECK NAME="$node0" VALUE="front" />
<CHECK NAME="$node1" VALUE="front_req" />
</ENTRY>
<ENTRY TARGET="front_res" CONTINUE="TRUE" SEQ="2">
<CHECK NAME="$node0" VALUE="front" />
<CHECK NAME="$node1" VALUE="mif" />
</ENTRY>
<ENTRY TARGET="front" SEQ="3">
<CHECK NAME="$node0" VALUE="front" />
<CHECK NAME="$node1" VALUE="front_res" />
</ENTRY>
<ENTRY TARGET="front_req" CONTINUE="TRUE" SEQ="4">
<CHECK NAME="$node0" VALUE="front_ssl" />
<CHECK NAME="$node1" VALUE="front_ssl" />
</ENTRY>
<ENTRY TARGET="mif" CONTINUE="TRUE" SEQ="5">
<CHECK NAME="$node0" VALUE="front_ssl" />
<CHECK NAME="$node1" VALUE="front_req" />
</ENTRY>
<ENTRY TARGET="front_res" CONTINUE="TRUE" SEQ="6">
<CHECK NAME="$node0" VALUE="front_ssl" />
<CHECK NAME="$node1" VALUE="mif" />
</ENTRY>
<ENTRY TARGET="front_ssl" SEQ="7">
<CHECK NAME="$node0" VALUE="front_ssl" />
<CHECK NAME="$node1" VALUE="front_res" />
</ENTRY>
</ROUTE>
Wherein, ENTRY represents a routing;
CHECK successful match then executes;
The next destination node of TARGET
The sequence of SEQ routing, in order to which routing table intuitively introduces.
Node communication module: the communication mode between node will be disappeared by the way of combining pipeline and message queue to combine
Message queue is written in breath, while the information of a byte being written into pipeline, and identifying in queue has data readable;From message queue
Data are read, the information of a byte is read first from pipeline, judges that message queue there are data readable.
The message queue source file mainly includes message queue bottom layer driving function and delays for handling queuing data
The public function of punching, the encapsulation of creation, connection, deletion power function including message queue;Server engine can certain intervals
Time data buffering of time sweep, and the data that can be sent are sent in specified queue message queue, while being provided with maximum
Buffer time, more than the deletion message of time.
The workflow of the router is as follows:
1) startup program;
2) initial work is carried out;
3) data are received;
4) code compilation and DECLARE partial code is executed;
5) BEGIN-END partial code is executed;
6) destination node is sent data to.
It is as follows with the relevant data structure of upper module:
Service node data structure:
typedef struct{
int lockid;/ * lock serial number */
char name[32];/ * nodename */
int pid;/ * process number */
int status;/ * starting state */
}TNODE
The data structure of variable node:
typedef struct _t_varnode{
char name[MAX_VARNAME_LEN];
char type;/ * * a- character, b- binary system * */
char *value;
short length;/ * * binary data expression length, * */
struct _t_varnode *next;
}TVARNODE;
The technical personnel in the technical field can readily realize the present invention with the above specific embodiments,.But it answers
Work as understanding, the present invention is not limited to above-mentioned several specific embodiments.On the basis of the disclosed embodiments, the technology
The technical staff in field can arbitrarily combine different technical features, to realize different technical solutions.
Claims (1)
1. a kind of design method of the router of configurable server engine, which is characterized in that the router packet
Containing service management module, routing management module and node communication module;
Service management module: each service node in multiple service nodes is arranged by XML configuration file for abbreviation BM module
Configuration information initializes node by loading the above configuration file, creates a process for each node;Each service node
There is the configuration file of the corresponding .def of a nodename, the specific business of the node is set by .def configuration file;Institute
The specific business for the setting node stated can be simple pretreatment, can be completed by configuration file;It is also possible to complexity
Service logic is realized by writing dynamic base;
Node communication module: the communication mode between node is write message by the way of combining pipeline and message queue to combine
Enter message queue, while the information of a byte being written into pipeline, identifying in queue there are data readable;It is read from message queue
According to the information of one byte of reading, judges that message queue has data readable first from pipeline;
The message queue source file mainly includes message queue bottom layer driving function and buffers for handling queuing data
Public function, the encapsulation of creation, connection, deletion power function including message queue;Server engine can the certain intervals time
A data buffering is scanned, and the data that can be sent are sent in specified queue message queue, while being provided with maximum cushioning
Time, more than the deletion message of time.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610063578.0A CN105490938B (en) | 2016-01-29 | 2016-01-29 | Design method of router of configurable server engine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610063578.0A CN105490938B (en) | 2016-01-29 | 2016-01-29 | Design method of router of configurable server engine |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105490938A CN105490938A (en) | 2016-04-13 |
CN105490938B true CN105490938B (en) | 2019-05-14 |
Family
ID=55677668
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610063578.0A Active CN105490938B (en) | 2016-01-29 | 2016-01-29 | Design method of router of configurable server engine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105490938B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108667726B (en) * | 2018-04-26 | 2021-03-02 | 中体彩科技发展有限公司 | Transaction system and secondary routing control method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216761A (en) * | 2007-12-28 | 2008-07-09 | 北京邮电大学 | Electric communication application software frame for NGN operation development |
WO2009129836A1 (en) * | 2008-04-22 | 2009-10-29 | Telefonaktiebolaget L M Ericsson (Publ) | Signaling gateway for routing signaling messages |
CN101800753A (en) * | 2010-03-16 | 2010-08-11 | 中国电子科技集团公司第三十研究所 | Comprehensive safety protecting method based on integral network safety service framework |
-
2016
- 2016-01-29 CN CN201610063578.0A patent/CN105490938B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101216761A (en) * | 2007-12-28 | 2008-07-09 | 北京邮电大学 | Electric communication application software frame for NGN operation development |
WO2009129836A1 (en) * | 2008-04-22 | 2009-10-29 | Telefonaktiebolaget L M Ericsson (Publ) | Signaling gateway for routing signaling messages |
CN101800753A (en) * | 2010-03-16 | 2010-08-11 | 中国电子科技集团公司第三十研究所 | Comprehensive safety protecting method based on integral network safety service framework |
Also Published As
Publication number | Publication date |
---|---|
CN105490938A (en) | 2016-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10027777B2 (en) | Web page pre-loading optimization | |
CN110741342B (en) | Blockchain transaction commit ordering | |
US12001898B2 (en) | Method and system for processing a stream of incoming messages sent from a specific input message source and validating each incoming message of that stream before sending them to a specific target system | |
CN106170762A (en) | Management includes the interface used by DFD of subgraph | |
CN108319513B (en) | Message transmission method and device in multi-partition operating system | |
CN110764760B (en) | Method, apparatus, computer system, and medium for drawing program flow chart | |
KR101183296B1 (en) | Mechanisms for transferring raw data from one data structure to another representing the same item | |
CN111984303A (en) | Transaction data processing method, device, equipment and storage medium | |
CN112631924A (en) | Automatic testing method and device, computer equipment and storage medium | |
US9407546B2 (en) | Routing a message using a routing table in a dynamic service mesh | |
CN113489593A (en) | JSON message checking method and JSON message checking device | |
CN105490938B (en) | Design method of router of configurable server engine | |
US20210357275A1 (en) | Message stream processor microbatching | |
CN114357029A (en) | Method, device, equipment, medium and program product for processing service data | |
CN116662302A (en) | Data processing method, device, electronic equipment and storage medium | |
CN111951112A (en) | Intelligent contract execution method based on block chain, terminal equipment and storage medium | |
US7990980B2 (en) | Modeling non-deterministic priority queues for efficient model checking | |
US7047239B2 (en) | Method and apparatus for an interactive interface | |
CN115514632A (en) | Resource template arranging method, device and equipment for cloud service and storage medium | |
CN113918525A (en) | Data exchange scheduling method, system, electronic device, medium, and program product | |
Brahneborg et al. | A lightweight architecture analysis of a monolithic messaging gateway | |
US7743386B2 (en) | Context objects for accessing message content | |
CN113934470A (en) | Method for constructing and using federated learning framework and related equipment | |
CN111984202A (en) | Data processing method and device, electronic equipment and storage medium | |
US20240314041A1 (en) | Node state determination method and apparatus, electronic device, and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |