by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Asif Iqbal
    @asif31iqbal
    no unfortunately it's not public
    it's a private project in BitBucket
    Sergei Ivanov
    @sergei-ivanov
    also, go through the documentation, there are some usage examples there
    fair enough
    Asif Iqbal
    @asif31iqbal
    ok
    can i ask the other question
    Sergei Ivanov
    @sergei-ivanov
    and gRPC people have provided some configuration examples too
    sure
    Asif Iqbal
    @asif31iqbal
    in grpc...
    I have benn able to set up the server and client and pass messages betwen them
    one thing I was curious though
    is the maximum number of simultaneous connections the server can accept
    because my server will be doing some heavily loaded multi-threaded work inside itself...so the number of simultaneous connections matters
    like...
    if I am running the server on a 32-thread machine
    and the number of simultaneoous connections is 4
    it makes sense to give each client request a thread pool of size 8 or so
    Sergei Ivanov
    @sergei-ivanov
    I believe that gRPC runs on the back of Netty, and you should look into Netty's documentation
    Asif Iqbal
    @asif31iqbal
    oh thanks
    Sergei Ivanov
    @sergei-ivanov
    and don't forget that the JVM, and Netty, need to use CPU too
    because Netty uses async I/O
    Asif Iqbal
    @asif31iqbal
    hmm
    Sergei Ivanov
    @sergei-ivanov
    but I am afraid I cannot give you a good gRPC/Netty tuning advice
    Asif Iqbal
    @asif31iqbal
    no no
    I think that was good
    Sergei Ivanov
    @sergei-ivanov
    good luck with your project!
    Asif Iqbal
    @asif31iqbal
    thanks
    PG
    @pgeorge26
    hi folks
    it looks like the plugin can't find protobuf 3.1.0 executable for osx-x86_64
    Error while executing process. Cannot run program "com.google.protobuf:protoc:3.1.0:exe:osx-x86_64": error=2, No such file or directory -> [Help 1]
    Sergei Ivanov
    @sergei-ivanov
    @pradeepg26 this is strange, because I can see it in Maven Central
    can you provide a bit more context to the error?
    magick93
    @magick93
    Hello, I am trying to generate java classes using the protobuf-maven-plugin. I can generate classes, however there is only <type>OuterClasse.java generated. No service classes are generated. Any idea why this is?
    Fabien Hermenier
    @fhermeni
    Hello. When I use protobuf:compile it generates the code of all but my service. When I use protobuf:compile-custom, it generates only the code of my service. So a lot of code is missing
    Got it, it is because the output directory where the same. Using <clearOutputDirectory>false</clearOutputDirectory>solved the problem
    uruloki85
    @uruloki85

    Hi! I'm trying to compile 4 proto files located in 3 different projects, A.proto & B.proto in project1, C.proto in project2 and D.proto in project3. A depends on C and D.

                <plugin>
                    <groupId>org.xolstice.maven.plugins</groupId>
                    <artifactId>protobuf-maven-plugin</artifactId>
                    <configuration>
                        <protocArtifact>com.google.protobuf:protoc:${proto.version}:exe:${os.detected.classifier}</protocArtifact>
                        <includes>
                            <include>../project2/src/main/proto/subfolder/*.proto</include>
                            <include>../project3/*.proto</include>
                            <include>src/main/proto/subfolder/*.proto</include>
                            <!-- <include>**/*.proto</include> -->
                        </includes>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>compile</goal>
                                <goal>compile-python</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

    When I run maven it says "No proto files to compile.". If I uncomment <include>**/*.proto</include> then it complains about missing types (those defined in project2 and project3). I cannot find in the documentation any example or further information.

    uruloki85
    @uruloki85
    @sergei-ivanov any help? I'd like to use relative paths to project2 and project3 (that's what I tried with ../project, going one level up and then entering in the project2 folder)
    uruloki85
    @uruloki85
    fyi, I finally changed to a different plugin https://github.com/os72/protoc-jar-maven-plugin which very easily allowed me to do what I need
    cliveseldon
    @cliveseldon
    Is there any example of how to find proto files in included jar dependencies of ones project?
    Sergei Ivanov
    @sergei-ivanov
    @uruloki85 sorry, I missed your message, gitter stopped sending notifications for some reason
    dependencies are handled in the standard maven way
    i.e. your project compiles protos into java and then into class files, then the source protos are packaged into the resulting jar file as resources
    the dependent project downloads the dependency jar with packaged protos, unpacks them and uses them as imports
    include/exclude patterns are relative to the proto source directory and allow you to compile only specific proto files
    Sergei Ivanov
    @sergei-ivanov
    so normally you should not try to reference proto files outside of your module directory (i.e. via ../project2/...)
    you don't do it with java, because it goes against maven conventions, and the same principle applies to protos
    the plugin handles dependencies automatically for you
    @cliveseldon that probably answers your question too