-
Notifications
You must be signed in to change notification settings - Fork 770
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigchainDB Events API specification #862
Comments
As a BigchainDB client user I want to get notified upon the latest transaction of a specific asset, typically this asset would be a stream of data (from devices/sensors) |
Some notes:
As I think you noted, this is really concerned with querying transaction schemas and may be difficult to address without more thought on that matter. Not sure what you mean by "asset type" (policies?), but the "hashtag" approach is a good way of by-passing any custom document indexing: users could add an array of strings to tag a transaction and query for them via that later (probably indexable as well?).
Some interaction with @libscott provided some ideas (to be fleshed out) of how we could reuse some ideas for making the transaction list API performant for this events API. |
I can divide the problem into 2 subsets (as discussed with Tim yesterday):
|
(For posterity) In discussion with @TimDaub and @vrde, we've narrowed down our main use case and a few desired properties for the Event API. Main use case
The Events API is designed to sync (filtered) data from a BigchainDB federation to an end-client's servers for processing, look up, or association (with their own data). Desired properties
Another aspect to consider is the scope of an implementation. In the near term, the amount of custom, client-side software should be limited. If we can piggyback on existing primitives, architectures, or protocols, we should do so until we begin hurting (e.g. in scale). A further requirement is the ability to rate-limit and monitor the Events API, given that IPDB (and likely other federations) will need to bill usage. An implementation would ideally play well with existing solutions, like 3scale. Design choicesTransportWhat type of communication primitive?
Subscription interest filteringTo what detail can a client subscribe for events? What types of filtering rules are available on the total set of data (i.e. all transactions, blocks, and votes processing)?
Subscription managementHow does the server manage client subscriptions? How would it work within a federated model?
Event payloadWhat does the payload for events look like?
Event processingHow does the federation process events and broadcast them to interested parties?
Event retrievalHow could a client retrieve missed events?
Future topics, not in scope for now:
|
@sohkai Have we decided on what are we going ahead with as of now? |
Done in #1086. |
Definition
This project is deliberately called "Event APIs" as we didn't want to introduce a tool-driven bias (I'd consider "Websocket API" a biased way of naming it e.g.). What we mean by Event APIs are interfaces between
communicating with an external entity (two-way communication not a hard requirement). An external entity is defined as not being in any ways associated/connected with the entities running the multiple or single node(s).
Examples of such interfaces that were already mentioned:
Problem statement
For given actions that happen on a single or multiple nodes in a BigchainDB cluster, we'd like to PUSH information about that action in the form of an event to a client (assumed they've registered upfront stating that they'd like to receive that information).
Collected user stories so far
This is a list of stories we've collected from users already. They're ordered by priority. If you know from users that are interested in a specific aspect, feel free to update this list without changing the prioritization. If you're a user and you're currently reading this ticket, feel free to comment below to let us know what's important to you.
Confirmed stories by actual users of BigchainDB (high priority)
Suggested stories by us (no confirmation for actual users YET; not mandatory for the completion of this project; lower priority)
bigchain
tableDeliverables
See #1086.
Ideas from the kick-off meeting
Glossary
The 'hashtag' approach:
- Tag a transaction with a string
- Allow a client to retrieve all transactions being written into "bigchain", that match that specific string
The asset type approach:
and so on.
"valid block", meaning that as a user I only want to be notified when > 50% of the votes are in?
"Specific challenge": Mainly thinking about specific cryptoconditions to occur on the chain (e.g. monitor all hashlock conditions).
The text was updated successfully, but these errors were encountered: