-
Notifications
You must be signed in to change notification settings - Fork 25
Design plan
Tom Kaitchuck edited this page Nov 12, 2020
·
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
- Provide a fixed interface so that additional impls can be added.
- 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.
- RawClient
- Need layer to connect receiving bytes to reply listener.
- Use oneshot channel to manage replies (Like a completable future)
- Client Factory
- Create other components and act as a meta service interface so they can instantiate appropriate dependencies as needed.
- Need to manage lifetimes.
- Server command line
- Verify wire compatibility test.
- EventSegmentReader
- 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
- Was delayed on server side support for tailing a table segment
- Ownership + Functions make updates very clean.
- ReaderGroupState
- Create MultiKeyLatestItemSequentialProcessor for the non-one-off updates.
- Segmented Readers
- Need API to poll for segments
- EventStreamReaderImpl
- Unlike java, doesn't manage segments. These are passed in externally. So group state is independent as opposed to a managed component.
- 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.
- Read call can return an enum.
- Python bindings.
- Use Py03
- TxnSegmentWriter
- Could add support for a per-key transaction... But we need timeout.
- TxnEventStreamWriter
- Needs to take time to pass to the controller
- 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.
- Authentication
- Need a client to talk to keycloak to get a token to send to the controller. (This uses a standard protocol)
- TLS support
- Both for client -> controller and client -> server
- [ ] Checkpoints
Use reader group state similar to Java.Needs to call into the event reader. (Inverse dependency)
- Event pointer support.
- Membership tracker
- Similar to example to automatically detect host failures.
- Watermarking
- EventStreamWriter noteTime
- Reader side is similar to checkpoints, using reader group. Can call into event stream reader similar to a CP.
- Batch client API.
-
[ ] Read/Ack APIPull from segment and return as needed, blocking for outstanding on Checkpoint.Auto manage membership with tracker.
- Jumbo event support.
- Stream event from a non-affiliated txn segment.
These may interact with many components and may have language specific functionality.
- Metrics
- Logging
- Reactor
- Internal Serialization
- Testing tools
- Integrations with external tools