Aggregate guest-mode link, fill out IPC stack feat

Such that we just link on `guest`_ and use in the feat line as well as
the code ex. Fill out the IPC-stack feature bullet and put the
`.trionics` one last. Also fix-n-finish the `uv` shell install section.
Tyler Goodlet 2025-03-24 13:18:50 -04:00
parent 799306ec4c
commit 4f2168b742
1 changed files with 23 additions and 23 deletions

View File

@ -43,28 +43,28 @@ Features
- *Infinitely nesteable* process trees running embedded ``trio`` tasks. - *Infinitely nesteable* process trees running embedded ``trio`` tasks.
- Support for a swappable, OS-specific, process spawning via - Support for a swappable, OS-specific, process spawning via
multiple backends. multiple backends.
- A modular transport stack, allowing for custom interchange formats (eg. - A modular IPC stack, allowing for custom interchange formats (eg.
as offered from `msgspec`_), varied transport protocols (TCP, RUDP), and as offered from `msgspec`_), varied transport protocols (TCP, RUDP,
OS-env specific higher perf IPC primitives (like shared-mem buffers). QUIC, wireguard), and OS-env specific higher-perf primitives (UDS,
- optionally distributed_; all IPC and RPC works over multi-host shm-ring-buffers).
transports the same as for localhost. - optionally distributed_: all IPC and RPC APIs work over multi-host
transports the same as local.
- A high-level builtin streaming API that enables your app to easily - A high-level builtin streaming API that enables your app to easily
leverage the benefits of a "`cheap or nasty`_" `(un)protocol`_. leverage the benefits of a "`cheap or nasty`_" `(un)protocol`_.
- "native UX" for a multicore-safe debugger REPL using `pdbp`_ (a - "native UX" for a multicore-safe debugger REPL using `pdbp`_ (a
fork & fix of `pdb++`_) fork & fix of `pdb++`_)
- "infected ``asyncio``" mode: support for starting each - "infected ``asyncio``" mode: support for starting an actor's
``tractor.Actor`` to run as a guest on the ``asyncio`` loop runtime as a `guest`_ on the ``asyncio`` loop allowing us to
allowing us to provide stringent SC-style ``trio.Task``-supervision provide stringent SC-style ``trio.Task``-supervision around any
around any ``asyncio.Task`` spawned via our ``tractor.to_asyncio`` ``asyncio.Task`` spawned via our ``tractor.to_asyncio`` APIs.
APIs.
- various ``trio`` extension APIs via ``tractor.trionics`` such as,
- task fan-out `broadcasting`_,
- multi-task-single-resource-caching and fan-out-to-multi ``__aenter__()``
APIs for ``@acm`` functions (``contextlib.asynccontextmanager``),
- (WIP) a ``TaskMngr``: one-cancels-one style nursery supervisor.
- a **very naive** and still very much work-in-progress inter-actor - a **very naive** and still very much work-in-progress inter-actor
`discovery`_ sys with plans to support multiple `modern protocol`_ `discovery`_ sys with plans to support multiple `modern protocol`_
approaches. approaches.
- various ``trio`` extension APIs via ``tractor.trionics`` such as,
- task fan-out `broadcasting`_,
- multi-task-single-resource-caching and fan-out-to-multi
``__aenter__()`` APIs for ``@acm`` functions,
- (WIP) a ``TaskMngr``: one-cancels-one style nursery supervisor.
Install Install
@ -79,7 +79,7 @@ repo from source::
pip install git+git://github.com/goodboy/tractor.git pip install git+git://github.com/goodboy/tractor.git
We use the very hip `uv`_ for :: We use the very hip `uv`_ for project mgmt::
git clone https://github.com/goodboy/tractor.git git clone https://github.com/goodboy/tractor.git
cd tractor cd tractor
@ -97,7 +97,8 @@ the code base::
# https://docs.astral.sh/uv/configuration/environment/#uv_project_environment # https://docs.astral.sh/uv/configuration/environment/#uv_project_environment
UV_PROJECT_ENVIRONMENT="tractor_py313 UV_PROJECT_ENVIRONMENT="tractor_py313
uv run --dev xonsh # HINT, @goodboy's fave shell B) # hint hint, enter @goodboy's fave shell B)
uv run --dev xonsh
Alongside all this we ofc offer "releases" on PyPi:: Alongside all this we ofc offer "releases" on PyPi::
@ -110,9 +111,9 @@ ahead then any latest release.
Example codez Example codez
------------- -------------
In ``tractor``'s (very lacking) documention we prefer to point to In ``tractor``'s (very lacking) documention we prefer to point to
example scripts in the repo over duplicating their in docs, with that example scripts in the repo over duplicating them in docs, but with
in mind here are some definitive snippets to help hook you into that in mind here are some definitive snippets to try and hook you
looking deeper. into digging deeper.
Run a func in a process Run a func in a process
@ -402,7 +403,7 @@ is ``tractor``'s IPC!
*************************** ***************************
Have a bunch of ``asyncio`` code you want to force to be SC at the process level? Have a bunch of ``asyncio`` code you want to force to be SC at the process level?
Check out our experimental system for `guest-mode`_ controlled Check out our experimental system for `guest`_-mode controlled
``asyncio`` actors: ``asyncio`` actors:
.. code:: python .. code:: python
@ -675,7 +676,6 @@ channel`_!
.. _cheap or nasty: https://zguide.zeromq.org/docs/chapter7/#The-Cheap-or-Nasty-Pattern .. _cheap or nasty: https://zguide.zeromq.org/docs/chapter7/#The-Cheap-or-Nasty-Pattern
.. _(un)protocol: https://zguide.zeromq.org/docs/chapter7/#Unprotocols .. _(un)protocol: https://zguide.zeromq.org/docs/chapter7/#Unprotocols
.. _discovery: https://zguide.zeromq.org/docs/chapter8/#Discovery .. _discovery: https://zguide.zeromq.org/docs/chapter8/#Discovery
.. _guest mode: https://trio.readthedocs.io/en/stable/reference-lowlevel.html?highlight=guest%20mode#using-guest-mode-to-run-trio-on-top-of-other-event-loops
.. _messages: https://en.wikipedia.org/wiki/Message_passing .. _messages: https://en.wikipedia.org/wiki/Message_passing
.. _trio docs: https://trio.readthedocs.io/en/latest/ .. _trio docs: https://trio.readthedocs.io/en/latest/
.. _blog post: https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/ .. _blog post: https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
@ -687,7 +687,7 @@ channel`_!
.. _trio-parallel: https://github.com/richardsheridan/trio-parallel .. _trio-parallel: https://github.com/richardsheridan/trio-parallel
.. _uv: https://docs.astral.sh/uv/ .. _uv: https://docs.astral.sh/uv/
.. _msgspec: https://jcristharif.com/msgspec/ .. _msgspec: https://jcristharif.com/msgspec/
.. _guest-mode: https://trio.readthedocs.io/en/stable/reference-lowlevel.html?highlight=guest%20mode#using-guest-mode-to-run-trio-on-top-of-other-event-loops .. _guest: https://trio.readthedocs.io/en/stable/reference-lowlevel.html?highlight=guest%20mode#using-guest-mode-to-run-trio-on-top-of-other-event-loops
.. |gh_actions| image:: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fgoodboy%2Ftractor%2Fbadge&style=popout-square .. |gh_actions| image:: https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fgoodboy%2Ftractor%2Fbadge&style=popout-square