Here is my current structure:
- scheduler app (Elixir app)
- background worker app x 2 (Elixir app)
- web app x 2 (Phoenix app)
The scheduler, background workers and web apps are completely separate applications (not part of an umbrella app); they could be on different nodes, even in different regions.
However, all of these applications need to speak to my database, and for that I have common ecto schemas.
My question is two-fold:
- would you use a library for the common domain model?
- what is the best way to handle that during development?
For example, in the past I would reference a local copy of the library in order to develop on, but unsure if this is straight-forward in Elixir, or if there are gotchas I need to be aware of (noting that only the web app is a Phoenix app).