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

How can we stablize the client-server protocol? #1827

Closed
myzhan opened this issue Jul 28, 2021 · 7 comments
Closed

How can we stablize the client-server protocol? #1827

myzhan opened this issue Jul 28, 2021 · 7 comments
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it

Comments

@myzhan
Copy link
Contributor

myzhan commented Jul 28, 2021

Is your feature request related to a problem? Please describe.

I'm maintaining boomer and locust4j, which are written in other languages. After version check is added to the protocol, it's difficult for me to keep compatible with locust across all versions.

Related code: https://github.com/locustio/locust/blob/master/locust/runners.py#L871
Related issue: myzhan/boomer#126

Describe the solution you'd like

In locust 2.0.0, I'd like to use grpc instead of zeromq + msgpack. Then the protocol may be stablized in the protobuf file.

Describe alternatives you've considered

Additional context

@cyberw
Copy link
Collaborator

cyberw commented Jul 28, 2021

As long as you send some version number then there is only a warning in the master log (refusing pre 2.0 clients to connect is intentional, because they arent going to work anyway, because of the changes in spawning logic)

I would be ok with changing the behaviour so that if clients send -1 as their version number the master would just skip the version check.

I might be ok with switching to grpc if it has similar performance, but that would be another breaking change..

@myzhan
Copy link
Contributor Author

myzhan commented Jul 28, 2021

I'm planning to deprecate the support for 1.x versions and move forward to 2.x, in both boomer and locust4j.

I'm suggesting gRPC because it's easier to use more languages. For example, the data in message may be treated as string, or dict. It's easy to do that in Python, but not in Go or Java.

@cyberw
Copy link
Collaborator

cyberw commented Jul 28, 2021

gRPC makes sense (for the reasons you mentioned as well as more popularity), but it would probably mean another major release (3.0), and I'd want to give 2.0 lots of time "in the wild" before making another big change. At least 3-4 months.

@myzhan
Copy link
Contributor Author

myzhan commented Jul 28, 2021

Since we make a big change to message in 2.0, it's not easy to keep compatible with 1.x. I may add some workaround to work with both and wait for the change in 3.0.

@cyberw
Copy link
Collaborator

cyberw commented Jul 28, 2021

Ok! In case I wasnt being clear, I'm not going to write the code to switch to grpc, someone actually needing that (like you) would have to build it, and it would have to be tested thoroughly.

And again to clarify, the client-server protocol shouldnt change that often, and I'll definitely strive to keep it backwards-compatible when it does (this was not possible for 2.0)

cyberw added a commit that referenced this issue Jul 29, 2021
…est case for version checking. Helps a little with #1827
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@github-actions github-actions bot added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label Sep 27, 2021
@myzhan
Copy link
Contributor Author

myzhan commented Sep 27, 2021

@cyberw Hi, I'm still considering. I noticed that some users were using boomer for GRPC load test. If we introduce GRPC in locust, it may result in dependency conflict (e.g. , GRPC version)

@github-actions github-actions bot removed the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label Sep 28, 2021
@cyberw cyberw added the stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it label Nov 4, 2021
@cyberw cyberw closed this as completed Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request stale Issue had no activity. Might still be worth fixing, but dont expect someone else to fix it
Projects
None yet
Development

No branches or pull requests

2 participants