-
Notifications
You must be signed in to change notification settings - Fork 25
Design plan
Tom Kaitchuck edited this page Nov 4, 2019
·
37 revisions
- Controller client
- Use async gRPC calls based on Tonic.
- Code gen from proto in main repo
- Controller command line
- Use structopt
- Connection factory
- Connection pool
- Use ownership model based on a "connectionGuard" to return connections to pool.
- Decode frames of wire commands
- Serialization
- Use ownership to manage borrowing and non-copying.
- Client Factory
- Create other components and act as a meta service interface so they can instantiate appropriate dependencies as needed.
- Need to manage lifetimes.
- RawClient
- Need layer to connect receiving bytes to reply listener.
- Use oneshot channel to manage replies (Like a completable future)
- Server command line
- Verify wire compatibility test.
- ByteStreamWriter
- Can use append blocks by feeding into a channel and draining it into a single block in a loop.
- ByteStreamReader
- Always keep a future of a task pending by pushing completed data into a non-buffered channel.
- EventSegmentReader
- EventStreamReaderImpl
- Pull from segments into a 'current' buffer. (because individual events are handed to calles not blocks)
- Caller can fill buffer if room from completed futures and then read from buffer. If no completed futures and empty buffer it can select on them.
- EventStreamWriterImpl
- Inflight manager - Use enum passed into mpsc on both ends to avoid mutexes and define order.
- TableSegment
- Need a read mode to receive updates.
- TableSynchronizer
- Ownership + Functions make updates very clean.
- ReaderGroupState
- Create MultiKeyLatestItemSequentialProcessor for the non-one-off updates.
- Authentication
- Need a client to talk to keycloak to get a token to send to the controller. (This uses a standard protocol)
- Metrics
- Logging
- Reactor
- Internal Serialization
- Testing tools