Jump to content

Idtp

From Wikipedia, the free encyclopedia

IDTP (Identifier Tracing Protocol) is a communication protocol to tracing messages of things identified by UTDIs (Utid), which adapt request/response model and like a hybrid of HTTP and Web Service but using JSON data format rather than XML format.

Features

[edit]
  • It uses UTID rather than URL to indicate the destination address.
  • It uses built-in forward mechanism to trace the messages of UTIDs.

Tracing

[edit]

The forward rules are UTID suffix match (called tracing rule in this paper) and namespace match (called tracing track in this paper). The underlying protocol of IDTP may be TCP, UDP, UDP multicast, HTTP, HTTPS, Web Service, or local handling without forwarding.

Request and Response

[edit]

Example of IDTP request:

idtp:0.9/1
utid:125.product~db$com1.test
ns:u.iot.db
name:UtidEcho
len:39

{"refUtid":"312.purchase~db$com2.test"}

Example of IDTP response:

idtp:0.9/1
code:200 OK
len:17

{"msg":"success"}

Header Data

[edit]
+-----------------------------------------------------------------+
|  Field Description                            Request   Response|
+-----------------------------------------------------------------+
|  idtp  Idtp version,request/response version  yes       yes     |
|  utid  Request UTID by client                 yes       no      |
|  ns    Namespace (package) of a request       yes       no      |
|  name  Name of a request                      yes       no      |
|  code  Response status code                   no        yes     |
|  len   User's data length                     yes       yes     |
|  hop   Count of hops, maximum is 8            yes       yes     |
|  hops  List of hops for loop checking         yes       yes     |
|  enc   Encryption parameters                  optional  optional|
+-----------------------------------------------------------------+

Note: The "yes" or "no" in the third and fourth column indicates whether the field exists in request or response header data.

User's Data

[edit]

The user's data is a JSON string or an XML string in one or more lines, which represents serialized data of an object in Object Oriented Languages.

For the consideration of performance and simplicity, the JSON format is recommended.

There is no format type field in header data to indicate that the user's data is in JSON string or in XML string. The format type is easy to determine by checking the first character of the user's data, where '{' stands for JSON string and '<' stand for XML string.

Reference implementation

[edit]

http://sourceforge.net/p/busilet

References

[edit]

http://www.utid.org

https://datatracker.ietf.org/doc/draft-huangng-utid/

https://datatracker.ietf.org/doc/draft-huangng-idtp/