KishoreKarunakaran

KishoreKarunakaran

Is Elixir and Phoenix a good choice for real time trading systems?

Is Elixir with Phoenix a good choice for building real-time stock trading systems ?

Requirements are High Availability and Low Latency.

What are your thoughts about this ?

What will be pros and cons if one uses Elixir and Phoenix in real time trading systems ?

Marked As Solved

jorinvo

jorinvo

Although it doesn’t seem like you really need it here, there is an interesting talk about building hard real time systems on top of the Erlang VM: https://www.youtube.com/watch?v=yjmZoAtkkLY
Even if you don’t need hard real time, the talk gives some nice insight into using NIFs and dedicated hardware to build high performance systems.

Also Liked

jakemorrison

jakemorrison

It depends on your definition of real time. Erlang is quite popular in real time ad exchanges. Lack of garbage collection pauses give more predictable latency than some languages. It is considered “soft” real time, though.

When things need to be really fast and predictable, then C++ was popular, sometimes supervised by Erlang. That is a pretty good approach, isolating the pieces that need to be fast. Now speeds are such that things are done in silicon.

We wrote an embedded “logo inserter” box for the broadcast television industry in a mixture of Erlang and C++. The C++ handled the low level processing: pull a frame from a Blackmagic SDI interface, add an image, send it out another interface, 60 frames per second. Erlang handled everything else, and restarted the C++ if it should crash in time for the next frame. Bulletproof.

16
Post #3
AndyL

AndyL

IMO yes! It’s possible to treat offers as processes & index them to get really fast matching. Use commanded if you need event-sourcing for auditability.

idi527

idi527

Does Elixir with Phoenix is good choice for real-time stock trading systems ?

Depends on what you mean by this. I’ve heard success stories with c++ and erlang (c++ handled computations, erlang handled some networking). And some experiments with erlang + rust (now rust handles the computations).

I don’t quite see how phoenix fits in a trading system, though.

seamon

seamon

hmm…yes, we think it’s a good choice for trading system. we wrote https://chaince.com as mentioned above by @gonglexin (and thank you so much :grinning:) based on pure elixir/phoenix/OTP infrastructure.

we’re using phoenix channel with websocket as order submission and trading reports system, it’s very fast. we think it can be called “real time”.

as to the High Availability, it’s just the pros of OTP. there’re 12 nodes in our cluster, and the whole cluster can be rolling restarted any time we like, without any service interruption.

“elixir is a good thing, maybe the best of things, and no good thing ever DIES” :relaxed:

gonglexin

gonglexin

Take a look at https://chaince.com/, it’s a crypto exchange which written by Elixir.

Where Next?

Popular in Questions Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
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
logicmason
Hi there, I'm working through my first release with elixir/phoenix. I've built a release with distillery and found that it crashes when I...
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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
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
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
sabri
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size? Thanks
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

Other popular topics Top

Qqwy
Update: How to use the Blogs & Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3268 119930 1237
New
sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
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
lk-geimfari
What is most correct way to open, read and parse JSON file with poison? For example if we have example.json file in root of some projec...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
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
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement