Jaypee
Dear Elixir Community,
First, I hope I choosed the right thread to post…
After Clojure last year, I’m currently studiying Elixir.
I’ve read several books, seen tons of videos and also struggled with some exercices on Exercism/Elixir ( a bit less “beginners friendly” than its Clojure counterpart “4Clojure” !).
It happens that the advantages of Elixir/OTP could benefit to the project I’m working on at the moment, so I would like to do some tests/benchmarks on some basics componants of this project:
I want to implement small servers in Elixir, that could be located on several computers/VM which simply send and receive files and could also verify their integrity (MD5 checksum ?)
The benchmark will mainly focus on scalability (multiply the servers and test a lot of simultaneaous file transfers) and robustness (test the transfer of huge files between two servers).
At the moment, I must confess that I’m a bit confused with the Elixir/OTP Genservers, Supervisors, Workers and others and how to correctly articulate them.
So I would like to have some advices/suggestions/hints on the correct way to use and organise these entities in order to implement the most efficient file transfer server in Elixir, regarding the goals of the benchmark.
I’m also open to suggestions concerning tips and tricks I could use to optimize my FT servers.
To my knowledge, Elixir is not used in my (big) company and I’d really like to succeed in providing a “proof of concept” ! ![]()
Best regards and thanks in advance for your help.
P.S.: Please forgive my English as long as you roughly understand what I write !
Trending in Questions
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #blog-post
- #elixir-ls
- #ai
- #elixirconf-us
- #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)
Fl4m3Ph03n1x
Can you send the files via HTTP POST? If so, a simple app using HTTPoison (or HTTPotion) with cowboy would likely suffice.
Otherwise, using Phoenix may be more up you alley:
https://phoenixframework.org/blog/file-uploads
Generally speaking using Phoenix will likely be easier, since the framework already does most of the work for you, but you will suffer in performance when compared to the first option.
brightball
But not much
Jaypee
I thought about Phoenix (and tryed it, following the “Chat” course) but it seemed to me that a framework could be a bit “heavy” for my simple FT servers.
I will then considere it.
Thanks.
Fl4m3Ph03n1x
Depends on the level on incoming traffic you actually have. The more traffic, the more you will feel Phoenix dragging.
Jaypee
My first idea was to set my servers as nodes, sending them files streams.
This could allow me to incrementally calculate the MD5 checksum while the files are streamed and avoid the waste of time.
Something like:
brightball
Maybe this hasn’t been updated in a while but this really shouldn’t be an issue.
AstonJ
What is your experience on which you base such comments?
As shown in the benchmarks by @brightball any performance hit by Phoenix for the majority of apps would generally be considered to be negligible.
Fl4m3Ph03n1x
Our system with hundreds of thousands of requests per seconds and the fact we are looking into alternatives to phoenix templating because of that.
I don’t know if the OP will test his system the same way we use ours, it may also be because we are not using Phoenix at the best of its potential, but this is my experience.
Still, I find what I say not to be polemic - I still recommended Phoenix to the OP and even directed him to some documentation.
It’s up to the OP to check both options and decide for himself. If Phoenix was borderline unusable with high traffic (like some community packeges in hex) then I wouldn’t recommend it in the first place.
AstonJ
Can you share what app/site that is? I’d love to see
Fl4m3Ph03n1x
I can’t
We do backend and for all purposes we are invisible to people. We deal mainly with data from providers and we use Phoenix Views as an easier means to modify XML, HTML, JS and JSON files (a decision was made that using Phoenix would be easier than dealing with AST trees). We are now updating Phoenix from 1.2 but it is proving to be a battle we want to avoid.
Not only that, sharing company code would get me fired. Hence the reason why I always have MWE in my forum threads and not real code.
I know this is not the answer one would expect. It even undermines my argument (I am asking readers to trust my word without real proof).
To add to that, I don’t even know if the OP will use Phoenix the same way we did. These reasons are exactly why I still recommended OP to try it out in my first post.
I think Phoenix is awesome, it’s not working for us and I am sorry I can’t provide additional context.