Table of Contents

Pidiod

Functionality

Terminology

Pitfalls

Design

Tables

Database maintenance

Data maintenance is done every time a table is written too or read from.

Protocol

Format is as follow: (“<FUNCTION>”, “<PARAMETERS…>” ⇒ “<SUCCESS>, <ERROR” | “<fields>”):

Example:

Send:
 ("PUT", "id1 id2 location ttl" "OK") => "OK"|"FAILED" : "PUT\n" 
                                                    "id1: <id>\n"
                                                    "id2: <another id>\n"
                                                    "location: <location>\n"
                                                    "ttl: <ttl>\n"
                                                    "\n"
Answer (on success):
                                                    "status: OK\n"
                                                    "msg: <STATUS MSG>\n"
                                                    "\n"

Ie. every line terminated by “\n” and each parameter takes an argument and has its own line. The request is terminated by “\n”. NOTE! Similar to input parameters an answer can to be a list.

("PUT", "id1 id2 location ttl") => "OK, FAILED, WRONG_ID_TYPE, UNKNOWN_ID"

Put IDs (Genuine or Pseudo) on location with ttl.

("GET", "location") => "OK, FAILED, UNKNOW_ID"|"pa_id, op_id"

Get list of IDs (Genuine IDs) mapped to location.

("CLEAR", "location") => "OK, FAILED"

Clear all IDs (Genuine IDs) on location.

("MAP", "id1 id2 ttl") => "OK, FAILED, WRONG_ID_TYPE"

Map Pseudo ID to Genuine ID with ttl. Note! One of the IDs must be a Pseudo ID.

("UNMAP", "id" ) => "OK, FAILED, WRONG_ID_TYPE"

Unmap Pseudo ID from a genuine ID.

("LOOKUP", "id") => "OK, FAILED, WRONG_ID_TYPE"|"type={ps_id, ge_id}, id"

Lookup of ID mapped to id and its type (of the mapped to id).

TODO

Next Version

Current Version