-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Socket.IO API for all commands + app info #13
Comments
Of all the APIs - I think it makes sense to try this one first and build around it. I'm thinking the dashboard "should" be built with sockets, for realtime comm. |
@benjaminbojko - I've been trying to start a PoC, just a few questions, I'm running into...
|
@pingevt we should talk about this. There's already scaffolding in place that you should be able to use: https://github.com/bluecadet/launchpad/blob/develop/packages/core/lib/command-center.js I'm unfortunately a little swamped today but perhaps we can find a time next week. I'd like to take some time to really think about the architecture and not just go by iterative testing here because that's how the previous version evolved :D Socket.io seems like a good start. It will need a local web server and I did some research on that too: https://www.notion.so/bluecadet/Launchpad-Roadmap-24b7447a2b414aec824a87c64af5b99b#834c7e5e2cd74181836ec57807649dfe |
Agreed on we should talk some time! Also, my head has been in the content side and not much else of Launchpad, so I'm just trying to familiarize myself rather than make production ready code. Trying to take advantage of some down time so I can hit the ground running when something is needed for a project. |
Re. the logging... looks like we can add Custom Transports. I think we need to add that ability to the config file for launchpad itself. EDIT: no need to update the config. |
A Proof of Concept video in slack: https://bluecadet.slack.com/archives/C03RY7MRA4V/p1660247236938769 |
@pingevt something like this could also be an interesting alt or additional layer to add: https://www.npmjs.com/package/reconnecting-websocket |
So I've been reading up on websockets vs. socket.io. Someone made the comparison of jQuery and vanilla js... so now I don't want to use socket.io. Anyways, I'm getting 2 main bonuses of socket.io, 1 fallbacks when websockets aren't available, and 2 auto reconnect. Given the package above, that takes care of part 2. And the fact we typically can define what our audience uses and aren't distributing this to a public mass audience I'm wondering if part 1 is worth dealing with. Socket.io creates some conveniences, but at a quick glance, seems like either/or to me. Its slightly less code, but does that make it worth it? |
Yeah those are good points. Do keep in mind that the reconnecting websocket package is only for JS, so we won't be able to use it for C++ or C#. My main rec would be to make the API modular enough to allow for multiple protocols to work in parallel. So worst case, we could allow for folks to choose Socket.io or WebSockets eventually, but we could start with WebSockets to reduce bloat. Sort of related, this also made me wonder if we should actually break out each of these layers as their own packages, to reduce dependencies. The same might make sense for the content sources, actually... Food for thought eventually. |
wait - good point, but isn't socket.io for js (and web) only as well? we might have todo more for C++ or C# clients. |
We have existing C++ implementation afaik, but tbh that's pretty ancient. There also seem to be C# socket.io packages, but those haven't seen updates in a few years either. I think you're right that starting with just plain WebSockets seems the way to go here, especially since writing a simple reconnect function that doubles the reconnect interval on each attempt until a max is pretty easy. |
No description provided.
The text was updated successfully, but these errors were encountered: