heathen

heathen

Some general talks\questions about choosing between internal and external message stream

Hi!

I’m working on my own little project which involves a number of a kind of IoT devices. These are actually devices with limited autonomous ability and without any kind of control user interaction, so they are getting control commands from the back end services and sending back results and logs\events.

I’m going to try to use as loose coupling between modules as it’s possible from scratch. As well I would like to go with a kind of CQRS/ES - the project is digital and I don’t expect any needs in batch data processing as all data will arrive in [near] real time.

So let’s go with the ES part for now. Let ES be “event streaming” and “event storage” at the same time.

In the beginning of the project there will be Elixir apps\parts\modules only on the back end side. I think about Channels as the main way to interact with any kind of external clients (devices and user’s control panel clients as well). But in the future it may be necessary to include modules (services) in other languages as well (for example, for heavy computation, media conversion tasks and so on) and let external systems like big data analysis application and so on to consume real-time events.

The first thing that comes to mind for the internal interaction between different back end services\modules is to use something like Phoenix PubSub. In this case it will be necessary to implement at least robust, fault tolerant and easily expandable “storage” part as well as interfaces to external modules\systems when they arrive.

I’m not a big fan of over-complexity, so don’t like to use parts which can be avoided. But from the other hand I’m a really lazy guy, and don’t think its a good idea to re-implement things are already exist. So another thought is to use Apache Kafka as the event streaming and storage platform and use Kafka interface in every independent back end module\application (producer and subscriber\consumer). This approach will give a fault tolerant event streams storage as well as central fast and robust events pipeline.

Of course, it’s possible to start with one option and evolve to another, but as I said I’m lazy, and aside from re-implementing the same thing later I expect migration problems.

Surely I do not expect any direct answers like “you must do this or that”, especially when they come without any explanation. I would like to discuss options: I’m pretty sure I overlook many important things and would be grateful to point on them.

Thanks!

Where Next?

Popular in Questions Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
mgjohns61585
Could someone help me? I’m making my first elixir program, number guessing game. I can’t figure out how to convert the user’s guess from ...
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
Kurisu
For example for a current url like http://localhost:4000/cosmetic/products?_utf8=✓&query=perfume&page=2, I would like to get: ...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36432 110
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 48475 226
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
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
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
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New

We're in Beta

About us Mission Statement