/freight-market-rails

Example RoR project, with DDD and SOA in mind.

Primary LanguageRuby

Freight market

Description

We have market where vessel owners and cargo owners can communicate each other and make deals. Customers put their positions in system. There are 2 types of it:

  • PositionVessel
  • PositionCargo

After customers put their position, they can find opposite, that match to their parameters (I simplify that part to one parameter, but here may be very complex algorithm). Also users can search use any others type of searching (not implemented). If one user find matched position, he send Offer, that create Discussion, where users chat each others.

Code explanation

I put a Domain layer in app/modules
API in api/api – root folders in 'app' directory can't be modules.
In app/workers – RabbitMQ watchers (or any other workers)

Gems

Communication with others software (API on Node.JS, for example – WIP)

Messaging on RabbitMQ Gems:

  • Bunny – RabbitMQ client
  • sneakers – watching on Rabbit queues. Can work same as Sidekiq. Idea from blog post

TODO:

  • build node.js api and communicate with rails (req/res type communication)

Disclaimer

I made this code as an example of the some (not all) principles of DDD in RoR. And how RoR can be part of SOA architecture.