i'd go for a separate server. for several reasons, not only for separation 
of concerns. a rest-server and a pub/sub server can have differend load and 
usage profiles, and might need separate scaling strategies.

Am Mittwoch, 27. August 2014 05:38:34 UTC+2 schrieb Reza Razavipour:
>
> 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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/84a8570d-3592-4a43-a929-3639a516d083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to