tractor/examples
Tyler Goodlet 31207f92ee Finally implement peer-lookup optimization..
There's a been a todo for soo long for this XD

Since all `Actor`'s store a set of `._peers` we can try a lookup on that
table as a shortcut before pinging the registry Bo

Impl deats:
- add a new `._discovery.get_peer_by_name()` routine which attempts the
  `._peers` lookup by combining a copy of that `dict` + an entry added
  for `Actor._parent_chan` (since all subs have a parent and often the
  desired contact is just that connection).
- change `.find_actor()` (for the `only_first == True` case),
  `.query_actor()` and `.wait_for_actor()` to call the new helper and
  deliver appropriate outputs if possible.

Other,
- deprecate `get_arbiter()` def and all usage in tests and examples.
- drop lingering use of `arbiter_sockaddr` arg to various routines.
- tweak the `Actor` doc str as well as some code fmting and a tweak to
  the `._stream_handler()`'s initial `con_status: str` logging value
  since the way it was could never be reached.. oh and `.warning()` on
  any new connections which already have a `_pre_chan: Channel` entry in
  `._peers` so we can start minimizing IPC duplications.
2024-07-04 19:40:11 -04:00
..
advanced_faults Start a new `._testing.fault_simulation` 2024-04-03 10:19:50 -04:00
debugging Drop thread logging to make `log.pdb()` patts match in test 2024-06-07 22:35:59 -04:00
integration Move pydantic-click hang example to new dir, skip in test suite 2022-08-02 12:16:58 -04:00
parallelism Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
__init__.py Make example a subpkg for `python -m <mod>` testing 2022-07-27 11:40:02 -04:00
__main__.py Use trio.run() in windows tests 2021-05-07 11:21:40 -04:00
a_trynamic_first_scene.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
actor_spawning_and_causality.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
actor_spawning_and_causality_with_daemon.py Drop lingering rpc_module_paths refs 2021-05-07 11:21:40 -04:00
asynchronous_generators.py Terminate async gen example caller to avoid (benign) errors in console output 2021-08-02 21:49:15 -04:00
full_fledged_streaming_service.py Modernize streaming example script 2024-05-09 16:51:51 -04:00
infected_asyncio_echo_server.py Add context test that opens an inter-task-channel that errors 2022-07-14 16:13:12 -04:00
multiple_streams_one_portal.py Update all examples to new streaming API 2021-04-28 12:23:08 -04:00
quick_cluster.py Drop unecessary partial 2021-11-04 10:41:25 -04:00
remote_error_propagation.py Drop lingering rpc_module_paths refs 2021-05-07 11:21:40 -04:00
rpc_bidir_streaming.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
service_discovery.py Finally implement peer-lookup optimization.. 2024-07-04 19:40:11 -04:00