[jdev] Simple Arbitrary Data Exchange
Dave Cridland
dave at cridland.net
Tue Sep 24 08:20:31 UTC 2019
Morning all,
I've noticed in a number of places - both places I've worked and places I
know others - that were XMPP is used, there's often a desire to simply
exchange some private application data. Often, that data is in JSON, though
I imagine it occurs in XML sometimes too.
What unfortunately tends to happen is that the data gets stuffed into the
<body/>, and sometimes other "fields" of IM messages are abused in similar
ways.
In the concrete cases I've seen, <subject/> has been used to indicate a
message payload type, with the payload itself stuffed into <body/>. This is
clearly bad practise.
We (more or less) have the right tools for encapsulating JSON into XMPP, so
that is clearly not enough for newcomers to XMPP to make the "right"
decision. Instead, they're using existing, easy-to-use APIs in client
libraries to find a low-cost, pragmatic solution - but thereby painting
themselves into a corner in the long term.
Is there interest amongst the developer community to provide a generalised,
interoperable facility for the exchange of simple, arbitrary data between
consenting entities? I'm calling this SADEX, but I'm really, really, not
wed to this name.
The key here would be the API - you'd want to provide the equivalent of a
function call such as:
void sadex_message(JID to, String type, String data)
You'd also need a callback for when you receive some, and perhaps an IQ
form.
The wire format is pretty trivial, and largely uninteresting, but I'm happy
to sketch something out in a XEP if people want something concrete to work
against - but mostly I'd like to know if there's interest.
Dave.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20190924/9e2beda7/attachment.html>
More information about the JDev
mailing list