Skip to content
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

Add "set_auto_subscription" API #726

Closed
abitmore opened this issue Mar 15, 2018 · 5 comments
Closed

Add "set_auto_subscription" API #726

abitmore opened this issue Mar 15, 2018 · 5 comments
Assignees
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) api feature

Comments

@abitmore
Copy link
Member

abitmore commented Mar 15, 2018

Once set_subscribe_callback is called, when calling get_objects and etc, the node will automatically subscribe the queried objects for the client. Sometimes it's not desired. Since it's hard to modify all other API's without breaking things, I think we can add a set_auto_subscription(bool) API, so the clients can control whether to automatically subscribe on follow-up queries.

By the way, I think the subscribing mechanism need an overhaul, see #777.

@abitmore abitmore added this to the Future Non-Consensus-Changing Release milestone Mar 15, 2018
@jmjatlanta
Copy link
Contributor

jmjatlanta commented Jun 7, 2018

One way to tackle this is to replace our bloom filter implementation with a counting bloom filter. An example (MIT licensed) is https://github.com/le1ca/bloomfilter/blob/master/inc/CountingBloomFilter.hpp.

With that in place, we can add a simple API method that calls the filter's delete method.

Note: counting bloom filters open up the possibility of false negatives. Cuckoo filters suffer the same problem. In short, you must have previously inserted an item in the filter in order to delete it without causing false negatives.

Update - another implementation:
https://github.com/queertypes/boost-bloom-filters/blob/master/boost/bloom_filter/counting_bloom_filter.hpp

@ryanRfox ryanRfox added 1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) labels Jun 7, 2018
@abitmore abitmore mentioned this issue Apr 10, 2019
9 tasks
@abitmore
Copy link
Member Author

Related: bitshares/bitshares-ui#2612

@abitmore
Copy link
Member Author

@sschiessl-bcp mentioned in #777 (comment):

Possible a set_subscribe_behavior that toggles the default subscription behavior (only subscribe if I add the optional parameter in every call with true)

@abitmore abitmore self-assigned this Apr 24, 2019
@abitmore abitmore changed the title Add "stop_subscribe" API Add "set_auto_subscribe" API Apr 24, 2019
@abitmore abitmore changed the title Add "set_auto_subscribe" API Add "set_auto_subscription" API Apr 24, 2019
@abitmore
Copy link
Member Author

See PR #1731. @sschiessl-bcp

@oxarbitrage
Copy link
Member

closed by the merge of #1731

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1b User Story The User Story details a requirement. It may reference a parent Epic. It may reference child Task(s) 2a Discussion Needed Prompt for team to discuss at next stand up. 3b Feature Classification indicating the addition of novel functionality to the design 6 API Impact flag identifying the application programing interface (API) api feature
Projects
None yet
Development

No branches or pull requests

4 participants