source: subversion/applications/utils/mod_tile/protocol.h @ 29086

Last change on this file since 29086 was 17688, checked in by apmon, 10 years ago

[mod_tile / renderd] Add two more priority levels into the queues of renderd

In addition to the request queue and the dirty queue, there are now also a requestPrio and requestBulk queue.
The rendering order now is first render requests from requestPrio, then from request followed by the
dirty queue and finally if no other requests are queued, render from the requestBulk queue.

RequestPrio?, Request and RequestBulk? all block, whereas Diry immediately returns with NotDoneYet?.

This also changes mod_tile to submit requests that if not rendered in time would result in 404 errors as high priority.

prioBulk should be useful for things like rerendering all the outdated tiles in the background, but this patch
does not include those changes.

File size: 884 bytes
Line 
1#ifndef PROTOCOL_H
2#define PROTOCOL_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8/* Protocol between client and render daemon
9 *
10 * ver = 2;
11 *
12 * cmdRender(z,x,y,xmlconfig), response: {cmdDone(z,x,y), cmdBusy(z,x,y)}
13 * cmdDirty(z,x,y,xmlconfig), no response
14 *
15 * A client may not bother waiting for a response if the render daemon is too slow
16 * causing responses to get slightly out of step with requests.
17 */
18#define TILE_PATH_MAX (256)
19#define PROTO_VER (2)
20#define RENDER_SOCKET "/tmp/osm-renderd"
21#define XMLCONFIG_MAX 41
22
23enum protoCmd { cmdIgnore, cmdRender, cmdDirty, cmdDone, cmdNotDone, cmdRenderPrio, cmdRenderBulk };
24
25struct protocol {
26    int ver;
27    enum protoCmd cmd;
28    int x;
29    int y;
30    int z;
31    char xmlname[XMLCONFIG_MAX];
32};
33
34struct protocol_v1 {
35    int ver;
36    enum protoCmd cmd;
37    int x;
38    int y;
39    int z;
40};
41
42#ifdef __cplusplus
43}
44#endif
45#endif
Note: See TracBrowser for help on using the repository browser.