From f6cf8db0657ddc4b08c790905bd5054c872cf79b Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 2 Jan 2025 06:54:06 -0600 Subject: doc: expand on propnets --- doc/code/pangemma.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/code/pangemma.md b/doc/code/pangemma.md index a5e969b..ab014e4 100644 --- a/doc/code/pangemma.md +++ b/doc/code/pangemma.md @@ -105,3 +105,20 @@ Every propagator has state (too). I.e. it may be idle, computing and done. ## The runner The runner visits the list of propagators and checks wether the inputs are complete and whether they have changed. On change computation has to happen updating the output cell. + +## Example + +I created a very minimalistic example in Ruby with a simple round robin scheduler: + +=> https://github.com/pjotrp/ruby-propagator-network/blob/main/propagator.rb + +## Running tasks in parallel + +In principle propnets make it trivially easy to run tasks in parallel. When inputs are complete the propagator goes into a +'compute' state and a process can be run (forked or on PBS) that executes a command. +We are not going there right now, but it is one of the important reasons to build this setup. + +## Why guile and not ruby or python? + +Above example in Ruby is rather nice and we can build on that initially. +Ruby's multithreading capabilities (and that of python), however, are hampered by the layout of the interpreters and modules that can not be re-entered. Even with the slow disappearance of the global interpreter lock (GIL) these languages don't do great in that area. You can work around it (like I did with the really fast bioruby-vcf). -- cgit v1.2.3