-
Notifications
You must be signed in to change notification settings - Fork 710
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
Possible enhancements #1192
Comments
I'll have to look into the first couple bullets, but I'm all for making some plugins (specifically immer) optional. FWIW my main goals personally are: modernize the build system a bit (I don't think we really need babel plugins anymore) update our very old version of socketio and other insecure deps See about breaking out koa and getting in express if possible as koa is all but dead. With that, I think the project would be in a good place. I imagine it's pretty intimidating to come into this project while not having worked in the webdev era it was made in. |
On the topic of modernization, I'd also consider moving away from socketio entirely and just going with websockets. |
I've also had good success in https://boardgamelab.app/ with just having all clients subscribe to a game event feed via SSE and then issuing simple POST requests to make moves. There really isn't a need for a bidirectional communication channel. |
I was contemplating this model as well for another part of my project, but I couldn't get a read on whether or not this would be better, and if so how. Websocket already seem to have so low an overhead in general that managing the SSE subscription might be the same, now with the overhead of having a separate post mechanism. Thoughts? |
I don't really think of the POST mechanism as additional overhead because every web app is going to have an API of some sort, so there probably already exists a mechanism to receive POST requests. The main benefits of SSE that I see are:
At a lower level, everything is multiplexed over a single HTTP/2 connection, so there aren't any performance downsides either. |
Multiplayer games are inherently bidirectional, so I think websockets are still a good fit in principal. Tho... I can't really think of any hard reasons why. 😅 At my job, we're going to be migrating from socketio to SSE pretty soon, so after that I'll definitly have a good handle on the upsides and downsides of both and probably a pretty good idea of what it'd take to migrate off. |
Just braindumping a little bit. We just finished moving from WS to SSE and it's not too bad actually. The weirdest bits were around parsing the incoming events from the server. This month, i'm going to try getting all those chore PRs taken care of and maybe try making a dent in the open issues (i'm sure there's at least a handful that can be pruned), then in january I'll get back to ripping out koa and moving to express. During that I'll see if there's a clean path to move off of websockets. |
@Hypercubed I have write acces now, so if you wanted to make any of those improvements you wanted into PRs, i'd be more than happy to review them :) |
I see that recently a couple of new maintainers were added: #1188
Here is my list of much needed improvements. I'm willing to do some (or all) of these as PRs if I get a 👍
client.start
should acceptsetupData
and pass that along togame.setup
.game.ai
object should be passed to bots. This would allow passing in objectives to bots.ExposeEdit: found it inCreateGameReducer
. This is needed for custom bots.boardgame.io/internal
ImmerPlugin
andSerializablePlugin
in particular add significant overhead when running simulations.Hoping to see some renewed activity here.
The text was updated successfully, but these errors were encountered: