[ejabberd] using PEP to share current location

Simon Tennant simon at imaginator.com
Mon Jul 21 13:54:42 MSD 2008

Peter Saint-Andre wrote:

> Sorry, I didn't pay close attention to the previous messages in this 
> thread. Are those strings node IDs or item IDs? I don't see why you 
> would need prev, "curr", and next with PEP because the node can keep the 
> history of locations published to the "geoloc" node.

node IDs.  So the location server publishes the user's location (at Home 
in this case) thus:

<iq from='user at buddycloud.com' type='set' id='pub1'>
   <pubsub xmlns='http://jabber.org/protocol/pubsub'>
     <publish node='http://jabber.org/protocol/geoloc'>
         <geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>

Some notes:

* http://jabber.org/protocol/geoloc-next should perhaps more accurately 
be called geoloc-intended-next location.  Users use it as a way to show 
their friends where they plan on hanging out.  A user may pass through 
other locations  like "Main Train Station, Munich" on their way there.

* <locality> (or "<description>") then contains:  "Black bean coffee" or 
"drinks @Ed-Moses Bar @ 22:00" or even "Homework free nirvana".  (a real 
place the user selects from their list of places or free text).

* Our logic is currently that "geoloc-prev" is only populated with your 
location once you have moved away from it after having spent more than 
10 minutes there.  Additionally if you arrive at your "geoloc-next" and 
it is a real place like the "Black-Bean Coffee" then we set your geoloc 
node and empty your geoloc-next node.

* I think you will agree that this is a bit more than just recording the 
history of places. We do keep a full history of places passed through in 
the location server's database though.  It got me wondering though: is 
there a way to query a node's history?

 > Why don't you use <description/> for that?

Rereading the XEP-0080 specification, it looks like that is more 
appropriate. Thanks.


PS:  If you are interested in running location based services over XMPP, 
I've updated our XMPP API page: http://blog.buddycloud.com/node/1

Simon Tennant _____________________________________________

fixed: .uk +44 20 7043 6756          .de +49 89 420 955 854
   mob: .uk +44 78 5335 6047          .de +49 17 8545 0880

More information about the ejabberd mailing list