Integrating custom Socket.io adapter to alfred #4933
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A custom Socket.IO adapter was implemented in #4596 - "Add custom Redis socket.io adapter". The custom adapter is based on Redis and brings interesting features such as performance improvements and support for telemetry.
In this PR, I am integrating the custom adapter to Alfred. That also involved creating simple wrappers around Redis client connections so that we could implement the pub/sub Redis connection interfaces required by the custom adapter.
This work involved changing SocketIoWebServerFactory and related classes, which not only affect Routerlicious/Alfred, but also Gateway, which depends on Services-Shared. But Gateway is an example host and performance improvements there might not be necessary at this point. So I did not update it. Still, the new parameters required in SocketIoWebServerFactory and similar are all optional, so Gateway should continue working as-is and can be easily updated in the future to use the custom Socket.IO adapter. (Note: that would require changing Gateway's config.json, runnerFactory and Helm charts).