Idtp
IDTP is a communication protocol to tracing messages of things identified by UTDIs, 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 and namespace match. 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
Example of IDTP response:
idtp:0.9/1
code:200 OK
len:17
Header data
+-----------------------------------------------------------------+
+-----------------------------------------------------------------+
+-----------------------------------------------------------------+
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 '