Skysoft13

Skysoft13

Which programing language best for concurrency and Parallel programing?

I want to develop caht app for mobile platform, but I want to be sure which programing language best for concurrency and Parallel programing like elixir, erlang or golang?

Most Liked

entone

entone

The answers might be a bit biased here :slight_smile: Obviously Elixir.

mpope

mpope

While Erlang/Elixir is good for concurrency and there is a good amount of prior art for chat apps (like Ejabberd or Mongoose), I can give a cautionary scenario against choosing Elixir or Erlang.

If you work in an organization who has an existing ecosystem, and every person in the organization is reasonably familiar with that ecosystem, then languages and libraries in that environment might be best. For example, if you are in an example that uses mainly JVM with a mix of languages like Kotlin/Android on the front end, Java or Scala on the backend, then I’d reach for Akka or even Spring Boot + WebSockets. Consider the cognitive overhead for an organization to introduce a new paradigm, a new runtime, a new school of thought. If the ‘original developers’ who were interested in Elixir/Erlang leave, then will the existing JVM developers be able to debug the application in production? Add new features? Understand the severity of a VM alert?

Other questions to ask:

  • Does it need to ‘scale’? If the backend will have a max of 100 to 500 concurrent users at a time, do you need an ecosystem that is highly concurrent?
  • Do you need to develop it in house? Can you integrate in an existing OSS application?
  • What are the time constraints? Do you have time to learn a new ecosystem while also developing a new chat app.

Food for thought.

derek-zhou

derek-zhou

shameless plug: I have a toy chat application deployed here:

The code is here:

Thanks to Elixir, Phoneix, Liveview and Surface, I didn’t have to write a lot of code. It supports a reduced version of markdown in chat, opengraph preview of link and more.

Rainer

Rainer

Maybe you want to consider that the people who did this already quite successfully (WhatsApp) used Erlang? :wink:

As @kokolegorille mentioned, whether Erlang or Elixir is a matter of taste.
Just if you’re considering a web-frontend you might want to go with Elixir/PhoenixFramework/LiveView…

Sebb

Sebb

Thousands or billions of users?
You can easily build a chat app with a few lines of JS and firebase.
If you want to go big, BEAM is the obvious choice.

Regarding concurrency in general.
There are different models how to do that. The most important trait of those is: how do the parts of the system communicate with each other?

  1. through shared memory (multithreading+mutexes)
  2. messages

(1) tends to be easy at first but good chance it becomes a mess.
(2) harder to get started but better chance of a stable and clear system

(concurrency is hard, there is no easy perfect way)

So beeing on an Elixir forum its no stunner: I vote for message passing.

Go and Erlang/Elixir both use message passing for concurrency. But they are not the same. Go has Goroutines - functions that run concurrently - easy, solid and fun. Erlang/Elixir implement the Actor Model. Not that simple but therefore way more powerful.

Where Next?

Popular in Questions Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
dotdotdotPaul
Okay, I'm having a heck of a time trying to figure out how to best handle the validation of belongs_to associations in Ecto. I'm sure I'...
New
LegitStack
I’m hoping you guys can give me some general advice and perhaps code examples if you’re feeling up to it. I’m very interested in Elixir,...
New
tduccuong
Hi, is there any work on GUI with Elixir, that is similar to Electron/Javascript? My idea is to bundle Phoenix and BEAM into a single se...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
mathew4509
I have a list say x = ["23gh", "56kh", "97mh"] I would like to pass each element to Val in each iteration. Say, in iteration 1 -------...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
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

Other popular topics Top

yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
chensan
I have a User schema with a :from_id field set to type :string: defmodule TweetBot.Repo.Migrations.CreateUsers do use Ecto.Migration ...
New
johnnyicon
Hi all, I've just started learning Elixir and Phoenix Framework, so please pardon my n00bness at this stage. I'm trying to use Postg...
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
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

We're in Beta

About us Mission Statement