Is the description just a rather roundabout way of saying it can be used as an anonymous messageboard? The name certainly evokes that.
Clients can subscribe to "channels" and they will receive all messages "published" on those channels.
21–30 of 44 posts
Is the description just a rather roundabout way of saying it can be used as an anonymous messageboard? The name certainly evokes that.
Clients can subscribe to "channels" and they will receive all messages "published" on those channels.
Earlier quoted context omitted.
Okay, thanks for the information. The problem with doing the pubsub in NodeJS entirely is the way NodeJS handle connections. Each is separated and is accompanied by a big overhead from NodeJS. What would be great is a way to interact with the pubsub server not by config but with an API. This would allows, for example, the execution of middlewares when a user publishes a message (to filter them or something else). Rig…
> the execution of middlewares when a user publishes a message (to filter them or something else) You can do that with nchan: https://nchan.slact.net/details#authenticate-with-nchan_auth... > Right now, I'm using two websockets, one to Nginx PushStream only to receive messages and another to the NodeJS server to publish messages. You can also multiplex several websockets into one for the client. I can't offer you a s…
Also, what do you mean by multiplexing websockets ?
This is a huge refactoring of an old project of mine -- the Nginx HTTP Push Module. I'm wondering if anyone here has used it. Most importantly, I want feedback on the documentation. Did I overcomplicate things? Does it need more examples? Does it need more live code? Is it too long? Too short? Etc.
Is there a way to perform access control on the backend? E.g. Is there a way to prevent a specific user from subscribing to a specific channel (if they are not allowed)? Or is this specifically designed to deal only with public channels (that anyone can publish/subscribe to)?
This is a huge refactoring of an old project of mine -- the Nginx HTTP Push Module. I'm wondering if anyone here has used it. Most importantly, I want feedback on the documentation. Did I overcomplicate things? Does it need more examples? Does it need more live code? Is it too long? Too short? Etc.
Would be really cool if you could include some example JS client for this. I'm sure you have some for testing, so even if it's not production ready code it would make testing of your module much easier. Almost everybody will want to write the same code for it anyway, with reconnection and fallbacks, so it may be a good starting point for others to contribute to the project - much more JS guys than C coders intimately…
The "client-less" approach would be particularly nice for use with IoT devices which don't have enough CPU/memory to run a beefy pub/sub client (which is typical of other solutions). So that's nice. Is there a way to perform access control on the backend? E.g. Is there a way to prevent a specific user from subscribing to a specific channel (if they are not allowed)? Or is this specifically designed to deal only with…
Does Nchan broadcast messages that may have been missed by a client that was temporarily offline? When web client's navigate from page-to-page or enter sleep mode, client's will miss messages during the offline delta. Ideally, there would be a way to "catch-up" a client or to tell if a client is permanently out-of-sync because it is beyond a message history window.
Earlier quoted context omitted.
> the execution of middlewares when a user publishes a message (to filter them or something else) You can do that with nchan: https://nchan.slact.net/details#authenticate-with-nchan_auth... > Right now, I'm using two websockets, one to Nginx PushStream only to receive messages and another to the NodeJS server to publish messages. You can also multiplex several websockets into one for the client. I can't offer you a s…
I saw this feature, but I think there is limitation preventing me to use it, tell me if I'm wrong ;) - I cannot use this to make a call each time a message is published on a pubsub websocket - I cannot modify the message sent by the user (to add user information for example) Also, what do you mean by multiplexing websockets ?
By multiplexing I mean that a single websocket (or any other) subscriber can subscribe to multiple channels.
How does this compare to MQTT ?
I'm not familiar with MQTT, I've just glanced over the spec right now. Nchan is basically a message broker with channels, optimized for message broadcast. MQTT is a TCP-level protocol, whereas all the currently implemented subscriber clients for Nchan are HTTP-level (Longpoll, EventSource and Websocket, which begins with an HTTP request). MQTT subscribers and publishers could be implemented in nchan, but I haven't ye…
If I get a good performance on a C/C++ client then this could be a viable option for push notification in the IoT domain.