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

Support batch JSON-RPC in python client #531

Merged
merged 1 commit into from
Aug 23, 2018

Conversation

tribal-tec
Copy link
Contributor

This is used to batch request all schemas to reduce the number of roundtrips
which boosts the performance of the initial connect (closes #502).

if _try_add_method(target_object, url, registry_entry):
if registry_entry in schemas:
schema = schemas[registry_entry]
elif registry_entry.endswith('/schema'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could make a const for /schema, it seems to be used in other files.

def callback(payload):
"""
The callback for the response.
if response_timeout:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the timeout applied for snapshot requests as well? Because snapshot requests could take a long time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The image() function does not use a timeout. snapshot() as a generated function has one, but the user can always set a different/none timeout.

This is used to batch request all schemas to reduce the number of roundtrips
which boosts the performance of the initial connect (closes BlueBrain#502).
@tribal-tec tribal-tec merged commit 690edc8 into BlueBrain:master Aug 23, 2018
@tribal-tec tribal-tec deleted the python_connect branch August 23, 2018 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize python connect
2 participants