GithubHelp home page GithubHelp logo

grpc-java-course's Introduction

Grpc Java Course

This is a companion repository for my GRPC Java course

course logo

Content

  • Greeting Service
  • Calculator Service
  • Unary, Server Streaming, Client Streaming, BiDi Streaming
  • Error Handling, Deadlines, SSL Encryption

grpc-java-course's People

Contributors

simplesteph avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

grpc-java-course's Issues

Java 11

/home/jr/Documents/Projetos/grpc-java-course/build/generated/source/proto/main/grpc/com/proto/blog/BlogServiceGrpc.java:20: error: cannot find symbol
@javax.annotation.Generated(
^
symbol: class Generated
location: package javax.annotation

Do you know why I'm getting this error?

Unnecessary try-catch instead of validation

Hello Stephane, I'm taking your course right now, and during it just found the approach you use, which in my opinion could be improved.
I understand that the course is not about "good practices" or "java coding", but since the students could refer to this code, it makes sense to use best practices.

In this case, ObjectId has a static method #isValid, and we can make this check (with returning INVALID_ARGUMENT status) instead of naive try-catch.

result = collection.find(eq("_id", new ObjectId(blogId)))

Wait until get all Blogs

There is a method, which returns stream response of Blog:

 public java.util.Iterator<com.proto.blog.ListBlogResponse> listBlog(
        com.proto.blog.ListBlogRequest request) {
      return blockingServerStreamingCall(
          getChannel(), getListBlogMethod(), getCallOptions(), request);
    }

To print each blog one be one:

        blogClient.listBlog(ListBlogRequest.newBuilder().build()).forEachRemaining(
                listBlogResponse -> System.out.println(listBlogResponse.getBlog().toString())
        );

But if it's needed on client to wait until getting all blogs and having it as com.proto.blog.ListBlogResponse, what's the best option to do?

@simplesteph , could you please help

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.