Standalone Server Design
Raw network/graph data model - Holds account and exchange (link) data provided by accounts server.
Routing topology - Organizes graph into a routable topology.
Routing engine - Computes routes.
Where's the transaction engine?
Raw network/graph data model
- 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)
- 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
- accounts - set of accounts which are all exchangeable-between
- 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
No grouping for now.
- RoutingEntry - distance between two nodes
- source node - AccountHalf
- destination node - AccountHalf
- distance - integer
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.
- PathSet - takes source node list, destination node list, and amount, and generates a set of paths between them with the indicated available credit.