Add postgres adapter for socket.io
To run this PR locally, use the following command:
docker run -it --rm -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock --add-host host.docker.internal:host-gateway -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:dbda7bc-nikolaik --name openhands-app-dbda7bc docker.all-hands.dev/all-hands-ai/openhands:dbda7bc
Hi, would you also be willing to add in the socket.io redis adapter? Postgres NOTIFY / LISTEN doesn't really scale when PGBouncer / any kind connection pooling is used in between the app server and the postgres. Having all app servers direct connect to postgres is also an anti-pattern for scaling due to postgres' process-per-client architecture.
Redis would be a more usable pub-sub infra, and in our stack, we use Redis already with dramatiq for background async tasks
@diwu-sf we are switching to postgres!
err...we are switching to redis!
Okay great, make a lot more sense for scaling.