Skip to content

Commit

Permalink
rename distributed3 -> distributed
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Oct 7, 2015
1 parent acf0c9f commit 29dffe0
Show file tree
Hide file tree
Showing 21 changed files with 41 additions and 41 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Pool Example
### Client Pool

```python
In [1]: from distributed3 import Pool
In [1]: from distributed import Pool

In [2]: pool = Pool('127.0.0.1:8787')
In [3]: pool.sync_center()
Expand Down Expand Up @@ -157,7 +157,7 @@ significantly over the various iterations of this project.
1. [`dask.distributed`](http://dask.pydata.org/en/latest/distributed.html): threads and callbacks
2. [`dist`](https://github.com/mrocklin/dist): Actor model with threads and queues
3. [`distributed`](https://github.com/mrocklin/distributed): Coroutine model with asyncio
4. `distributed3`: Coroutine model with tornado
4. `distributed`: Coroutine model with tornado

We need a pleasant way to write somewhat complex interactions between nodes.
These interactions can not block because each node is expected to handle a
Expand Down
4 changes: 2 additions & 2 deletions bin/dcenter
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else:
ip = None
port = 8787

from distributed3.utils import get_ip
from distributed.utils import get_ip
ip = get_ip()

port = int(port)
Expand All @@ -27,7 +27,7 @@ signal.signal(signal.SIGTERM, handle_signal)


# Run stuff
from distributed3 import Center
from distributed import Center
from tornado.ioloop import IOLoop
print("Start center at %s:%d" % (ip, port))
center = Center(ip, port)
Expand Down
4 changes: 2 additions & 2 deletions bin/dworker
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ try:
except IndexError:
print("Usage: python dworker.py center-ip center-port")

from distributed3.utils import get_ip
from distributed.utils import get_ip
ip = get_ip()


Expand All @@ -23,7 +23,7 @@ signal.signal(signal.SIGINT, handle_signal)
signal.signal(signal.SIGTERM, handle_signal)


from distributed3 import Worker
from distributed import Worker
from tornado.ioloop import IOLoop

port = 8788
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
from tornado import gen
from tornado.ioloop import IOLoop

from distributed3.core import read, write, rpc
from distributed3.center import Center
from distributed.core import read, write, rpc
from distributed.center import Center


def test_metadata():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from tornado import gen
from tornado.ioloop import IOLoop

from distributed3 import Center, Worker
from distributed3.utils import ignoring
from distributed3.client import (scatter_to_center, scatter_to_workers,
from distributed import Center, Worker
from distributed.utils import ignoring
from distributed.client import (scatter_to_center, scatter_to_workers,
gather_from_center, gather_strict_from_center, RemoteData, keys_to_data)


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from tornado import gen, ioloop
from multiprocessing import Process
from distributed3.core import (read, write, pingpong, read_sync, write_sync,
from distributed.core import (read, write, pingpong, read_sync, write_sync,
Server, connect_sync, rpc, connect)
from functools import partial

Expand Down Expand Up @@ -70,7 +70,7 @@ def f():

def test_sync():
def f():
from distributed3.core import Server
from distributed.core import Server
from tornado.ioloop import IOLoop
server = Server({'ping': pingpong})
server.listen(8887)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
from toolz import merge
import pytest

from distributed3 import Center, Worker
from distributed3.utils import ignoring
from distributed3.client import gather_from_center
from distributed3.core import connect_sync, read_sync, write_sync
from distributed3.dask import _get, _get2, validate_state, heal
from distributed import Center, Worker
from distributed.utils import ignoring
from distributed.client import gather_from_center
from distributed.core import connect_sync, read_sync, write_sync
from distributed.dask import _get, _get2, validate_state, heal

from tornado import gen
from tornado.ioloop import IOLoop
Expand Down Expand Up @@ -268,7 +268,7 @@ def slowinc(x):


def run_center(port):
from distributed3 import Center
from distributed import Center
from tornado.ioloop import IOLoop
center = Center('127.0.0.1', port)
center.listen(port)
Expand All @@ -277,7 +277,7 @@ def run_center(port):


def run_worker(port, center_port, **kwargs):
from distributed3 import Worker
from distributed import Worker
from tornado.ioloop import IOLoop
worker = Worker('127.0.0.1', port, '127.0.0.1', center_port, **kwargs)
worker.start()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
from time import time, sleep
from toolz import merge

from distributed3 import Center, Worker, Pool
from distributed3.pool import divide_tasks, RemoteData
from distributed3.utils import ignoring
from distributed3.core import (connect_sync, read_sync, write_sync,
from distributed import Center, Worker, Pool
from distributed.pool import divide_tasks, RemoteData
from distributed.utils import ignoring
from distributed.core import (connect_sync, read_sync, write_sync,
send_recv_sync)
from contextlib import contextmanager
from multiprocessing import Process
Expand Down Expand Up @@ -121,7 +121,7 @@ def test_workshare():


def run_center(port):
from distributed3 import Center
from distributed import Center
from tornado.ioloop import IOLoop
center = Center('127.0.0.1', port)
center.listen(port)
Expand All @@ -130,7 +130,7 @@ def run_center(port):


def run_worker(port, center_port, **kwargs):
from distributed3 import Worker
from distributed import Worker
from tornado.ioloop import IOLoop
worker = Worker('127.0.0.1', port, '127.0.0.1', center_port, **kwargs)
worker.start()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from operator import add
from time import sleep

from distributed3.core import read, write, rpc, connect
from distributed3.utils import ignoring
from distributed3.center import Center
from distributed3.worker import Worker
from distributed.core import read, write, rpc, connect
from distributed.utils import ignoring
from distributed.center import Center
from distributed.worker import Worker


from tornado import gen
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/source/foundations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ Workers, the Center, and clients must all communicate with each other over the
network. We use *raw sockets* as mediated by tornado streams. We separate
messages by a sentinel value.

.. autofunction:: distributed3.core.read
.. autofunction:: distributed3.core.write
.. autofunction:: distributed.core.read
.. autofunction:: distributed.core.write


Servers
Expand All @@ -52,12 +52,12 @@ Center objects inherit from a ``Server`` class. This Server class thinly wraps
``tornado.tcpserver.TCPServer``. These servers expect requests of a
particular form.

.. autoclass:: distributed3.core.Server
.. autoclass:: distributed.core.Server


RPC
---

To interact with remote servers we typically use ``rpc`` objects.

.. autoclass:: distributed3.core.rpc
.. autoclass:: distributed.core.rpc
4 changes: 2 additions & 2 deletions docs/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cluster.

.. code-block:: python
>>> from distributed3 import Pool
>>> from distributed import Pool
>>> pool = Pool('192.168.1.100:8787') # Provide address of center
>>> A = pool.map(lambda x: x**2, range(10))
Expand Down Expand Up @@ -76,7 +76,7 @@ Get works with raw dask graphs:

.. code-block:: python
>>> from distributed3.dask import get
>>> from distributed.dask import get
>>> inc = lambda x: x + 1
>>> dsk = {'a': 1, 'b': (inc, 'a')}
>>> get('192.168.1.100', 8787, dsk, 'b')
Expand Down
4 changes: 2 additions & 2 deletions docs/source/worker-center.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ a quick example of what happens during a call to ``compute``::
Alice: Hey Center! I have z!


.. autoclass:: distributed3.worker.Worker
.. autoclass:: distributed.worker.Worker


Center
Expand All @@ -91,4 +91,4 @@ All worker nodes in the same network have the same center node. They update
and query this center node to share and learn what nodes have what data. The
center node could conceptually be replaced by a Redis server.

.. autoclass:: distributed3.center.Center
.. autoclass:: distributed.center.Center
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
import os
from setuptools import setup

setup(name='distributed3',
setup(name='distributed',
version='1.0.0',
description='Distributed computing',
url='http://github.com/mrocklin/distributed3/',
url='http://github.com/mrocklin/distributed/',
maintainer='Matthew Rocklin',
maintainer_email='mrocklin@gmail.com',
license='BSD',
install_requires=open('requirements.txt').read().strip().split('\n'),
packages=['distributed3'],
packages=['distributed'],
long_description=(open('README.md').read() if os.path.exists('README.md')
else ''),
scripts=[os.path.join('bin', 'dworker'), os.path.join('bin', 'dcenter')],
Expand Down

0 comments on commit 29dffe0

Please sign in to comment.