https://github.com/thomascothran/pavlov has reached its first stable release.
What is pavlov? Pavlov is an implementation of the https://cacm.acm.org/research/behavioral-programming/#R26 in Clojure. Behavioral programming is a general-purpose paradigm, like functional programming or object-oriented programming.
Its basic unit is the bthread, which encapsulates a behavior or scenario. Bthreads are assembled into a program and park until an event they subscribe to occurs.
Why pavlov?
• Simplicity: bthreads (the basic unit of behavioral programs) are intrinsically decoupled.
• Model checking: use the same production code in pavlov's model checker. Supports safety, liveness, deadlock, and livelock checks.
• Navigable programs: Program execution can be explored using nav. Walk through the branches of your application in the REPL or a tool like portal
• Zero core dependencies. Pavlov core itself has no external dependencies. (Supporting libraries like pavlov-devtools and pavlov-web do.)
What is new in the stable release
• Default to scenario as the main way to construct bthreads. See David Harel's work on https://link.springer.com/book/10.1007/978-3-642-19029-2.
• Experimental support for babashka and squint
• Performance improvements for the model checker
Feel free to join #C09KN012VR7 with any questions!
What would you use something like this for? The examples in the README don't really provide much of an insight. Do I need to read the paper to understand the value proposition?
Behavioral programming is a completely general purpose paradigm, kind of like functional programming or object-oriented programming. (The object-oriented piece is message passing without shared state, so think something more like erlang.)
Pavlov's take incorporates functional programming, and so far as bthreads are typically made up of pure functions (or data literals).
So Pavlov can be used for mechanical things like web frameworks. It excels in line of business type applications, of the sort that you could talk about with Gherkin scenarios.
The goal of the shift towards emphasizing scenario is that you should be able to get business requirements as examples, write those examples as a scenario without much translation, and then Pavlov assembles those scenarios into a complete program.
https://github.com/thomascothran/pavlov/blob/master/doc%2Fdesigning-business-programs-with-behavioral-threads.md illustrates how to use Pavlov in a normal business application I edited the original announcements to add a line about Pavlov being general purpose.
https://github.com/mhjort/trombi 2.0.1 released! 🌪️ trombi is a library for load testing stateful applications: scenarios are plain Clojure data and functions, and results come back as Clojure data. 2.0 rewrites the runner so that every virtual user and every request runs in its own virtual thread (JDK 21+), together with the latest core.async. In benchmarks, request functions that block (e.g. clj-http, JDBC) are now about 10x faster with no thread pool tuning, callback-based clients like http-kit about 3x faster, and the runner's own throughput limit is about 10x higher. Most simulations work without code changes. Upgrade notes: https://github.com/mhjort/trombi#upgrading-from-1x
Seems good to plug something like https://github.com/oliyh/martian and / or vcr-clj on this ;)