sociomantic-tsunami / dlsproto

Distributed Log Store protocol definition, client, fake node, and tests
Boost Software License 1.0
3 stars 18 forks source link

getRangeSize / getRangeCount to get number of bytes or record count #58

Open nemanja-boric-sociomantic opened 6 years ago

nemanja-boric-sociomantic commented 6 years ago

Sometimes when implementing features of a DLS reader we want to know exactly how much data we're dealing with for a certain range. It guides us in how we end up implementing our algorithms, whether we can keep some X range of data in memory, etc.

The current workaround is that we do these tests manually with getRange. But that of course causes a lot of network traffic for data which is ultimately just discarded.

Ideally it would be supported for for getRange and its filter/regex equivalents.

gavin-norman-sociomantic commented 6 years ago

A good way to do this would be as an option for GetRange. Similar to the DHT GetAll keys only option.