kostonstyle

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

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? :slight_smile:

Basically I’m just trying to drill through questions to get the answer to The XY Problem. :slight_smile:

jur0

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

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..? :slight_smile:

Where Next?

Popular in Questions Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
skosch
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement