Max Romanov
b0c1e740cf
New process port exchange changed. READY message type introduced.
...
Application process start request DATA message from router to master.
Master notifies router via NEW_PORT message after worker process become ready.
2017-07-12 20:32:16 +03:00
Valentin Bartenev
c38bcb7d70
Controller: proper reconfiguration requests handling.
...
Now controller serializes all reconfiguration requests
and waits for result from router.
2017-07-12 20:21:17 +03:00
Max Romanov
74cda90e31
Process stop notification from master to all other processes.
...
New port message type introduced NXT_PORT_MSG_REMOVE_PID. Default handler
removes process description from nxt_runtime_t with all ports, incoming and
outgoing mmaps etc.
2017-07-07 16:01:34 +03:00
Max Romanov
e7a0634a71
Application-side message processing.
...
Usage on the router side:
nxt_app_wmsg_t wmsg;
nxt_app_parse_ctx_t parse_ctx;
nxt_app_http_req_init(task, &parse_ctx);
/* parse incoming request data */
if (nxt_app_http_req_parse(task, &parse_ctx, buf) == NXT_DONE) {
/* choose app */
nxt_app = nxt_select_app(... &parse_ctx.r ...);
/* find port */
wmsg.port = nxt_get_app_port(... nxt_app ...);
wmsg.buf = &wmsg.write;
/* fill write message buffer in shared mem */
nxt_app->prepare_msg(task, &parse_ctx.r, &wmsg);
/* send message to app for processing */
nxt_port_socket_write(task, wmsg.port, NXT_PORT_MSG_DATA,
-1, 0, 0, wmsg.write);
}
2017-06-23 19:20:08 +03:00
Max Romanov
0fdcdde6c8
lvlhash for ports moved to separate files for future re-use.
2017-06-23 19:19:41 +03:00
Max Romanov
58e20da984
Runtime ports fix, add enumeration macros.
2017-06-23 19:19:41 +03:00
Igor Sysoev
f888a5310c
Using new memory pool implementation.
2017-06-20 19:49:17 +03:00
Igor Sysoev
5bc011afad
Skeleton of router configuration and request processing.
2017-05-31 15:26:45 +03:00
Max Romanov
f7b4bdfd89
Using shared memory to send data via nxt_port.
...
Usage:
b = nxt_port_mmap_get_buf(task, port, size);
b->mem.free = nxt_cpymem(b->mem.free, data, size);
nxt_port_socket_write(task, port, NXT_PORT_MSG_DATA, -1, 0, b);
2017-05-12 20:32:41 +03:00
Igor Sysoev
6f2c9acd18
Processes refactoring.
...
The cycle has been renamed to the runtime.
2017-03-09 18:03:27 +03:00