goodboy / tractor

A distributed, structured concurrent runtime for Python (and friends)
GNU Affero General Public License v3.0
258 stars 12 forks source link

Hot-code-reload: can we do it `git` driven? #360

Open goodboy opened 1 year ago

goodboy commented 1 year ago

This has been on the idea backlog for a long while, obviously in pursuit of something like what's in erlang's OTP and consequently elixer:


Theoretical


Ideas for a MVP:

Presuming we were to take the same protocol as erlang namely, https://blog.stenmans.org/theBeamBook/#_hot_code_loading:

In Erlang there is a semantic difference between a local function call and a remote function call. A remote call, that is a call to a function in a named module, is guaranteed to go to the latest loaded version of that module. A local call, an unqualified call to a function within the same module, is guaranteed to go to the same version of the code as the caller.

and we wanted reloads to be tracked and triggered by git history updates, here are some thots on how to scratch at this:


Further related resources from #113: