How to use the aiomas.Container.create function in aiomas

To help you get started, we’ve selected a few aiomas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github frnsys / system_designer / syd / node / cluster.py View on Github external
def __init__(self, port, hosts, distributor=RoundRobin, venv=None):
        """create a new cluster listening on `port`, managing `hosts`"""
        self.hosts = sum((self._start_node(host, user, start_port, venv)
                         for host, user, start_port in hosts), [])
        self._container = aiomas.Container.create(('localhost', port),
                                                  codec=aiomas.codecs.MsgPackBlosc,
                                                  extra_serializers=[get_np_serializer])
        self._container.has_manager = True
        self._managers = aiomas.run(self._connect_to_managers(self.hosts))
        self._distributor = distributor(self._managers)

aiomas

Asyncio-based, layered networking library providing request-reply channels, RPC, and multi-agent systems.

MIT
Latest version published 7 years ago

Package Health Score

42 / 100
Full package analysis