smanza

smanza

Phoenix vs Ranch

Hello.

I’m developping a P2P network using Elixir and I’m wondering if I must go to raw TCP or using HTTP.

Currently I thought to use Ranch for internal communication and Phoenix for external communication but thinking if TCP based services are worth in term of performance vs HTTP calls.

Thanks

Most Liked

al2o3cr

al2o3cr

“P2P” and “ETF” are two concepts that probably shouldn’t be put too close together:

Unless you trust all the nodes, in which case “P2P” is a bit of a misnomer.

To the original topic, I recommend that you get your network working with whatever transport makes it straightforward to implement, then measure extensively.

Last Post!

bottlenecked

bottlenecked

Hi there, latency and throughput are at odds- when you optimize for one the other usually suffers. https://medium.com/@kentbeck_7670/inefficient-efficiency-5b3ab5294791

I’m not quite sure what you’re building, but creating a layer to abstract communications would allow you to go with HTTP and switch implementations later if you need to. HTTP will most probably allow for faster iteration as it is well supported on both hardware and language/tool/framework levels. As you develop your application and you gain more experience and insight into what is actually required, you could then consider switching protocols if you so deem.

Where Next?

Popular in Discussions Top

ricklove
I was just introduced to Elixir and Phoenix. I was told about the 2 million websocket test that was done 2 years ago. From my research, t...
New
rms.mrcs
A couple of days ago I was discussing with a friend about different approaches to write microservices. He said that if he was going to w...
New
jer
I’ve been using umbrellas for a while, and generally started off (on greenfield projects at least) by isolating subapps based on clearly ...
New
AstonJ
If so I (and hopefully others!) might have some tips for you :slight_smile: But first, please say which area you’re finding most challen...
New
owaisqayum
I have a sample string sentence = "Hello, world ... 123 *** ^%&*())^% %%:>" From this string, I want to only keep the integers, ...
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
mmmrrr
Just saw that dhh announced https://hotwire.dev/ Is it just me or is this essentially live view? :smiley: Although I like the “iFrame-e...
New

Other popular topics Top

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
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
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

We're in Beta

About us Mission Statement