a Sunrise server sketch 🌅 🤖
in this sketch, each "block" (module) is an separate service (process) that communicates with other services via json-rpc (usually over ipc).
log-writer: appends messages to your Scuttlebutt log
indexer: reads your Scuttlebutt log, creates indexes, and efficiently responds to queries
connector: connects and disconnects to external peers (handles
discoverer: finds possible connections (cache, log, lan, bluetooth, rooms, etc)
scheduler: schedules connections
socializer: decides who is allowed or denied from connecting or replicating
replicator: on new connections, request and handle replications
blobber: read and write blobs
graphql: expose a GraphQL interface for user-facing apps
service-resolver: resolve service names to addresses
configurator: something about configs
rather than modules implicitly depending on each other (i.e. the complex monkey-patching between
ssb-server modules), we want each module to have an explicit message-passing interface. rather than using streams for everything, we want our interfaces to work without streams and to only use json-rpc subscriptions to send events that trigger method requests. we want to keep the Scuttlebutt-isms to a minimum, so for example muxrpc and secret-handshake is encapsulated in one place.