I am currently working on an application composed of several micro services. Having never done an Elixir project in a professional way, I don’t know how to organize my code properly and if there are conventions to follow.
Here are some details about the current project (or as I see it):
- I need a database (PostgreSQL)
- I use a caching system for the shared state between my services (for my tests I use Redis but I will migrate to
- I currently have about ten (micro)services
How is the application currently organized?
- It’s an umbrella project
- There is an application managing the entire database (which uses
- There is an application called
corethat will contain the code shared by several services (data serialization for Redis for example)
- There is one application per service
- Each service has an
Interfacesmodule that exports functions to communicate with it (GenServer call/cast or rpc)
When a service starts, it will look for everything it needs in the database and cache it for later access.
I’m trying to find out if the architecture of my code is correct.
One of the problems I see for example (I don’t know if it’ s normal) is that all services have several other services as dependencies in
mix.exs (to be able to use
I would also like to know if you know of any “big” open source projects that use more or less the same stack as me (several micro services + a database + a caching system) so that I can study the code.
Thank you in advance.