Skip to content

Commit

Permalink
Add CI badge
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Goodlet committed Jul 14, 2018
1 parent e4f23ec commit c251ded
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ tractor
=======
A minimalist `actor model`_ built on multiprocessing_ and trio_.

|travis|

.. |travis| image:: https://img.shields.io/travis/tgoodlet/tractor/master.svg
:target: https://travis-ci.org/tgoodlet/tractor

``tractor`` is an attempt to take trionic_ concurrency concepts and apply
them to distributed-multicore Python.

Expand Down Expand Up @@ -212,17 +217,13 @@ a simple mechanism to restrict the functionality of the remote
allowed remote function namespace(s).

``tractor`` is opinionated about the underlying threading model used for
each actor. Since Python has a GIL and an actor model by definition
shares no state, there is no reason to use anything other then a
multiprocessing_ ``Process`` for execution. This makes ``tractor``
programs able leverage not only multi-core hardware but also distribute
over many hardware hosts (each *actor* can talk to all others with ease
over standard network protocols).

Eventually ``tractor`` plans to support different `supervision strategies`_ like ``erlang``.
each *actor*. Since Python has a GIL and an actor model by definition
shares no state between actors, it fits naturally to use a multiprocessing_
``Process``. This allows ``tractor`` programs to leverage not only multi-core
hardware but also distribute over many hardware hosts (each *actor* can talk
to all others with ease over standard network protocols).

.. _nursery: https://trio.readthedocs.io/en/latest/reference-core.html#nurseries-and-spawning
.. _supervision strategies: http://erlang.org/doc/man/supervisor.html#sup_flags
.. _causal: https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/#causality
.. _cancelled: https://trio.readthedocs.io/en/latest/reference-core.html#child-tasks-and-cancellation

Expand Down Expand Up @@ -359,8 +360,9 @@ actor and print the results to your screen:
Here there's four actors running in separate processes (using all the
cores on you machine). Two are streaming in ``stream_data()``, one is
aggregating values from those two in ``aggregate()`` and shipping the
cores on you machine). Two are streaming (by **yielding** value in the
``stream_data()`` async generator, one is aggregating values from
those two in ``aggregate()`` (also an async generator) and shipping the
single stream of unique values up the parent actor (the ``'MainProcess'``
as ``multiprocessing`` calls it) which is running ``main()``.

Expand Down Expand Up @@ -411,6 +413,9 @@ Cancellation
tractor.run(main)
Cancelling a nursery block cancels all actors spawned by it.
Eventually ``tractor`` plans to support different `supervision strategies`_ like ``erlang``.

.. _supervision strategies: http://erlang.org/doc/man/supervisor.html#sup_flags


Remote error propagation
Expand Down Expand Up @@ -483,6 +488,11 @@ multiple RPC calls to an actor can access global data using the per actor
)
Of course you don't have to use the ``statespace`` variable (it's mostly
a convenience for passing simple data to newly spawned actors); building
out a state sharing system per-actor is totally up to you.


How do actors find each other (a poor man's *service discovery*)?
-----------------------------------------------------------------
Though it will be built out much more in the near future, ``tractor``
Expand Down

0 comments on commit c251ded

Please sign in to comment.