hellozedan / node-xmpp-bosh

Automatically exported from code.google.com/p/node-xmpp-bosh
0 stars 0 forks source link

Move route_parse() out of bosh.js and into lookup-service.js #24

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Route should be opaque to bosh.js to allow for different route formats (I 
think).

1. Comment on the truth value of the above statement w.r.t the BOSH XEP.

2. If the statement is true, then move it out of bosh.js and into 
lookup-service.js and adjust parameters passed to the lookup service.

Original issue reported on code.google.com by dhruvb...@gmail.com on 11 Sep 2011 at 12:43

GoogleCodeExporter commented 8 years ago
Should we pass the stream object (formerly sstate) to the lookup-service to 
take whatever it wants and interpret it in the way it wants to do the lookup 
and connect the socket?

The use case can be that the lookup service may also require some other 
parameter like the jid of the user to get the host on which the user is being 
served! 

Original comment by anup.kal...@gmail.com on 19 Oct 2011 at 5:29

GoogleCodeExporter commented 8 years ago
It's best to avoid this since lookup-service would become tightly coupled with 
the concept of a stream. If we know what all information the lookup-service 
might potentially need, I guess it's best to provide it with that information. 
This could be done by way of a map passed to it that contains the parameters, 
but then they need to be documented to aid readability.

However, having said that, lookup-service could take in an options parameter 
that specialized lookup-service instances can take advantage of. In your case, 
"stream" could be that options object.

Original comment by dhruvb...@gmail.com on 19 Oct 2011 at 5:44