Integrating with python, design sanity check sought

Hi, I’m hoping I can get a check from more experienced OTP’ers as to whether this design is sane. We are slowly improving a big legacy monolith built in Python, and I’m moving bits to a CQRS style system with the read side using elixir where we can, and more work farmed out to microservices communicating over rabbitmq as well as http. It would be really helpful if we could do server-push for updating clients in eventual consistency situations or when async operations are complete. I’m imagining something like the below, and would love to hear if I’m on the right track or about to commit grave errors. :wink:

  • on login, users get a jwt token, allowing their login info to be honoured by any back end service
  • they also get a phoenix channel and/or a genserver (I’m still learning!) for their session
  • they get some js running to receive messages from their channel/genserver
  • browser events might send code to either the elixir server(s) or to the python server(s)
  • stuff happens, sometimes in python, sometimes in elixir
  • events originating in Python code when async tasks finish broadcast messages out over rabbitmq
  • user session genservers might listen to these rabbitmq messages and push results out
    to the client to show results in javascript, so we don’t need to do any server-push or websockets in python

Questions:

  • is using rabbitmq a decent way to integrate genservers with non-erlang code? if not, what is?
  • does the above sound reasonable in general? Anyone done similar stuff and have suggestions

thanks!
iain

2 Likes