DSage: Distributed Sage

Distributed Sage dsage is a distributed computing framework suitable for coarse distributed compuatations.

class dsage.dsage.DistributedSage

Distributed Sage allows you to do distributed computing in Sage.

To get up and running quickly, run dsage.setup() to run the configuration utility.

Note that configuration files will be stored in the directory $DOT Sage/dsage.

QUICK-START

  1. Launch sage

  2. Run:

    sage: dsage.setup() #not tested
    

    For a really quick start, just hit ENTER on all questions. This will create all the necessary supporting files to get DSage running. It will create the databases, set up a private/public key for authentication and create a SSL certificate for the server.

  3. Launch a server, monitor and get a connection to the server:

    sage: D = dsage.start_all() #not tested
    

    This will start 2 workers by default. You can change it by passing in the “workers=N” argument where “N” is the number of workers you want.

  4. To do a computation, use D just like any other Sage interface. For example:

    sage: j = D('2+2')  #not tested
    sage: j.wait()      #not tested
    sage: j             #not tested
    4
    
__weakref__
list of weak references to the object (if defined)
kill_all()
Kills the server and worker.
kill_server()
kill_worker()
server(blocking=True, port=None, log_level=0, ssl=True, db_file='/tmp/sage4704/dsage/db/dsage.db', log_file='/tmp/sage4704/dsage/server.log', privkey='/tmp/sage4704/dsage/cacert.pem', cert='/tmp/sage4704/dsage/pubcert.pem', authenticated_logins=False, failure_threshold=3, verbose=True, testing=False, profile=False)

Run the Distributed Sage server.

Doing dsage.server() will spawn a server process which listens by default on port 8081.

setup(template=None)

This is the setup utility which helps you configure dsage.

Type dsage.setup() to run the configuration for the server, worker and client. Alternatively, if you want to run the configuration for just one parts, you can launch dsage.setup_server(), dsage.setup worker() or dsage.setup().

setup_client()
This method runs the configuration utility for the client.
setup_server(*args)
This method runs the configuration utility for the server.
setup_worker()
This method runs the configuration utility for the worker.
start_all(port=None, workers=2, log_level=0, poll=1.0, authenticate=False, failure_threshold=3, verbose=True, testing=False)
Start the server and worker and returns a connection to the server.
worker(server='localhost', port=8081, workers=2, poll=1.0, username='mandrake', blocking=True, ssl=True, log_level=0, authenticate=True, priority=20, privkey='/tmp/sage4704/dsage/dsage_key', pubkey='/tmp/sage4704/dsage/dsage_key.pub', log_file='/tmp/sage4704/dsage/worker.log', verbose=True)

Run the Distributed Sage worker.

Typing sage.worker() will launch a worker which by default connects to localhost on port 8081 to fetch jobs.

dsage.dsage.spawn(cmd, verbose=True, stdout=None, stdin=None)
Spawns a process and registers it with the Sage.

Previous topic

Wiki Interactive Web Page.

Next topic

Cryptography

This Page