RustySnek

RustySnek

Venomous - Erlport wrapper for managing concurrent python processes with ease

:snake: :test_tube: Venomous aims to simplify the concurrent use of erlport Python Ports, focusing on dynamic extensibility such as spawning, reusing, and terminating processes on demand. It also handles unused processes, by killing them once they pass their configured inactive TTL. Venomous core functions ensure that whenever :boom: :EXIT signal appears, the Python process dies without further execution by killing :axe: its OS process (brutally).

This is my first attempt at creating an Elixir library. The idea stemmed from the challenge of properly exiting Python processes. Even after closing the Python port, execution would persist until the end of a function or iteration. My goal is to handle these exits effectively while also enabling process reuse, thus avoiding the constant spawning and stopping of new ones.

Any feedback would be greatly appreciated :smiling_face:

https://github.com/RustySnek/Venomous/

First Post!

RustySnek

RustySnek

I’ve released 0.3.0 version of Venomous :snake:

  • fixed many major issues with how python processes were handled which caused zombie processes and weird behaviour.
  • multiple tasks ran on a single SnakeWorker will now stack instead of timing out
  • add option keywords

Changelog: Release v0.3.0 · RustySnek/Venomous · GitHub

Most Liked

kip

kip

ex_cldr Core Team

Congrats on your first Elixir library. I like the delicious irony too that pythons aren’t venomous :slight_smile:

RustySnek

RustySnek

I’ve released 0.5.1 version of Venomous :test_tube: :snake: which adds optional :fire: Hot reloading for python modules.

To enable the hot reloading:

  • Install python watchdog dependancy using mix venomous.watchdog install
  • Enable serpent_watcher in your dev config:
    config :venomous, :serpent_watcher, enable: true
    
  • Add your module paths in snake_manager config:
    config :venomous, :snake_manager, %{
      python_opts: [
        module_paths: ["my_python_modules/", ...]
      ]
    }
    

Now all modules inside the configured module_paths should reload on edit.

RustySnek

RustySnek

They must have drank some kind of toxic MIXture :wink:

Last Post!

RustySnek

RustySnek

It wasn’t really well thought out as if you just supply the function with -1 it will keep on spawning workers until it encounters the error which in this case will be the :max_children. It’s kind of a way of signaling that you have reached the limit. I might change it later on to make a little bit more sense as it’s not really an error if everything did work as intended.

Where Next?

Popular in Announcing Top

pkrawat1
Hey guyz We at @aviabird are working on a payment library in elixir/phoenix. We are targeting March 2018 to add 56 Gateways to it. Have...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New
sasajuric
I’d like to announce a small library called boundaries. This is an experimental project which explores the idea of enforcing boundaries ...
New
ityonemo
Currently just starting out on a new mini-project - getting zig NIFs to run in elixir. https://github.com/ityonemo/zigler The idea here...
New
Qqwy
TypeCheck: Fast and flexible runtime type-checking for your Elixir projects. Core ideas Type- and function specifications are const...
336 14774 100
New
zachdaniel
Ash Framework What is Ash? Ash Framework is a declarative, resource-oriented application development framework for Elixir. A resource can...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New

Other popular topics Top

JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49266 226
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
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
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
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement