Skip to content

Conversation

@alexggh
Copy link
Contributor

@alexggh alexggh commented Nov 28, 2025

Taking a stab at making the API surface easier to understand and complete for the required use cases.

Proposal

  • Introduce a subscription API with filtering only on topics, removed the ability to query statements since subscription is the desired model and anything achievable with the query can be achieved with the subscription as well.
  • Rename priority in expiry, make it mandatory and define what it contains, the most significant 32 bits represent the expiration time(in seconds since UNIX epoch) and the lower 32 bits represent an arbitrary sequence number used to order statements with the same expiration time.
  • Document how statements fields like channel_id and expiry interact.

TODO

@alexggh alexggh changed the base branch from alexggh/allow_changing_eviction_policy to AndreiEres/sss-rpc-types December 2, 2025 09:05
@alexggh alexggh force-pushed the alexggh/api-consolidation branch from 3fac3cc to b3d1b36 Compare December 2, 2025 09:06
@alexggh alexggh changed the title [DRAFT] statement-store: cleaning API surface [DRAFT] statement-store: re-defining RPC API surface Dec 2, 2025
@alexggh alexggh requested a review from P1sar December 2, 2025 12:17
Base automatically changed from AndreiEres/sss-rpc-types to master December 3, 2025 00:06
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
item = Bytes,
with_extensions,
)]
fn subscribe_statement(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm the logic, am i right that this endpoint immediately provide currently matching statements and then send new matching statement once they appear in the store? Also if the current number of statements is too big will it automatically split them into pages the return in the separate updates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm the logic, am i right that this endpoint immediately provide currently matching statements and then send new matching statement once they appear in the store?

Yes, the plan is to immediately provide currently matching statements.

Also if the current number of statements is too big will it automatically split them into pages the return in the separate updates.

Not sure I understand why would you need pagination for the subscribe, you would receive each statement one by one.

@alexggh alexggh force-pushed the alexggh/api-consolidation branch from 8bc0975 to acf0103 Compare December 9, 2025 14:28
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants