flyweb / spec

Web API specification for enabling web pages to publish local-area servers
105 stars 3 forks source link

Merge FlyWebService and FlyWebServerHandle/FlyWebClientHandle #2

Closed sicking closed 9 years ago

sicking commented 9 years ago

Rather than require that the webpage take a separate step to connect to a given service, why not immediately connect to all user-selected services?

The PresentationAPI spec allows a connection to get temporarily disconnected due to network issues, but then reestablished, without using multiple objects. We could copy that state handling instead.

Is there a reason to disconnect from a flyweb device and the reconnect? Why not just leave the connection open? An idle TCP connection should not be expensive to maintain and things like TCP-slowstart encourages keeping connections open rather than constantly disconnect and reconnect.

kannanvijayan-zz commented 9 years ago

The connection step follows from the prior choice of allowing the page to obtain a list of all services. In that case, the page chooses which one (or ones) to connect to, and has an opportunity to signal the UA to engage in pairing with the service in question.

If the listing-of-services was removed as you suggested in issue 3, and the UA prompted the user to directly select a set of services to connect the page to, then the pairing activity could be embedded directly into that interaction, instead of being a separate step.