Galaxy/Meteor/Apollo: What Pubsub?

I just learned that Galaxy doesn’t currently support Redis, so it appears I can’t use Redis pubsub on Galaxy.

Is there a production-ready pubsub that can be used with Meteor/Apollo on Galaxy?

@vikr00001

  1. https://www.compose.com/databases/redis
  2. Set it up in the same zone as your galaxy servers
  3. Use https://github.com/davidyaha/graphql-redis-subscriptions
1 Like

@diaconutheodor as for using Galaxy referring to your #1 and #2. Would that be the production setup with RedisOplog as well? Also what if the mongo database is already setup with mLab? Would we still need MONGO_OPLOG_URL (in production.settings.json) environment variable, or how would it change?

If you’re using RedisOplog, you say bye bye to OPLOG all together, you no longer need it. It’ll simply get nulled.

1 Like

Galaxy is hosted in AWS so you should also be able to use AWS ElastiCache (redis)

1 Like

I think I figured out something about this today – probably something that was already obvious to many others. :slight_smile:

I started out of course with the demo pubsub, apollographql/ graphql-subscriptions. Since it worked right away on my production server, Galaxy, I figured that any pubsub would do the same.

So at first I didn’t understand why, e.g. Redis Pubsub wanted me to use a whole separate server just so I could get pubsub – and why Galaxy didn’t support out of the box something to let pubsub for MDG Apollo run on it.

What seems to be the case, is that pubsub really needs to be running on a database server. There’s no need for Galaxy to support that because Galaxy wants you to run your database on another host even if the database is Mongo.

Once I figured that out, I just had to pick a pubsub which would work with my database server, which is running postgres. I added in GraphQLCollege/ graphql-postgres-subscriptions, set up the options for it as described here, and my pubsub started working on Galaxy right away.

Solved!

1 Like