This isn’t really an Elixir/Ruby problem so much as a systems integration issue—anything you’d do to integrate two services normally should also apply.
HTTP calls are probably the least problematic as you can treat them synchronously. However if you can handle asynchronicity in the Rails application, then my favorite means of doing this kind of thing is a durable message queue. You’ve got a plethora of choices there ranging from sidekiq-style queues in Redis (and there are at least a couple of options for consuming sidekiq format messages in Elixir) to AMQP servers like RabbitMQ to something hosted like AWS SQS. Treat the functions as command messages and send back a response message from Elixir to be further dealt with by the Rails app.






















