[jdev] Simple Arbitrary Data Exchange

Dave Cridland dave at cridland.net
Tue Sep 24 15:42:46 UTC 2019

On Tue, 24 Sep 2019 at 09:30, Kevin Smith <kevin.smith at isode.com> wrote:

> On 24 Sep 2019, at 09:20, Dave Cridland <dave at cridland.net> wrote:
> >
> > 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.
> It’d depend how wed you are to exactly what you describe there. Swiften’s
> API would make more sense to do message->setSadexType(…) and
> message->setSadexData(), and a callback wouldn’t make much sense, you’d
> just message->getSadexType and message->getSadexData() (or maybe
> message->getSadex()->(get|set)(Data|Type)(). Not what you describe, but
> still equivalent to how subject/body work in the API, and I don’t see a
> problem with adding it.

I think we're looking at a type (something morally equivalent to an XML
namespace) and payload, and we want to ensure both are set or neither.

But you're absolutely right that whatever API is used should fit the
existing APIs of the library.

But ultimately, I'm most interested in a low-friction way of exchanging
application-specific data that will guide people away from doing worse
things. The constraints here would seem to be "easy to use", "obvious", and
probably "in the core/default download".

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.jabber.org/pipermail/jdev/attachments/20190924/ea26f7b8/attachment.html>

More information about the JDev mailing list