DNS Service Discovery - the right way to discover the buddycloud API

47 views
Skip to first unread message

Simon Tennant

unread,
May 14, 2013, 10:41:04 AM5/14/13
to buddycl...@googlegroups.com
Hi Guys:

After some help from Rene and a few emails backwards and forwards with the DNS-SD RFC author, this is the "right way" for clients (like the android client) to discover the API.

The benefit of this is that it lest us point to a path within an existing vhost (something that SRV records didn't permit).
_buddycloud-api._tcp.EXAMPLE.COM.          IN TXT "v=1.0" "host=buddycloud.EXAMPLE.COM" "protocol=https" "path=/api" "port=443"

I think it's pretty self explanatory.


I've updated the install docs.
@guilherme, don't forget to update your API discovery tests too.

S.

--
Simon Tennant | buddycloud.com | +49 17 8545 0880 | office hours: goo.gl/tQgxP

Guilherme Santos

unread,
May 14, 2013, 11:51:17 AM5/14/13
to buddycloud-dev
Great. The discovery tests will be looking for a TXT record matching the the exact format above.


--
You received this message because you are subscribed to the Google Groups "buddycloud-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to buddycloud-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Guilherme Santos Galvão Baptista
UW-Madison Exchange Student - CS Major
UW-Madison/CHTC Condor Developer
SnowShoe Inc. Software Developer Intern
UFCG Undergraduate Student - CS Major
LSD (Distributed Systems Laboratory) Former Scholar
OurGrid Former Developer

Peter Saint-Andre

unread,
May 14, 2013, 12:07:36 PM5/14/13
to buddycl...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why not use the XEP-0156 format?

http://xmpp.org/extensions/xep-0156.html

If that doesn't cover everything you need, we can improve and update
the spec.

Peter

On 5/14/13 9:51 AM, Guilherme Santos wrote:
> Great. The discovery tests will be looking for a TXT record
> matching the the exact format above.
>
>
> On Tue, May 14, 2013 at 11:41 AM, Simon Tennant
> <si...@buddycloud.com <mailto:si...@buddycloud.com>> wrote:
>
> Hi Guys:
>
> After some help from Rene and a few emails backwards and forwards
> with the DNS-SD RFC author, this is the "right way" for clients
> (like the android client) to discover the API.
>
> The benefit of this is that it lest us point to a path within an
> existing vhost (something that SRV records didn't permit).
>
> _buddycloud-api._tcp.EXAMPLE.COM <http://tcp.EXAMPLE.COM>.
> IN TXT "v=1.0" "host=buddycloud.EXAMPLE.COM
> <http://buddycloud.EXAMPLE.COM>" "protocol=https" "path=/api"
> "port=443"
>
>
>
>
> I think it's pretty self explanatory.
>
>
> I've updated the install docs. @guilherme, don't forget to update
> your API discovery tests too.
>
> S.
>
> -- Simon Tennant | buddycloud.com <http://buddycloud.com> | +49 17
> 8545 0880 <tel:%2B49%2017%208545%200880> | office hours:
> goo.gl/tQgxP <http://goo.gl/tQgxP>
>
> -- You received this message because you are subscribed to the
> Google Groups "buddycloud-dev" group. To unsubscribe from this
> group and stop receiving emails from it, send an email to
> buddycloud-de...@googlegroups.com
> <mailto:buddycloud-dev%2Bunsu...@googlegroups.com>. For more
> options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
>
> -- Guilherme Santos Galv�o Baptista UW-Madison Exchange Student -
> CS Major UW-Madison/CHTC Condor Developer SnowShoe Inc. Software
> Developer Intern UFCG Undergraduate Student - CS Major LSD
> (Distributed Systems Laboratory) Former Scholar OurGrid Former
> Developer
>
> -- You received this message because you are subscribed to the
> Google Groups "buddycloud-dev" group. To unsubscribe from this
> group and stop receiving emails from it, send an email to
> buddycloud-de...@googlegroups.com. For more options,
> visit https://groups.google.com/groups/opt_out.
>
>


- --
Peter Saint-Andre
https://stpeter.im/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRkmFIAAoJEOoGpJErxa2ppEgP/0YzxQ7IM54nqGCMGiassTX0
1p7iN9+oIwU/2eNoFN1RxOEY2HblKX+QdngDvkO4BTU0kqc46AXREe63VAUjUH6V
RMboCBKsTCn7nVXjLZHaNREVoHFVue5uGxRzihaWTkocyj3cy/atXWRv/2Ywm9Gw
TeffweGSy6QIBZDna6hZ3paKeJbiqnwM2siNwCa2+zbrXxyzRdcl/S4df9TFGwBg
oOqKdzSQcfMWiDskHTUqbgltDZCVKlPEkNkETV5meYmiqlqFw5da1Nrt/kQBNzbN
Z8EIM70QcG4B0TTYGc2Rr0Xbmablbh9KH4qE2op8DBAylfJrz0TNz+Gz7sUZo9dW
ePl2kpBvGXBoY1RlF4eaIRZkeSSPdd2cn+ihyqAg5nlQKLY0tqUomK4GpsQ8wueC
XMZfm26s04TR1y9ZvTSc9Hj7mNGkTf80vKOX/wjnOkRERp1NMp8KmfrxtAEnZvmK
jEe3K2nCvkxy60tNhriOgh8t55rMGfZaMZrmCD+gy81hdq4PBh3BiSVjulWHrK4I
kZO51n7a2dBcVTpLnuTzq62IDSJ67Qc8tP+Z+QhNtDpfF388I+w4lQxlJPqrAOju
S0kgtds8YozW6eSx1c5A7Ik/l6/caT2tIj77OhuyahZb3CAYQ902aqgEE6LpNQ/I
Oa1sCYlOOxuJpau206Ci
=mXHR
-----END PGP SIGNATURE-----

Simon Tennant

unread,
May 14, 2013, 12:22:56 PM5/14/13
to buddycl...@googlegroups.com
@peter - it would seem that the DNS-SD spec calls for key-value pairs (https://tools.ietf.org/html/rfc6763#section-6.3) that describe attributes of the service.

This approach also gives us versioning of the API endpoint and lets us hook into the existing DNS-SD libraries (I've seen a few around).

S,


> options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
>
> -- Guilherme Santos Galvão Baptista UW-Madison Exchange Student -

Peter Saint-Andre

unread,
May 14, 2013, 12:32:29 PM5/14/13
to buddycl...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Oh, you are right -- I thought you were trying to discover the XMPP
connection method, not do all that DNS-SD magic. What you posted looks
right to me.

Sorry about the noise!

On 5/14/13 10:22 AM, Simon Tennant wrote:
> @peter - it would seem that the DNS-SD spec calls for key-value
> pairs (https://tools.ietf.org/html/rfc6763#section-6.3) that
> describe attributes of the service.
>
> This approach also gives us versioning of the API endpoint and lets
> us hook into the existing DNS-SD libraries (I've seen a few
> around).
>
> S,
>
>
> On 14 May 2013 18:07, Peter Saint-Andre <stp...@stpeter.im
> <mailto:stp...@stpeter.im>> wrote:
>
> Why not use the XEP-0156 format?
>
> http://xmpp.org/extensions/xep-0156.html
>
> If that doesn't cover everything you need, we can improve and
> update the spec.
>
> Peter
>
> On 5/14/13 9:51 AM, Guilherme Santos wrote:
>> Great. The discovery tests will be looking for a TXT record
>> matching the the exact format above.
>
>
>> On Tue, May 14, 2013 at 11:41 AM, Simon Tennant
>> <si...@buddycloud.com <mailto:si...@buddycloud.com>
> <mailto:si...@buddycloud.com <mailto:si...@buddycloud.com>>>
> wrote:
>
>> Hi Guys:
>
>> After some help from Rene and a few emails backwards and
>> forwards with the DNS-SD RFC author, this is the "right way" for
>> clients (like the android client) to discover the API.
>
>> The benefit of this is that it lest us point to a path within an
>> existing vhost (something that SRV records didn't permit).
>
>> _buddycloud-api._tcp.EXAMPLE.COM <http://tcp.EXAMPLE.COM>
> <http://tcp.EXAMPLE.COM>.
>> IN TXT "v=1.0" "host=buddycloud.EXAMPLE.COM
> <http://buddycloud.EXAMPLE.COM>
>> <http://buddycloud.EXAMPLE.COM>" "protocol=https" "path=/api"
>> "port=443"
>
>
>
>
>> I think it's pretty self explanatory.
>
>
>> I've updated the install docs. @guilherme, don't forget to
>> update your API discovery tests too.
>
>> S.
>
>> -- Simon Tennant | buddycloud.com <http://buddycloud.com>
> <http://buddycloud.com> | +49 17
>> 8545 0880 <tel:%2B49%2017%208545%200880> | office hours:
>> goo.gl/tQgxP <http://goo.gl/tQgxP> <http://goo.gl/tQgxP>
>
>> -- You received this message because you are subscribed to the
>> Google Groups "buddycloud-dev" group. To unsubscribe from this
>> group and stop receiving emails from it, send an email to
>> buddycloud-de...@googlegroups.com
> <mailto:buddycloud-dev%2Bunsu...@googlegroups.com>
>> <mailto:buddycloud-dev%2Bunsu...@googlegroups.com
> <mailto:buddycloud-dev%252Buns...@googlegroups.com>>. For
> more
>> options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
>
>> -- Guilherme Santos Galv�o Baptista UW-Madison Exchange Student
>> - CS Major UW-Madison/CHTC Condor Developer SnowShoe Inc.
>> Software Developer Intern UFCG Undergraduate Student - CS Major
>> LSD (Distributed Systems Laboratory) Former Scholar OurGrid
>> Former Developer
>
>> -- You received this message because you are subscribed to the
>> Google Groups "buddycloud-dev" group. To unsubscribe from this
>> group and stop receiving emails from it, send an email to
>> buddycloud-de...@googlegroups.com
> <mailto:buddycloud-dev%2Bunsu...@googlegroups.com>. For more
> options,
>> visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
> -- You received this message because you are subscribed to the
> Google Groups "buddycloud-dev" group. To unsubscribe from this
> group and stop receiving emails from it, send an email to
> buddycloud-de...@googlegroups.com
> <mailto:buddycloud-dev%2Bunsu...@googlegroups.com>. For more
> options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
>
> -- Simon Tennant | buddycloud.com <http://buddycloud.com> | +49 17
> 8545 0880 | office hours: goo.gl/tQgxP <http://goo.gl/tQgxP>
>
> -- You received this message because you are subscribed to the
> Google Groups "buddycloud-dev" group. To unsubscribe from this
> group and stop receiving emails from it, send an email to
> buddycloud-de...@googlegroups.com. For more options,
> visit https://groups.google.com/groups/opt_out.
>
>

- --
Peter Saint-Andre
https://stpeter.im/


-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRkmcdAAoJEOoGpJErxa2ph68P/26Vst7n8bjHlQ6bhqBHN1S+
Z9UHH8UZFuQirSum/UHTZe7y4fcoN/VCkd1onZTeT7Jw19uTZhY+IJarKrl4Q4vC
OWuW7vlJuYsvf1VbgoYolO741UZxLUMUNvZ4WdUSqub1KK8fdZANVvI3/pL/zdwW
94FDHAA2eZP5zK+yh1nJawZ8l6f93Gczjaa9Uw7+SLRKSf/tLlgEpFUPxROExFYy
DQYK7ZCK4RJS48tuVZVAGcpNR5gZfGOrvzQ8sMoIoo1b1XNk0ANlm8v9rokkVv2w
XiWzymFD/c6Mo+sUIZy0+6NOeOOD0zepA9gqFhvCPasZ9WhZUnjQT1QoNKW4B7OW
T7zR15liWwHTyVm6Axb7cMTw41jQto1ULjp7/Lw9ZDaSnofecxZiZU9rvdEpvHbr
3Ts3aDCdBLWOZArTQF5nbx1iIGl+LQyF+ylNYynudH5LWHdjuXWgmqD0rDQW5WS0
zSNeGIBIKLeoyuWKZ+dqfl1nQHJ9hJqTYsiIFsv5Fsa6px988N6im72wePTxs4wD
5AJ73HPtNqIl9SCEP2NiHV/P3pYTzBiJ9AGrbKaoSIpp5rWEmavNGanhTs6BTpbs
Mq3+UWnPK45JSN24qQFiTPpYEky5vim2CdjtqFGZhQEhhmPg3NbEqefgmmBg961W
tJrkbu6FUBHenXW64Nxo
=YSVa
-----END PGP SIGNATURE-----
Reply all
Reply to author
Forward
0 new messages