Pregunta

I am looking for a realtime hosted push/socket service (paid is fine) which will handle many connections/channels from many clients (JS) and server api which can subscribe/publish to those channels from a PHP script.

Here is an example:

The client UI has a fleet of 100 trucks rendered, when a truck is modified its data is pushed to channel (eg. /updates/truck/34) to server (PHP subscriber), DB is updated and receipt/data is sent back to the single truck channel.

We have a prototype working in Firebase.io but we don't need the firebase database, we just need the realtime transmission. One of the great features of firebase.io is that its light and we can subscribe to many small channels at once. This helps reduce payload as only that object data that has changed is transmitted.

Correct me if I am wrong but I think pusher and pubnub will allow me to create 100 truck pub/subs (in this example) for each client that opens the site?

Can anyone offer a recommendation?

¿Fue útil?

Solución 2

[I work for Firebase]

Firebase should continue to work well for you even if you don't need the persistence features. We're not aware of any case where our persistence actually makes things harder, and in many cases it actually makes your life a lot easier. For example, you probably want to be able to ask "what is the current position of a truck" without needing to wait for the next time an update is sent.

If you've encountered a situation where persistence is actually a negative for you, we'd love to hear about it. That certainly isn't our intention.

Also - we're not Firebase.io -- we're just Firebase (though we do own the firebase.io domain name).

Otros consejos

I can confirm that you can use Pusher to achieve this - I work for Pusher.

PubNub previously counted each channel as a connection, but they now seem to have introduced multiplexing. This FAQ states you can support 100 channels over the multiplexed connection.

So, both of these services will be able to achieve what you are looking for. There will also be more options available via this Realtime Web Tech guide which I maintain.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top