kostonstyle
How to use Poolboy in Elixir?
Hi all
I want to use poolboy and do not know how to use it.
What I did, just put poolboy into the dependencies
defp deps do
[{:poolboy, "~> 1.5"}]
end
Could please someone help me, how to use poolboy?
Thanks
Most Liked
OvermindDL1
Why do you need 10 workers? What are they being bound to that causes this number, is it an external server? Who will be accessing them and in what way and how often? What errors were you getting when you tried to implement poolboy? ![]()
Basically I’m just trying to drill through questions to get the answer to The XY Problem. ![]()
jur0
I’ve also been interested in Poolboy (just for educational purposes) since I’ve seen that a lot of apps use it. The thing is I don’t really know what its use-cases are, which problems does it solve and when you’re not supposed to use it.
I use it in an application where I have a pool of erlang processes that manage python processes. Each erlang process in the pool (poolboy_worker) is a gen_server. When started, the erlang process starts a python process (using erlport). If a pool worker crashes (an error can be either in erlang or python code), poolboy restarts it automatically. This way, I can execute python code concurrently and also take advantage of “let it crash” philosophy for python processes.
OvermindDL1
What issues were you having when following the example application on the link you supplied? Is it just the Erlang->Elixir conversion you are having issues with? Or are you getting errors?
Also what are you trying to accomplish, do you need to use poolboy, or are you wanting a set of streaming workers, or do you need a single process, etc..? ![]()
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









