Something that interested me when I first started hacking on NodeBB was how the platform uses realtime communication through socket.io (and websockets). This interest stems from work I did whilst working as a realtime engineer at Pusher several years ago. One of my research projects whilst there was to look into how websockets get used in production, and other use cases for websockets besides the standard "subscribe to a channel and receive events".
How NodeBB currently seems to use realtime communication:
RPC: Request data from the server, get a response back, present that data to the user (or send data to a server like you would POST to a HTTP server)
Channels: Used for user to user chat messages
Events: Used for online/offline states of users.
I may have missed something here, so, let me know if I have.
Most of the websocket usage appears to be in RPC style messages: Get this piece of data do something with it. At present, all realtime communication for NodeBB is built on top of Socket.io, which uses a protocol more tailored for event type packets, rather than for RPC style packets. For this, something like JSON RPC may be more appropriate.
For user-to-user chat messaging you could still multiplex that onto the same actual websocket / socket.io connection (although it's arguable if this is actually beneficial).
Why do any of this writing or work? Interest more than anything else, but it may make the code to NodeBB cleaner, and improve maintainability.
I am trying to call api/v3/categories/111/privileges/groups:posts:upvote to set privileges for a group. It's a PUT API, and it seems to accept array of privileges on server side. I tried multiple ways to pass array in the URL and all attempts failed.
for example /api/v3/categories/111/privileges/privilege=groups:posts:upvote&privilege=groups:posts:delete
Any idea how to pass array of privileges to PUT API?
Whoever it is, it's not us... as @pitaj suggests it could be bots issuing HEAD requests to determine site availability before crawling? Who knows... I am looking at some of them coming in our logging system now, but they have no user agent either, so 🤷