How to use the aiomas.codecs.MsgPackBlosc 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)
github frnsys / system_designer / syd / cli.py View on Github external
def start_node(port):
    """start a node"""
    task = Node.start(('0.0.0.0', port),
                      codec=aiomas.codecs.MsgPackBlosc,
                      extra_serializers=[serializers.get_np_serializer])

    # terminates when the node's manager is given the 'stop' command
    aiomas.run(until=task)

aiomas

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

MIT
Latest version published 6 years ago

Package Health Score

42 / 100
Full package analysis