Skip to content

Conversation

mkundu1
Copy link
Contributor

@mkundu1 mkundu1 commented Apr 26, 2022

No description provided.

max_message_length = _get_max_c_int_limit()
self._channel = grpc.insecure_channel(
f"{ip}:{port}",
options=[
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find a way to set this after the channel is created. So will need to document for when the channel instance is passed.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mkundu1 Is there a performance penalty for setting a high value here?

Copy link
Contributor Author

@mkundu1 mkundu1 Apr 26, 2022

Choose a reason for hiding this comment

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

@h-krishnan I think ideally we should replace GetStaticInfo with a streaming rpc. gRPC official website doesn't seem to have any best practice guideline regarding the message size (this is the closest thing I could find, probably the default message size is the best practice). Various thridparty blogs (like this) suggests against changing the message limit or making it too large.

Copy link
Contributor

Choose a reason for hiding this comment

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

@mkundu1 A streaming API will be difficult with a hierarchical structure. We need to figure out a way to flatten the tree. Maybe return root, its immediate children, immediate children of the children in sequence etc.

Copy link
Collaborator

@dnwillia-work dnwillia-work Apr 26, 2022

Choose a reason for hiding this comment

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

That's a pretty big number, what is it if you don't explicitly set the values? What's the reason to even change it? Was there an issue someone encountered?

Copy link
Contributor Author

@mkundu1 mkundu1 Apr 26, 2022

Choose a reason for hiding this comment

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

@h-krishnan Could we use the SerializeToString/ParseFromString methods for protobuf messages and then split and stream as strings?

@dnwillia-work This is for the issue reported by Gitesh (in Solver API teams channel) as the latest version of Fluent's solver API is failing due to message size limit. I have here replicated the C++ code for workspace clients added for the same issue.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, I must have missed that.

@mkundu1 mkundu1 merged commit 60f7120 into main Apr 29, 2022
@mkundu1 mkundu1 deleted the feat/max-message-length branch April 29, 2022 09:51
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

Successfully merging this pull request may close these issues.

4 participants