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

Remove GRPC and move to http using kestrel #1137

Merged
merged 6 commits into from
Jan 24, 2024
Merged

Remove GRPC and move to http using kestrel #1137

merged 6 commits into from
Jan 24, 2024

Conversation

belav
Copy link
Owner

@belav belav commented Jan 19, 2024

Nuget package went from 18mb to 70mb when the gRPC packages were included. This is 20mb as a package.

This should accomplish the same thing without all the bloat and the code is mostly the same.

@belav belav marked this pull request as ready for review January 19, 2024 21:19
shocklateboy92
shocklateboy92 previously approved these changes Jan 22, 2024
Copy link
Collaborator

@shocklateboy92 shocklateboy92 left a comment

Choose a reason for hiding this comment

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

So, does that mean you stopped using protocol buffers, but still use the .proto files to generate models across languages? If so, OpenAPI (formally swagger) might be alternative to consider.

.ConfigureKestrel(
(_, serverOptions) =>
{
serverOptions.Listen(IPAddress.Any, thePort);
Copy link
Collaborator

Choose a reason for hiding this comment

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

So, you can actually use unix sockets (Linux, possibly Mac) and named pipes (Windows) to avoid having to chose a port.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That will make it much easier if you ever plan on having multiple editors share an instance of csharpier.

Copy link
Owner Author

Choose a reason for hiding this comment

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

The proto models are no longer needed, I probably forgot to delete them.

I took a look at both a bit. One concern was windows/linux/mac + java/js/c# is a lot of combinations of things to figure out.

Also with named pipes/unix sockets, I assume I still need to come up with a unique name for each instance of CSharpier that runs. If you are running rider with 0.27 and vscode with 0.27 right now that is two instances of csharpier. I assume they would be unhappy all trying to share the same socket/pipe.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. With UNIX sockets, you'd be using (probably):

"${XDG_RUNTIME_DIR}/csharpier/${version}.sock"

Which (in my machine) expanded to:

/run/user/1000/csharpier/0.27.2.sock

I'm not sure what the conventions are for windows named pipes, but I assume a similar thing is possible.

@belav belav merged commit da45e84 into main Jan 24, 2024
3 checks passed
@belav belav deleted the no-grpc branch January 24, 2024 00:05
@belav belav changed the title GRPC really bloated the nuget package, this accomplishes the same thing. Remove GRPC and move to http using kestrel Jan 24, 2024
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.

2 participants