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
“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
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.
Popular in Discussions
Other popular topics
Latest Phoenix Threads
Chat & Discussions>Discussions
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
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #hex
- #security










