lanycrost

lanycrost

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.

Showing Posts 1 to 10

LostKobrakai

LostKobrakai

Umbrella projects are a folder structure to develop related otp applications in a single fashion, mostly to resolve the issues of independent projects like version mismatches. If you’re after source code independence why not simply have multiple mix projects?

lanycrost

lanycrost OP

For in-service communication I can use restful api’s like in other micro-service architecture app’s, but why not to use Elixir messaging if it’s possible?

LostKobrakai

LostKobrakai

Sure, but that should be rather a matter of creating the correct kind of communication interface and deploying stuff onto your infrastructure in a way to let them talk to each other. Umbrella on the other hand is just a fancy word for “one folder for multiple apps”. At runtime there’s no difference between apps created as umbrella and apps created independently.

Also keep in mind, that by default erlang nodes connect in clusters automatically, where each node is connected to each other node in the cluster. Depending on the number of physical nodes you expect to be running on this might not be the best architecture.

Eiji

Eiji

Because you are using them as a libraries - not as services. This means that you need to have them all on each node you deploy to.

I recommend to use WebSocket for fast communication between micro-services. You have one always active channel and two-way communication. In this case you could deploy each service to another node and/or mix part of them like:

first node: service A
second node: service B and C
third node: service D

So you are not limited - you can deploy each service to any node you want and you only need to simply configure each service, so it will know on which node it needs to call another service api.

lanycrost

lanycrost OP

But why no one not tell about Elixir built-in messaging future?. I think this way better then WebSocket’s or http.

Eiji

Eiji

@lanycrost: Don’t know if it allows you to deploy services only to specified nodes (instead of all). Another way is to connect your nodes and call block using rpc:

:rpc.block_call(node_name, module, function, args, timeout)

See erlang docs for more info.

keathley

keathley

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

lanycrost

lanycrost OP

Elixir also has this method :smiley:

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.

OvermindDL1

OvermindDL1

In git the ‘entire’ repo could be huge if done like that. Should be using submodules or so. You can update those atomically as well.

Easier when using SourceSafe or SVN where you can checkout only a part of the tree or individual files. With git it is all or nothing.

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
itzmidinesh
Hi all, I’m working on a Phoenix project where I need to make external HTTP requests and I’m trying to choose between Req and HTTPoison....
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
Stef-Verniers
Hello I’ve been coding in Elixir for almost two years now because of my current job where we implemented Elixir in our application. But ...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews