Standalone Server Design

Three layers:

Raw network/graph data model - Holds account and exchange (link) data provided by accounts server.

interfaces with

Routing topology - Organizes graph into a routable topology.

interfaces with

Routing engine - Computes routes.

Where's the transaction engine?

Raw network/graph data model

Data objects
  • AccountSystem - interface to accounts system
    • name - string
    • callbacks to accounts system (see ClientAPI) - URLs
    • login/authentication data
  • User - user of an AccountSystem
    • name - string, must be unique to this Ripple server (in anticipation of user@server addressing in distributed protocol)
    • accountsystem
  • Account - a User's account with another User
    • name - string
    • owner - User who this account is kept for, who controls the account
    • partner - the other User; this account tracks obligations between the owner and the partner
  • Exchange - an offer to transfer value between two or more of a User's accounts
    • user
    • accounts - set of accounts which are all exchangeable-between

Routing topology

Business objects
  • Node - routing node, may be an account, a group of accounts, a group of groups, etc.
    • get_next_directions(targets) - list of potential next nodes, with distance to each target and priority (from accounts system) for each
    • get_pathset_to_node(next_node, amount) - set of account paths with amount available at next node for each
Data objects

No grouping for now.

  • RoutingEntry - distance between two nodes
    • source node - AccountHalf
    • destination node - AccountHalf
    • distance - integer

Routing engine

The routing engine should operate on abstract graphs instead of concrete account and exchange objects. That way, we can group accounts, and do routing through the graph of groups using the same engine we use for graphs of accounts. Routing through graphs of groups would recursively route through each group as needed.

Business objects
  • PathSet - takes source node list, destination node list, and amount, and generates a set of paths between them with the indicated available credit.