Receiving the online status of a user

21 views
Skip to first unread message

ni...@silverbucket.net

unread,
Apr 17, 2013, 11:38:13 AM4/17/13
to activity...@googlegroups.com
(apologies if this is a duplicate post - I sent this to the list a week ago and it appears as if it never went through)

Hi all,

 I am in the process of implementing a set of XMPP actions using AS as the protocol. I'm using the friend request set of verbs to add/remove people from your roster (request, remove, make-friend), and send (obviously) for sending/receiving messages.

 However I'm at a loss to find something appropriate for things like buddy state notifications. Both initial state (when signing in) and changed state. The types of state from XMPP are ONLINE, OFFLINE, DND, AWAY. However there's no real verb to describe that a user is publishing their state notification.

There are two ways I was thinking about it. Either 4 different verbs that can match up with each possible state, or - perhaps a better approach - to find one verb which implies a state change for the user, with the content of that change contained in the obejct.

Does anyone have any ideas as to what verb would fit in this case?

Cheers
Nick

kevin long

unread,
Apr 17, 2013, 11:53:55 AM4/17/13
to activity...@googlegroups.com
I suggest keeping to one verb.

announce/notify/publish status


--
You received this message because you are subscribed to the Google Groups "Activity Streams" group.
To unsubscribe from this group and stop receiving emails from it, send an email to activity-strea...@googlegroups.com.
To post to this group, send email to activity...@googlegroups.com.
Visit this group at http://groups.google.com/group/activity-streams?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Chris Messina

unread,
Apr 17, 2013, 12:54:24 PM4/17/13
to activity...@googlegroups.com
Why not just use the existing XMPP protocol for providing this information... unless you're trying to represent this in a UI somehow, I'm not sure that the AS model makes more sense than something native (and hopefully cross platform) to XMPP.

Peter Saint-Andre

unread,
Apr 17, 2013, 1:26:47 PM4/17/13
to activity...@googlegroups.com, Chris Messina
On 4/17/13 10:54 AM, Chris Messina wrote:
> Why not just use the existing XMPP protocol for providing this
> information... unless you're trying to represent this in a UI somehow,
> I'm not sure that the AS model makes more sense than something native
> (and hopefully cross platform) to XMPP.
>
> http://xmpp.org/extensions/xep-0310.html
>
Yes, it would be helpful to know a bit more about the use case here.
There are plenty of XMPP libraries out there (and in the XMPP community
we've been doing a lot of work to make the technology more
web-friendly), so I'd expect you can probably solve the problem you've
got with native XMPP methods rather than Activity Streams. Not that I'm
opposed to mixing and matching the two in interesting ways. :-)

Peter

Chris Messina

unread,
Apr 17, 2013, 11:09:48 PM4/17/13
to Peter Saint-Andre, activity...@googlegroups.com
Yeah, I think mixing and matching makes more sense; AS wasn't intended as an all-encompassing format. It was of a "receipt" format for what you've already done, rather than your current status (though I admit that "setting" your status could be represented in AS — it just might not be very useful to do so).

James M Snell

unread,
Apr 17, 2013, 11:15:06 PM4/17/13
to activity...@googlegroups.com

+1

Nick Jennings

unread,
Apr 19, 2013, 8:10:08 AM4/19/13
to activity...@googlegroups.com
What I'm going for here, is to find a way to indicate a users status without using a specific protocol. One protocol that can act on an AS object that indicates a users online status is XMPP, but not only XMPP. Most messaging protocols (MSN, AIM, ICQ, Yahoo!) have user status indication, and there could be other, non-messaging, platforms which might have a users online status as well.

Sockethub[1] aims to abstract protocols from application developers. The developer sends an AS object to the Sockethub bus, and the protocol specifics are all handled by the platform specified.

If you can indicate a user has read a blog post, or watered a virtual tomato patch, then it seems fair to assume there are use cases of an activity stream showing a users online status (if they care to publish it).

[1] http://sockethub.org

☮ elf Pavlik ☮

unread,
Apr 20, 2013, 2:59:31 PM4/20/13
to activity-streams
Excerpts from Peter Saint-Andre's message of 2013-04-17 17:26:47 +0000:
I personally <3 XMPP but with AS one can get by with HTTP + JSON only, with XMPP it all becomes more heavy IMO

☮ elf Pavlik ☮

unread,
Apr 20, 2013, 3:00:43 PM4/20/13
to activity-streams
Excerpts from Nick Jennings's message of 2013-04-19 12:10:08 +0000:
> What I'm going for here, is to find a way to indicate a users status
> without using a specific protocol. One protocol that can act on an AS
> object that indicates a users online status is XMPP, but not only XMPP.
> Most messaging protocols (MSN, AIM, ICQ, Yahoo!) have user status
> indication, and there could be other, non-messaging, platforms which might
> have a users online status as well.
maybe taking a look at http://online-presence.net + http://json-ld.org could offer some inspirations?

Evan Prodromou

unread,
Apr 20, 2013, 3:29:49 PM4/20/13
to activity...@googlegroups.com
Nick,

Maybe online status is a property of the profile. So setting my status to "DND" might be something like:

    {
        "actor": {"id": "acct:ev...@site.example", "objectType": "person"},
        "verb": "update",
        "object": {"id": "acct:ev...@site.example",
                         "objectType": "person",
                         "xmpp_org": {
                             "presence": "dnd"
                         }
                        }
     }

That is, "Evan updated Evan to have a presence of 'dnd'".

Here, I'm using the "account management" schema off the wiki:

http://wiki.activitystrea.ms/w/page/57887490/Account-management

...as well as a made-up xmpp.org namespace.

-Evan

Melvin Carvalho

unread,
Apr 21, 2013, 4:44:49 AM4/21/13
to activity-streams

+1

I almost forgot about OPO, it seems well suited:

[[

Instance: opo:DoNotDisturb

URI: http://online-presence.net/opo/ns#DoNotDisturb

DoNotDisturb - The Agent is busy and does not want to be contacted by other Agents.

]] 

Is it possible to have a full URI as a property in AS?  Otherwise, as elf suggests, you can use JSON LD, which I think will become a W3C REC in the next few months ...

Melvin Carvalho

unread,
Apr 21, 2013, 8:41:45 AM4/21/13
to activity-streams
On 20 April 2013 21:29, Evan Prodromou <evan.pr...@gmail.com> wrote:
Nick,

Maybe online status is a property of the profile. So setting my status to "DND" might be something like:

    {
        "actor": {"id": "acct:ev...@site.example", "objectType": "person"},
        "verb": "update",
        "object": {"id": "acct:ev...@site.example",
                         "objectType": "person",
                         "xmpp_org": {
                             "presence": "dnd"
                         }
                        }
     }

That is, "Evan updated Evan to have a presence of 'dnd'".

IMHO, the semantics of this is slightly confusing.  

It would seem that the actor is both an "account" and a "person".

That is, assuming that the new acct: scheme gets both approved and adopted, which we're probably at least a couple of years away from.
 

Here, I'm using the "account management" schema off the wiki:

http://wiki.activitystrea.ms/w/page/57887490/Account-management

...as well as a made-up xmpp.org namespace.

-Evan


On Wednesday, April 17, 2013 11:38:13 AM UTC-4, ni...@silverbucket.net wrote:
(apologies if this is a duplicate post - I sent this to the list a week ago and it appears as if it never went through)

Hi all,

 I am in the process of implementing a set of XMPP actions using AS as the protocol. I'm using the friend request set of verbs to add/remove people from your roster (request, remove, make-friend), and send (obviously) for sending/receiving messages.

 However I'm at a loss to find something appropriate for things like buddy state notifications. Both initial state (when signing in) and changed state. The types of state from XMPP are ONLINE, OFFLINE, DND, AWAY. However there's no real verb to describe that a user is publishing their state notification.

There are two ways I was thinking about it. Either 4 different verbs that can match up with each possible state, or - perhaps a better approach - to find one verb which implies a state change for the user, with the content of that change contained in the obejct.

Does anyone have any ideas as to what verb would fit in this case?

Cheers
Nick

--
Reply all
Reply to author
Forward
0 new messages