logo: ruis letter in ogham

Ruis: A Python Library for Programming Peer-to-Peer Distributed Systems


Introduction
Tutorial and videos
Documentation
Examples
Design guidelines
Download
Bugs/Mailing list, etc.

Introduction

Ruis is a Python library for developing highly modular distributed systems.

The philosophy behind Ruis is a combination of the following principles:

  1. Almost everything is a file.
    • Objects are files.
    • Method invocations are events that are files.
    • Namespaces are filesystems. They can be mounted to mountpoints, that are files, for (remote) object access.
    • Namespaces can be populated by loading objects directly from directory branches of the underlying operating system.
  2. Reflection is for everyday use.
    • Filesystems are browsable.
    • Objects can adjust their behaviour according to what they find in their environment.
    • Objects can expose their contents in the filesystem.
  3. Object interfaces are two-way.
    • All public methods can be both called and listened to. That is, Ruis has a built-in observer pattern without making distinction between the event interface from the public interface of an object.
    • The behaviour of new objects can be hooked to the behaviour of the core system without any change in the core.
  4. All peers are equal.
    • Mounting a namespace is a fully symmetric operation. By default, both peers get full access to the objects in the opposite namespace.
    • Ruis does not force the use of any specific distributed architecture: client-server, peer-to-peer, stateful or stateless, rich or thin clients.
    • Activity, intelligence and responsibilities can be shared among the classes or objects in the most suitable way, without letting the distribution rule out any options.
  5. Everything is dynamic.
    • The contents of the namespaces can change, objects can change the events they are hooked to, and namespaces can be mounted and unmounted during runtime.

This philosophy gives a strong support for the incremental development of modular, distributed and dynamic systems. It is possible to add some features to a system just by adding a file to a project, without changing anything in the existing modules.

Ruis itself is very modular. The following modules are included in the Ruis package but they can be left out from a system built on top of Ruis.

  • /conn/rp, the Ruis protocol, mounts other Ruis filesystems.
  • /modules migrates code one Python module at a time
  • /share enables sharing objects and accessing shared objects in a location independent manner
  • /dev/console gives access to standard input and output streams of a Ruis node
  • /conn/webformp, the web form protocol, enables programming web interfaces with the feel of implementing ordinary GUIs with any typical GUI library. For example, event callbacks can be bound to local Python routines without writing a line of Javascript. The web form protocol is at the level of proof-of-concept. (Runs at least on Firefox, Konqueror, Opera 9.5 beta and Safari).

Python logo LGPL logo Valid HTML 4.01 Transitional
Updated 2009-11-18 01:38 (EET), Antti Kervinen, ask@cs.tut.fi