lanycrost

lanycrost

Umbrella Project for micro-services

Hi Everyone!

I’m thinking about implementing micro-service architecture in our application. I’ve studied a lot of resources.

At the beginning I thought I’d implement it on the basis of processes and nodes, it would be more accurate to write the code of each micro service in a separate file and implement all their communications through messaging. To tell the truth, I had problems and I came across Umbrella Project, but this way solves our problems, but not as I expected.

I think about git sub-modules, but yours suggestion’s is very important.

There is no source code independence, which I really don’t like.

What do you think about this. What resources can you suggest me, what architecture, if it’s not secret, let’s give an example of code, or architecture.

Thanks.

Regards, Khachatur.

Most Liked

mononym

mononym

I feel like there is a fundamental misunderstanding about how to think about systems within the Erlang/Elixir paradigm at play here, and it’s affecting the core design and thinking about how to structure your application(s) to resolve your problem.

A microservice is a program that is designed to have a small area of responsibility, and thus a small surface area when it comes to its API. It can be launched on the same or different hardware stacks as other microservices, but that is a deployment detail that can mostly be ignored.

A process, be it a GenServer or whatever, is a unit of concurrency within the Erlang/Elixir ecosystem. Schedulers allow processes to also be run in parallel, but even that is a result of the concurrent aspect of processes.

Trying to map these two concepts together, with a process equaling a microservice, is going to lead to problems as they are not the same. A microservice could easily be made up of thousands of running processes, or just one…well two if you count the application supervisor.

Similarly, attempting to do clever tricks with blocking rpc calls, or manually controlling the launch of Elixir applications on different connected nodes–while possible–is just increasing the possible configuration and debugging pain points of a running production system. I also just see it as a lot of added complexity that isn’t needed if you just design your solution differently.

If you aren’t going to make a true stand alone microservice (that communicates in a language agnostic protocol) and want to use the slick Elixir communications tools and interconnected nodes…why hang onto that concept at all and not just dive straight into solving the problem the Elixir/Erlang distributed way from the beginning?

keathley

keathley

This is definitely possible using only distributed erlang: Distributed Applications — Erlang System Documentation v29.0.2

axelson

axelson

Scenic Core Team

Why do you prefer source code independence? There’s many benefits of keeping the source code to multiple parts of the entire application/company in the same code-base. Such as the ability to make updates to multiple parts of the system “atomically” (i.e. in one git commit). IIRC Google and Facebook actually just use one huge repository that has the code for all of the projects in the entire company.

Where Next?

Popular in Questions Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
vac
Hi, I’m quite new in Elixir and I’m trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and I...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
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
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
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