tractor icon indicating copy to clipboard operation
tractor copied to clipboard

Add a basic *registry* actor example

Open goodboy opened this issue 4 years ago • 0 comments

Since we're going to eventually need this to replace the whole Arbiter thing, we might as well offer a solid example as well.

I was thinking the tools to use would be:

  • a module level (aka global scoped) defined SimpleNamespace which can be mutated by 2way stream based request response dialog
  • a detailed doc on how using a module level namespace is basically a actor local namespace and is very similar to, but not exactly the same as trio's .lowlevelRunVar (depending on if you're using threads with multiple trio.run() calls)
  • consider maybe showing how to create a sub-namespace style with a class MyNamespace: style where the class is never instantiated and instead as used for defining further nested attrs within the global module space?

#184 and #215 will likely be based on this if we can get something production grade-ish 🏄🏼

goodboy avatar Jan 27 '22 21:01 goodboy