As I understand it, Monty’s overall design is expected to follow the Actor Model:
The actor model in computer science is a mathematical model of concurrent computation that treats an actor as the basic building block of concurrent computation. In response to a message it receives, an actor can: make local decisions, create more actors, send more messages, and determine how to respond to the next message received. Actors may modify their own private state, but can only affect each other indirectly through messaging (removing the need for lock-based synchronization).
So, for example, each Learning Module will emulate a cortical column, sending and receiving messages using the Cortical Messaging Protocol (CMP).
Because a full-scale Monty implementation might have hundreds of thousands of actors, using an operating system process for each one is not going to work. So, support for light-weight processes will be needed, along with some sort of message-passing infrastructure, etc.
Although Elixir can handle all of this (and more!), the current Monty code base is written in Python. So, what’s needed (IMHO) is a way to enable Monty to use both Python and other programming languages.
Existing Work
Wikipedia lists a large number of languages, libraries, and frameworks for programming with actors. These range from experimental and research efforts to production-ready infrastructure. (My favorite, Elixir, is clearly in the latter camp.)
There are several actor libraries and frameworks that claim to support Python, including cell, CloudI, Clutter, Dapr, PARLEY, Proto-Actor, Pulsar, Pykka, ray, and Thespian. However, most of these are either experimental, inactive, or both.
Dapr might be an interesting choice as a message-passing solution. Basically, it sets up a high-performance HTTP-based message broker which can run in a container. So, it isn’t tied to any particular language, operating system, etc.
However, although the project has a fancy landing page, I was unable to contact them, using either Discord or Google Groups. (I posted a GitHub Issue; still waiting for a response…)
Concurrency, etc.
Concurrency isn’t one of Python’s strengths. One can use threads, but this is a famously error-prone approach. Also, Python’s global interpreter lock can cause performance problems.
Python’s multiprocessing module lets a program spawn a separate interpreter for each process. This could be used for experimental Monty implementations (e.g., hundreds of modules), but a better solution (e.g., light-weight processes) will be needed for production work.