Skip to main content

Peer management

Functions

all_peerinfo()->Bag of (Charstring,Charstring,Integer,Integer,Record)

gethostname()->Charstring

The local host name of this computer


get_ip(Charstring host)->Bag of Charstring

The IP address(es) of host


host(Peer p)->Charstring

ips(Peer p)->Record

is_running(Charstring peer)->Boolean

Is peer running?


listen()->Boolean

Start running this peer as a server


multicastreceive(Vector peers,Charstring fn,Vector args)->Bag

my_hostname(Charstring host)->Charstring

Set the hostname used by the system to host


my_hostname()->Charstring

The hostname used by the system to locate this computer


my_local_ip()->Bag of Charstring

The IP addresses of this computer in its local network


name(Peer p)->Charstring

nameserver(Charstring descr)->Charstring

Make this peer the nameserver of a federation of sa.engine peers. Format of descr: '' or 'name' or 'name:port' or ':port'. The default name is NAMESERVER. The default port is 35021 or the envonment variable NAMESERVERPORT. If name is non-empty the nameserver will still have the name NAMESERVER as alias. Start the nameserver by calling listen()


nameserverhost()->Charstring

Get current nameserver's host name


nameserverhost(Charstring name)->Charstring

Set host name of nameserver to name


nameserverport(Integer no)->Integer

Set port number used by nameserver to no


other_peers()->Bag of Charstring nm

Return all other peers in federation


peerinfo(Peer p)->(Charstring,Charstring,Integer,Integer,Record)

In nameserver: basic information about peer p


peers_at_nameserver(Charstring except)->Bag of Charstring

Return all peers in federation except peer named except


peers_at_nameserver_local(Charstring except)->Bag of Charstring

Retrieve peers of federation except the one named except


peer_named(Charstring peer)->Peer

Get the object representing the peer


pid(Peer p)->Integer

portno(Peer p)->Integer

porttimeout(Real timeout)->Real

Set timout for opening a port to a peer


register(Charstring peerspec)->Charstring

Register this peer in the nameserver with peerspec being peer or peer@host or peer@host:port or peer@:port


remote_function_tuples(Charstring peer,Charstring fn,Vector args)->Bag of Vector

reregister(Charstring peerspec)->Charstring

Register this peer in the nameserver with peerspec being peer or peer@host or peer@host:port or peer@:port. Override possible existing registration


routeapply(Charstring fn,Bag inputs)->Bag

send(Charstring peer,Charstring query)->Literal

Send query to peer for evaluation without waiting for result


server(Charstring name,Charstring host,Integer port)->Boolean

Run this process as server named name on host listening on port


set_portno(Charstring pn,Integer port)->Integer

ship(Charstring peer,Charstring query)->Bag of Vector

Ship query string to peer for evaluation and ship back result


start_engine(Charstring name,Charstring image,Number timeou)->Charstring

Start a new local server named name on this computer with image. Wait for server to start timeout seconds before failing


start_engine(Charstring name,Charstring image,Number timeout,Charstring flgs)
->Charstring

Start a new local server named name on this computer with image. Wait for server to start timeout seconds before failing


start_engine(Charstring name)->Charstring

Start a new local server named name on this computer


start_engine(Charstring name,Charstring image)->Charstring

Start a new local server named name with image


start_nameserver(Charstring name)->Charstring

Start a new nameserver named name on this computer


start_nameserver(Charstring name,Charstring extra_flags)->Charstring

Start a new nameserver named name on this computer


this_peerid()->Charstring

Get the name of this peer


wait_for(Vector of Charstring peers)->Boolean

Wait for peers to start listening


wait_for(Charstring peer)->Boolean

Wait for peer to start listening