[jdev] Driving/Routing directions via XMPP

Trejkaz Xaoza trejkaz at xaoza.net
Tue Aug 17 06:56:24 CDT 2004


On Tue, 17 Aug 2004 03:20, Stephen Pendleton wrote:
> The proposed protocol is listed below, but I would like feedback on the
> protocol before drafting a JEP. If you have any comments please let me
> know, either by replying to the post - or sending me email directly.

This does sound like a good idea.  Unless, of course, the destination location 
is continuously moving. :-D  But I guess that just means the person doing the 
query will need to ask the question again each time the destination changes.  
Car chase via Jabber!  Nice diversion.  Anyway...

> Requesting and Returning Routing Information with XMPP
>
> Entities can request routing information between two jids or two locations
> specified by either latitude/longitude pairs or the postal address of the
> endpoints.

The postal address is the bit which interests me the most.  It makes me wonder 
whether it belongs, or whether the user should perform a separate query to 
convert the postal address into a lat&long.  That way, the query just passes 
a lat&long in all cases, which makes life simpler.

> Entity requests routing information between postal address pairs 4555 Main
> Street,Philadelphia PA,USA,19117 and 9000 West Elm Street,Philadelphia
> PA,USA,19117 :
>
> <iq
>     to='lbs at movsoftware.com/lbs'
>     from=' juliet at capulet.com/balcony'
>     type='get'
>     id='route1'>
>   <query xmlns='http://www.movsoftware.com/protocol/routing'>
>     <src street= '4555 Main Street ' city='Philadelphia' state = 'PA'
> country='USA' code='19117'/ >
>     <dst street= '9000 West Elm Street ' city='Philadelphia' state = 'PA'
> country='USA' code='19117'/ >

Careful of the inconsistent XML schema.  Users can easily craft evil stuff 
like this:

    <src street='4555 Main Street' jid='bob at jabber.org'/>

Uh-oh, which do we use?  The main street from the query?  Or the main street 
from the user's actual location?  Better if these children were elements, 
sort of like...

    <src>
        <street>4555 Main Street</street>
    </src>

That allows you to have a constraint where street and jid are mutually 
exclusive, without resorting to RELAX NG.  And it doesn't add too many 
characters evil. :-)

>     <segment id = '1'>Depart Start on Chevy Chase Lake Dr (West)</segment>
>     <segment id = '2'>Turn RIGHT (North) onto SR-185 [Connecticut
> Ave]</segment>
>     <segment id = '3'>Take Ramp (Right) onto I-495 [I-495
> Outerloop]</segment>
>     <segment id = '4'>Turn RIGHT (South) onto S Sherwood Rd [Sherwood Rd]
> </segment>

I would love to see some structure in these, so that non-English users don't 
get turned off.  The street element might even find some use again, who 
knows.  Something like...
    <segment id='4'>
        <turn dir="right">
            <street>S Sherwood Rd</street>
        </turn>
    </segment>

The only question would be how to specify things like ramps, bridges, compass 
directions, with regards to this.  Perhaps there could be multiple turn 
attributes.  One for direction, one for compass/orientation, one for a 
description?  But the description might want to be internationalisable.

Also, be careful of using terms like "city".  My address has a "suburb" and a 
"state", but the same can't be said for every location in the world.  I've 
seen schemas use "locality" (city/suburb/town) and "region" (state/province) 
to get around this snag.

Anywhere that addresses are involved it would be nice to have cooperation 
between different JIDs trying to do the same thing.  Whatever succeeds 
vcard-temp would LOVE it if your address and their address formats were the 
same.  And so would everyone writing the clients to support these 
features. :-)

That's all off the top of my head!

TX


-- 
'Every sufficiently advanced technology is indistinguishable from magic' - 
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' - Tom 
Graves

             Email: Trejkaz Xaoza <trejkaz at xaoza.net>
          Web site: http://xaoza.net/trejkaz/
         Jabber ID: trejkaz at jabber.xaoza.net
   GPG Fingerprint: 9EEB 97D7 8F7B 7977 F39F  A62C B8C7 BC8B 037E EA73



More information about the JDev mailing list