4dcoder

4dcoder

Must I use Phoenix framework?

I am an absolute Elixir beginner migrating from php, java, c# world. I want to build a super fast api server for Forex ( ie realtime currency trading exchange) with Elixir and (Redis, Cassandra or SqlServer, MySQL ?) Database. I would evaluate the system under 10million API calls and transactions per second. Elixir / Elang as i have read in some places offers the highest concurrecy and i assume it would make the best programming language for this experiment. I want to minimize the server overhead (CPU, RAM) at any cost. Must I used Phoenix or what am I to lose without it. Thank you.

NB. Any relevant resource to study as concerns such a project is appreciated!

Most Liked

chrismccord

chrismccord

Creator of Phoenix

Of course there is nothing requiring you to use Phoenix :slight_smile: You have several options in the community, such as dropping down to plain Plug (which phoenix is built on), or using another Elixir webserver/library combo like Ace/Raxx, or even using Cowboy (an Erlang web server) from Elixir. Using Phoenix will not impose measurable overhead performance wise, and what you may lose by forgoing it depends on what exactly you’re building– which we have light details on. I will say Phoenix is great for API servers and it’s probably your most mature option. The SQLServer integration will be handled the same way regardless of your choice web wise. Maybe prototype out a couple options and see what fits best?

idi527

idi527

:waving_hand:

I guess you’d need to clarify what you mean by “super fast”, “forex api server”, and how you are planning to use sqlserver in this setup.

Since phoenix is mostly geared towards web dev, it’s TCP-based. For “super fast” you might want to go with UDP. Although I’m not sure what “forex api server” here means, do you plan to make API requests to some other exchanges, and aggregate the results? And you might want to pick an in-memory database instead of a disk-based one.

dgmcguire

dgmcguire

I would revisit whether you even want to use UDP - there are plenty of scenarios where TCP is much faster than UDP and generally it’s the sane choice for building an API if you’re unsure about which one will fit your needs.

Where Next?

Popular in Questions Top

sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
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
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
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
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
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
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New

Other popular topics 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
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41539 114
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
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
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
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
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
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 47930 226
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

We're in Beta

About us Mission Statement