Hi everyone, I just wanted to clarify something that I don't think is clear in Michiels post.
Sockethub
has always had plans for providing functions for queuing
messages from chat services while offline. As well as providing an HTTP
point for accepting POSTs of messages as ActivityStreams. These two things are
what Michiel calls "inbox functionality" but I think that can be misleading to use as a bullet-point feature, as the implementations for the two things are quite different. I use the terms "offline message queuing" for the offline chat functionality, and "incoming requests" for other users/apps contacting you via. your sockethub instance (HTTP POST of an ActivityStream).
As I said this has been part of my vision from the beginning, and it's
always just been a matter of man-hours, and getting other pieces
implemented and stable before venturing into more advanced areas. I've made this clear to Michiel before...
- offline message queuing is a work in progress and many of the pieces are already there (explained further down)
- incoming requests is definitely something I want to add but no work has been done there yet, as there are lots of things which need to be created (apps, for one) before that functionality can be of any use to anyone.
}
}
...
Now, consider another users wants to get a hold of you. They have your sockethub endpoint, and the user address you register as when you connect to it.
With that information they could make an HTTP POST to sockethub, something like:
{
"actor": {
"name": "Michiel B. de Jong"
},
"target": [
{
"platform": "webrtc",
"verb": "invite",
"object": {
// .... webrtc connect information ...
}
}
This is all hypothetical for now, but the idea is that if I'm online, with a WebRTC enabled app, I'd get your invitation for a WebRTC chat.
## Offline Messaging Queue
Now, you also use the term "inbox functionality" to cover storing incoming messages from a chat service like IRC or XMPP, but actually it will be a totally different approach within Sockethub.
As some of you know. Sockethub currently supports XMPP and IRC, and the application Dogtalk is currently in functional prototype phase, however I plan to improve it's quality as I begin working more on the following "offline message queuing" functionality.
Each platform currently has access to a ClientManager object, which acts as sort of a connection pool/manager. It holds the connection objects for you, registers all the listeners. I want to keep this brief, but basically the listeners will handle incoming messages and if there is no current application using the connection object, it will store the message to a storage target. This storage target is abstracted, but if remoteStorage has been configured by the app who initialized the connection, the message can be stored there. The ClientManager is implemented, and writing to remoteStorage is implemented, but the logic and edge cases surrounding how to behave, watching for connection/handler leaks, and what to do when someone never comes back to reclaim their object, are still not fully worked out and implemented.
I hope this gives people a better idea of the goals for Sockethub! Let me know if you have any questions.
Cheers
Nick
Current sockethub apps: