3 ms·
Interesting I recently implemented a websocket subset for a server in C from scratch for a hobby project and everything seem to check out. The author mentione
by rijoja 8y ago
Interesting I recently implemented a websocket subset for a server in C from scratch for a hobby project and everything seem to check out.
The author mentioned mqtt and wamp. Has anybody here have any experience of using these?
It might be interesting to know that I'm doing user input from the browser, which makes latency a high priority. To get to the APIs that I can't access via the browser I have a C server relying on these messages to the server.
- nly 8y agoI used WAMP extensively in a desktop app a few years ago. Ironically, we only used it only for IPC, not communication to a remote web service. Why? * It provided "routed RPC", which made IPC between many heterogeneous desktop apps easy (a service, a tray icon process, main UI process, a couple of others etc). * It supports PubSub as well as RPC. * It works over TCP, rather than e.g. unix domain sockets, which means it's portable and interoperable (I didn't use the WebSocket transport because the library I used supported raw TCP, but you can mix and match). We bound to loopback. * Because it was built for JavaScript, it was all dynamic, which meant no code generation. The only viable alternatives, and their dependencies, were going to be a pita to build and integrate in to our build system on all 3 major platforms and were going to result in terrible code. * The protocol is JSON which made debugging issues very easy.
- rijoja 8y agoThank you your comment have been very helpful! Especially the PubSub part as I'm not that interested in RPC actually.
- sametmax 8y agoWamp user here. Config sucks, but usage rocks. Very versatile yet easy to use. No auto reconnect with asyncio though, and no django integration, so i had to code that part.