itssasanka

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

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

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 :slight_smile:

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.

Last Post!

leifericf

leifericf

Aha, I see.

I haven’t got much hands-on experience with any of these libraries myself yet; I’ve just been toying around with them for a learning project. I know of a few related threads that might be useful.

Where Next?

Popular in Questions Top

New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement