Savant
Savant copied to clipboard
ReplayDb
The Replay adapter (RPA) accumulates streaming history in storage, such as S3, and can resend the requested data to the specified 0mq socket on demand.
A request is like:
- source_id
- UUIDs
- [sync=true/false]
- [service_messages=true/false]
- [shutdown=token]
- [eos=true/false]
- [before=N]
- [after=M]
- [pts=preserve/contiguous]
- [webhook]
Where:
syncdefines whether to send synchronously according to PTS or as fast as possible.source_idis the name to save under, context-specific (files or S3).UUIDSlist of keyframe UUID forming payload of the request.beforemeansNfully decodable blocks before the first UUID.aftermeansMfully decodable blocks after the last UUID.webhookis a URL to notify upon completion.service_messagesdefines whether to send EOS and SHUTDOWN if they are present.shutdowndefines whether to send shutdown upon completion.eosdefines whether to send EOS upon completion.ptsdefines how to treat PTS of sent blocks.
Concurrent requests must be served in parallel. When the request is complete, a webhook is called if registered during the invocation.
The basic implementation must keep PTS as is; if the user provides the UUID list with gaps, they must persist.
What is UUID? The UUID is the UUID of the keyframe addressing the block. In the savant-rs 0.2.17, we added a feature to get the UUID of the previous keyframe for any frame. So, the user can place metadata in MongoDB or OpenSearch and extract blocks related to the event. Then, he/she requests the VAP to create a recording.
The VAP works as a pass-through or a sink adapter. Users can specify the socket for incoming and outgoing traffic and the credentials for storage.
Application Modules:
- adapter itself (separate docker endpoint);
- query API (separate docker endpoint, can be launched separately for LB);
Works on:
- MongoDB or RocksDB implementation;
Parameters:
- Mongo collection TTL;
- Mongo connection (incl. cluster);
- Worker pool size.