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

Is the README outdated? #10

Open
tuddman opened this issue Apr 18, 2020 · 5 comments
Open

Is the README outdated? #10

tuddman opened this issue Apr 18, 2020 · 5 comments

Comments

@tuddman
Copy link

tuddman commented Apr 18, 2020

Hello, and thank you for forging ahead with making clojure work with gRPC.

I tried to follow the steps outlined in this templated README, and got successfully all the way up to the running server with lein run and then, while the server is running, and can successfully call the pedestal /about page in a browser, attempting to open another terminal window and run lein repl seems to have hit a snag finding the Greeter :

example-grpc.server=> (use 'com.example.addressbook.Greeter)
Execution error (FileNotFoundException) at example-grpc.server/eval14489 (form-init619234573165394063.clj:1).
Could not locate com/example/addressbook/Greeter__init.class, com/example/addressbook/Greeter.clj or com/example/addressbook/Greeter.cljc on classpath.
example-grpc.server=> (use 'protojure.grpc.client.providers.http2)
nil
example-grpc.server=> @(call-Hello @(connect {:uri (str "http://localhost:" 8080)}) {:name "John Doe"})
Syntax error compiling at (/tmp/form-init3839680410152403001.clj:1:2).
Unable to resolve symbol: call-Hello in this context

I see that in service.clj that com.example.addressbook.Greeter.server and com.example.addressbook can load fine as :require'd dependencies, but seemingly not com.example.addressbook.Greeter from the repl.

I updated protojure to 1.5.1 and retried everything, without any change in outcome.

Also see (Hello ...) and not any reference to (call-Hello ...) which causes the second repl error.

Is it simply a matter of updating the lein template or is there something else I'm missing? Any guidance is appreciated in getting to a working hello-world gRPC server in clojure! Thanks!

@tuddman
Copy link
Author

tuddman commented Apr 18, 2020

Follow up: I was able to make it further from reading & following https://protojure.github.io/

If anyone else finds this, follow the website rather than the lein-template README to get up and running.

@tuddman tuddman closed this as completed Apr 18, 2020
@Rkiouak Rkiouak reopened this Apr 18, 2020
@Rkiouak
Copy link
Member

Rkiouak commented Apr 18, 2020

Hi @tuddman, thanks for the report on your experience using the template and README. The template is overdue for an update, so im going to keep this open until we've addressed that.

Please dont hesitate to reach out with other questions.

@tuddman
Copy link
Author

tuddman commented Apr 18, 2020

Hi @Rkiouak, Sure. One thing I've noticed more lately is how good a job other language's communities do in making the introductory experience to get something 'up and running' a good one. Whereas with lots of clojure libraries it's just "well its clojure, you can just figure it out, use it how you want and do what you want" which is good & bad, but I've now seen has frustrated and de-motivated otherwise bright developers from wanting to give clojure a try.

These people do need guidance, initially, on where to go. Let's make sure the guides we give them are good.

@tuddman
Copy link
Author

tuddman commented Apr 18, 2020

have you given any thought to using netty-http2 for the containing server, as opposed to pedestal? Reduce the dependencies.
e.g. as this person has done: https://blog.jmibanez.com/2018/07/22/grpc-with-clojure-and-leiningen.html

asked differently, was pedestal a deliberate design choice or was it simple a matter of having a convenient lein-template to model off of?

EDIT: I see now the use of pedestal interceptors as important components to lean on for handling grpc requests.

@ghaskins
Copy link
Member

@tuddman id say that protojure itself doesnt have an opinion, and could be adapted to work with other containers. However, as you noted, we have made an investment in making pedestal support first class. I would love to see other container options emerge, and agree that decoupling the pedestal dependencies from the main lib would need to happen to fully realize the benefit. I also agree with your assessment about the guide being important.

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

3 participants