itssasanka
Phoenix - to go with Umbrella or not? ( new project )
Hi
I have been looking into building a full fledged app with Phoenix.
My idea is to keep things decoupled and simple from the start (helps maintainability in the long term).
My backend will be a JSON api, which will be consumed by a completely separate front end (built with VueJS).
I’ve been exploring Umbrella apps, which seems like a good idea. I can definitely see a lot of problems it will solve (maintenance overhead, communication etc.)
In the end, my app will have services provided by each microservice, and each microservice will communicate with other microservices. My question is, should I start big (one monolithic app, and use Umbrella later to split) or incorporate an Umbrella structure right now?
I cannot seem to find a lot of resources on creating proper Umbrella apps based on Phoenix, but it is looking as if getting an Umbrella structure comes with complexity:
- Should I have a central single interface to the database (for all apps)? If yes, how do we deal with a large number of schema modules here? (which could come in the future)
- Are there any other potential pitfalls with this Umbrella design?
Marked As Solved
sanswork
I would start mono and split later. You’re adding complexity up front that you don’t know you’ll ever need with preemptively splitting them. If you’re using Phoenix make good use of contexts and your code will already be logically separated and easy to split off later if the need develops.
Also Liked
leifericf
Hello, @itssasanka — Welcome to the community!
The ElixirTalk podcast has two useful episodes about this very topic:
I recommend checking those out those episodes for some good advice 
Summary: Keep it simple and start without an umbrella app. In most cases, it is relatively easy to split an application up into different applications later, if/when it becomes necessary.







