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
    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
    if you go into the github repository for maven plugin, there are lots of examples under src/it that demonstrate dependency handling and other features
    Sergei Ivanov
    @sergei-ivanov
    the only possible caveat is packages: protobuf compiler can be quite picky about these when importing, so please make sure that you have a directory structure under src/main/proto that reflects package declarations in your protos
    for example, if you have package com.acme in your proto file, it must be placed inside src/main/proto/com/acme subdirectory, otherwise you are going to have a lot of trouble with unresolved imports
    uruloki85
    @uruloki85
    many thanks @sergei-ivanov , it makes totally sense but my requirements forced me to do that (reference proto files outside my project)
    Sergei Ivanov
    @sergei-ivanov
    Are your other projects maven projects too?
    uruloki85
    @uruloki85
    Nope, they aren't. They are just 2 proto files designed by other people.
    Sergei Ivanov
    @sergei-ivanov
    But when you refer to ../project2/src/main/proto it looks like another maven project
    uruloki85
    @uruloki85
    But it isn't
    Sergei Ivanov
    @sergei-ivanov
    Ok, looks like it only pretends to be one then :)
    Duke Jake Morgan
    @TheMasteredPanda
    Anyone available to tend to my problem? xolstice/protobuf-maven-plugin#38
    Thanks in advance.
    Sergei Ivanov
    @sergei-ivanov
    I answered there
    bkuhhirte
    @bkuhhirte
    I just started using this plugin and curious if anyone else has tried to use it in conjunction protoc-gen-swagger?
    In other words, as I generate my stubs and unravel the dependent .proto files from other JARs, can I generate the swagger.json without going back to the CLI?
    Sergei Ivanov
    @sergei-ivanov
    Can you please provide any links or examples?