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

improved API for batching return data #3

Open
egonw opened this issue Aug 28, 2015 · 1 comment
Open

improved API for batching return data #3

egonw opened this issue Aug 28, 2015 · 1 comment

Comments

@egonw
Copy link
Member

egonw commented Aug 28, 2015

improve the manager API to not use (int page, int size) for batching results, but integrate the count and list calls, use the BC API for batching return values, also allowing canceling BC calls.

For example, the current manager API has:

getPharmacologyCountForTarget(CWResult target)
getPharmacologyListForTarget(CWResult target, int page, int size)

However, the Bioclipse API for batched return values should be used, allowing the above two calls to be merged into:

getPharmacologyForTarget(CWResult target)

Where this will internally use a (configurable?) amount of results (former "size"). This has the advantage that the GUI will be more responsive and results may show up earlier, and that a call can be cancelled. Internally, the count and list API methods will be used, which has the added benefit that the method will have a reasonable progress bar.

@jonalv
Copy link
Member

jonalv commented Aug 28, 2015

We should consider returning an iterator. We have the IReturner in Bioclipse for iterating over results as they become available in the method for doing partial returns from a manager as descibed here

That iterator will probably need a cache as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants