read()
/write()
send()
/recv()
or sendto()
/recvfrom()`socket communication is bidirectional
difference between client & server: networking level
difference between client & server: application level
API: application programming interface
RPC: API that looks like function call
service discovery
server:
client library: "stub" to manage communication with server
RPC is a leaky abstraction
XML/RPC (evolved into SOAP: Simplified Object Access Protocol)
See also: JSON-RPC
Google protobufs (serialization) & stubby (transport)
CRUD application: Create, Read, Update, Delete
RPC is a generic term (abstraction)
Sun RPC (AKA ONC-RPC)
rpcgen
tool*.x
filesrpcinfo -p
protocol compiler: generate server & client stubs
input: RPCL (RPC Language)
rpcgen prog.x
generates:
pro_clnt.c
prog_svc.c
prog_xdr.c
prog.h
prog_server.c
prog_client.c
server side: register callable procedures
rpc_reg()
rpc_call()
client side
clnt_create()
/clnt_create_timed()
svc_create()
clnt_call()
disk: ~8M cycles (seek)
cache-aware programming (lecture #1)
mutex lock/unlock: ~25 ns (~25 cycles)
numbers are subject to change
TODO: diagram
non-VM (virtual memory) system
physical address
problems with physical address:
main()
: fixed addresscall {addr}
solution 1: linkage editing
solution 2: relative branch
solution 3: process-specific base address (segment register)