Jaypee
Secure files transfers servers in Elixir?
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 !
Marked As Solved
Jaypee
I redevelopped an entire new application (“Simple SFTP Client Server in Elixir”), based on things I learned this year:
Here’s the SscsEx GitHub page
NB: You can only use this repository as an inspiration for your own code as SscsEx will NOT be updated: I’m now on my way to the next Elixir step: learning Phoenix + LiveView ! ![]()
Also Liked
joeerl
Well you have sockets, and something to compute an MD5 checksum - which is actually all you need.
Forget all the generic this and that and make a simple socket client and server (homework - find out the smallest socket client and server code)
Making a client/server over a socket is virtually the first thing I do in any language when learning - very instructive
Repeat in C, TCL, JS, Java, Ruby, Python, Perl, C#
Seriously, the round trip client → server → client with a check that you transfer all data and loose nothing is an essential programming technique - learn to do this first THEN add JSON/XML (whatever) on top.
Once you can get two programs in different languages communicating raw bytes over a socket then you can start having fun - Use the low level socket libraries and NOT fancy frameworks - this is the slow way to program - BUT in the long term the best way - understanding is the key to programming libraries which hide what you are really doing should only be used once you understand what’s really happening
Cheers
joeerl
Well a while back I wanted to transfer some files so …
![]()
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.
Popular in Questions
Other popular 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
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








