Alternatively you could create an API through which the clients would communicate, and the server would broadcast the events.
It really depends on your particular use-case, what kind of events will your clients be creating, and what makes the most sense for it.
Webhooks wouldn't for instance allow you to block client events, only observe them.
As the core concepts of subscriptions, channels, and events are quite similar, it should be a fairly quick migration - but of course it all depends on your concrete project and implementation.
But can I control the client events on my server somehow?
For example, if I want to create a game, I need pipe the client events through some server side logic.
You could do that using WebHooks, they allow you to capture all client events on the server - pusher.com/docs/webhooks#client_ev...
Alternatively you could create an API through which the clients would communicate, and the server would broadcast the events.
It really depends on your particular use-case, what kind of events will your clients be creating, and what makes the most sense for it.
Webhooks wouldn't for instance allow you to block client events, only observe them.
How easy would it be to move from socket.io to pusher and vice-versa?
As the core concepts of subscriptions, channels, and events are quite similar, it should be a fairly quick migration - but of course it all depends on your concrete project and implementation.
Is there a way to close user connections on the server?
I'll double check but I don't think so.
You could send a message to a particular user that you wish to disconnect and handle that clientside.
What is your use-case for this?
I want to use presence channels for games. When a game is finished, the users should be removed from the channel.
Ah yeah - just send a message that tells the clients to unsub from the channel, that should be the best way.
I've asked the team working on Channels and we don't support terminating connections from the server.
Well, guess for this contest it should be enough, thank you.