dfuse-eosio
dfuse-eosio copied to clipboard
Receive N most recent transactions then stream real-time results
The idea is to show new state changes happening in close to real-time without having to refresh a page, but we still want, say, the oldest 10
events/actions.
For example, if a user wants to go back by a couple transactions near HEAD
but is also interested in real-time changes in state in a contract — like a query that would give the 25
nearest results before HEAD
block, then continue streaming new results as they come in.
Currently, the only way to do something similar would be to fetch 10
results from last result's cursor when the user hits a button (to trigger the action) and another button would be needed to trigger the move forward with first cursor's results
That was the goal depicted here, right? https://www.dfuse.io/en/blog/avoid-refreshing-provide-instant-ux-with-dfuse-streaming-search
It's true it requires 2 queries, but it can be done with a single user interaction, can't it? You imagine a single query that does that in one swift?
Yeah, that's the goal. In our case, we're rarely going back more than 5-10 actions. For our use case, it would be nice if we could build a single forward search but specify n actions from the past to display first, then have others refresh in automatically.
We'll work towards two queries for the moment. Thanks!