4dcoder
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!
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello!
Could someone please give me a help/sample code, how to delete a file from s3 using waffle/waffle_ecto from Phoenix app.
I creat...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted”
Version...
New
Other Trending Topics
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #blog-post
- #ai
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
chrismccord
Of course there is nothing requiring you to use Phoenix
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
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.
xlphs
I know Erlang has been used for matching engine, so if you do the same then the most difficult problem is solved. As for supporting stuff like API, not sure Erlang/Elixir is a good choice, if you truly want to minimize CPU/RAM use you should be looking at C/C++.
4dcoder
Thanks for contributing! I will use Redis in place of sqlserver. “Forex api server” means I want to build a backend for currency exchange and trading where a frontend using angular or anything will feed from. “Super fast” bec it is expected to support millions of concurrent transactions. I am new to Elixir but I believe elixir is the favorite option.
4dcoder
Thanks for contributing. Since Phoenix has no performance overhead, then I will go with it. I ve updated the questions just to add details on what I am about to build. Appreciation!!
idi527
“Super fast” and supporting millions of transactions is not the same thing. One is speed, the other is concurrency. What I meant when I asked you for further clarifications was, I wanted you to specify some thresholds like <100us for how long a transaction in your opinion should take.
idi527
For financial data I’d worry about consistency first and foremost, not the speed. I’m not quite familiar with redis, but if it’s single threaded like voltdb, then it could be a good choice.
Eiji
I recommend to read article: The Road to 2 Million Websocket Connections in Phoenix and many other tips, tutorials etc. shared by community.
AstonJ
If you’re wondering whether to use Phoenix or not, I highly recommend you read the preface and opening chapter of Programming Phoenix - these chapters are free to download and honestly does one of the best jobs to sell a piece of technology I have ever seen! It’ll make the hairs on the back of you neck stand up
4dcoder
I checked out the book but it wan’t free.