I am pretty new to Elixir. I have been reading some books and articles and now I want to work on some project to settle the concepts.
I have a project based on microservices, that I would like to replicate in Elixir.
I thought umbrella projects were a good way to go as services could be almost mapped to applications, but there is something I am not getting.
Kafka is the entry point for the application and I thought on using Kaffe as library to handle it.
I need to “consume” multiple topics with different information so different services handle the messages but, as all the apps have to use the same configuration I do not know how to configure Kaffe differently for each application.
It seems it is a common pattern to use apps instead of libraries in Elixir so, Is there any way to define different configurations for Kaffe?
There are multiple things here:
- I feel there are things I do not get regarding Umbrella projects … What are the useful for? I have been looking for documentation regarding this type of projects but found nothing interesting.
- Application configuration: All the applications inside an umbrella project use the same config.exs file, but each one should define its own dependencies and applications that should be up & running for them to work, but they should share the dependencies … I do not get why I cannot define the dependencies directly on the root project
I like the way umbrella projects allow me to have different applications while having just one repo and be able to deploy everything using releases, but:
- I need more information regarding how and when to use umbrella projects
- I do not know how to read custom configuration and how to configure an application I depend on differently for each application in an umbrella project.
Sorry for the loooong post.
Thanks in advance your time, any information will be really appreciated.