When you start your node server, create 1 LivedataServer
.
Say you've defined 10 "subscriptions" via Meteor.subscribe("messages")
and some users go to your app.
For each connected user (who connects through web sockets), create a new LivedataSession
and store it in memory.
For each LivedataSession
, call connect
and create a LivedataSubscription
for each of the 10 global "subscriptions" you've defined.