Idtp

Source: 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

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

Tracing

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

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

+-----------------------------------------------------------------+
|  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

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

http://sourceforge.net/p/busilet

References

http://www.utid.org

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

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

This page is based on the copyrighted Wikipedia article: Idtp. Articles is available under the CC BY-SA 3.0 license; additional terms may apply.Privacy Policy