I feel that a server that provides a RESTFul API should not support 
websockets connections. 
Websocket connections implies stateful, server is aware of a persistent 
connection to a client. A RESTFul server implies that there is no notion of 
a client, only request and response and nothing more as it pertains to the 
client.

We have a case where the clients, AngularJS code, communicates with a REST 
node server. Now we have a feature of server "updating" the clients of an 
event. Client can polls, very frequently, for the event happening. Or enter 
the websockets and the notion of publisher/subscriber. To provide that and 
to stay pure to the RESTFul premise, we can add a secondary node server for 
this purpose of pub/sub model.

Am I the only one feeling like mixing RESTful API and websockets is mixing 
metaphors and should be avoided?

Thoughts?



-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/16122e87-bab3-420b-b04f-e6f54734c2b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to