Stream Indexing Structure

+1 vote
How do you store subscribed streams in LevelDB? Is it an additional row to the index file (blocks/index/*.ldb)?

Can you also enlighten us the structure used so that you can query fast from LevelDB? For example, do you store the stream name and stream key as LevelDB key and the transaction hash as value?

Thanks.
asked May 4, 2017 by John_cl

1 Answer

0 votes
 
Best answer
If a node is subscribed to a stream, it indexes stream items in around 10 different ways, to enable rapid retrieval using all the different APIs, with global or local ordering. Each of these indexes uses its own type of key, and the index entry indeed points to the txid.
answered May 5, 2017 by MultiChain
selected May 7, 2017 by John_cl
...