Thank you for your response. I have a lot of experience developing interoperable simulations using DIS and HLA protocols. I did not see a database schema for the LRS in the links that you have provided, although it may be buried within the other links on the various pages? I had already read through a lot of the JSON based stuff for statements, but did not find anything detailed in order to implement an LRS. This is why I started this dialog. I might be missing where an item in a statement is flagged as optional. Again it is probably because I am use to standards (even draft) as defined by IEEE. I am thinking xAPI folks might want to familiarize themselves with those standard protocols as a way forward when working with the training systems type use cases. Reason being that there is a lot of verbose data in the form of strings that could be reduced to an enumeration represented as an integer. The standard should then dictate how to decode those enumerations into meaningful information for the human reader.
{
"id":"fd41c918-b88b-4b20-a0a5-a4c32391aaa0",
"timestamp": "2015-11-18T12:17:00+00:00",
"actor":{
"objectType": "Agent",
"name":"Project Tin Can API",
},
"verb":{
"display":{
"en-US":"sent"
}
},
"object":{
"definition":{
"name":{
"en-US":"simple statement"
},
"description":{
"en-US":"A simple Experience API statement. Note that the LRS
does not need to have any prior information about the Actor (learner), the
verb, or the Activity/object."
}
}
}
}
This is what will be sent over the network for the above (in hex): 7ba9226964223a2266643431633931382d623838622d346232302d613061352d613463333233393161616130222ca92274696d657374616d70223a2022323031352d31312d31385431323a31373a30302b30303a3030222ca9226163746f72223a7ba99226f626a65637454797065223a20224167656e74222ca99226e616d65223a2250726f6a6563742054696e2043616e20415049222ca99226d626f78223a226d61696c746f3a75736572406578616d706c652e636f6d22a97d2ca92276657262223a7ba99226964223a22687474703a2f2f6578616d706c652e636f6d2f786170692f76657262732373656e742d612d73746174656d656e74222ca9922646973706c6179223a7b20a99922656e2d5553223a2273656e742220a997da97d2ca9226f626a656374223a7ba99226964223a22687474703a2f2f6578616d706c652e636f6d2f786170692f61637469766974792f73696d706c6573746174656d656e74222ca9922646566696e6974696f6e223a7ba999226e616d65223a7b20a999922656e2d5553223a2273696d706c652073746174656d656e742220a9997d2ca999226465736372697074696f6e223a7b20a999922656e2d5553223a22412073696d706c6520457870657269656e6365204150492073746174656d656e742e204e6f7465207468617420746865204c525320a9999646f6573206e6f74206e65656420746f206861766520616e79207072696f7220696e666f726d6174696f6e2061626f757420746865204163746f7220286c6561726e6572292c2074686520a9999766572622c206f72207468652041637469766974792f6f626a6563742e2220a9997da997da97da7d
This is 662 bytes. You will have to forgive my ignorance, but I am not sure why you would send the entire question with possible responses, and then the response itself in a statement. If I were implementing this, the database (LRS) would already have a tables the set up with the verbose information already. Time Stamp instead of a string would just be an integer (4 bytes) per ISO 6081. The Actor would be reduced to one integer ID (4 bytes) - ActorInstanceId, the email address string, string name, and "objectType" would just columns in the ActorIsntance table in the database. Like wise verb would be split into two integer IDs (8 bytes), VerbTypeId and VerbId. And then finally Object would just be one integer ID (4 bytes), the description and name strings would already be defined in the database, you don't need to keep sending them. The message would then be (line breaks for clarity):
TimeStamp
ActorInstanceId
VerbTypeId
VerbId
ObjectId
And could look something like this (again, in hex): 546865717569636b62726f776e666f786a756d70
This reduces the network traffic for this one statement from 662 bytes to 20 bytes (ignoring any padding - not needed in this example, but that can be mitigated through the standard). Roughly 33 time smaller in size and there is no processor cycles used on compression/decompression or string compares - O(n) and contains the same exact information as the verbose version. For interoperability, a listener could either be listening to network traffic and already have queried the database for the human readable information that the IDs represent, or they can query the database (LRS) either periodically using UPDATE if the LRS is SQL based (still not sure if it is, need to see a schema for the LRS standard). This will also make the database way more efficient, even if it is represented by a flat file. I would really like to see the proposed database design for the LRS.
Again, this is coming from someone that is pretty much new to xAPI, but have done a lot of simulation training stuff with interoperability for live, virtual, and constructive simulations.