I’m trying to create async api with Goliath framework. Service should write to mysql, add messages to RabbitMQ and receive responses back. There also should be a separate admin application built with Rails. I have several questions about that:
Is there a way to effectively share models between Rails and Goliath?
Is there any problems to use Activerecord or any other orm with em? Are there any best practices, configuration (connection pool size, driver) or other options about that?
What i have to use to receive messages from AMQP? Would it better to build a separate eventmachine daemon or i can use somehow Goliath’s one for that stuff?
Thanks for advance.
Here’s a quick hack to use ActiveRecord models in Goliath. With this approach you can use the model without using require, but you don’t have the relationships on the model level. To get the has_many and belongs_to relationships (in this approach), I would load the model file and include the lines containing such words in the class definition loop below.
This is a hack based on your feedback.