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

Dependency Count #1271

Closed
cemo opened this issue Sep 20, 2016 · 3 comments
Closed

Dependency Count #1271

cemo opened this issue Sep 20, 2016 · 3 comments
Assignees

Comments

@cemo
Copy link

cemo commented Sep 20, 2016

I am considering this project as a default way to use google cloud with java. (Please correct me if I am wrong.)

I wanted to give a try Stackdriver Logging and for this purpose I added dependency google-cloud-logging:0.3.0 but I am a little bid shocked because it is transitively pulling more than 50 dependency. I believe that a foundation project like this should include as less as possible.

Here are the dependencies:

[INFO] \- com.google.cloud:google-cloud-logging:jar:0.3.0:compile
[INFO]    +- io.netty:netty-tcnative-boringssl-static:jar:1.1.33.Fork17:compile
[INFO]    +- com.google.cloud:google-cloud-core:jar:0.3.0:compile
[INFO]    |  +- com.google.auth:google-auth-library-credentials:jar:0.3.1:compile
[INFO]    |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.3.1:compile
[INFO]    |  |  \- com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile
[INFO]    |  |     \- com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile
[INFO]    |  +- com.google.http-client:google-http-client:jar:1.21.0:compile
[INFO]    |  |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO]    |  |  \- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO]    |  |     +- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
[INFO]    |  |     \- commons-codec:commons-codec:jar:1.10:compile
[INFO]    |  +- com.google.oauth-client:google-oauth-client:jar:1.21.0:compile
[INFO]    |  +- com.google.guava:guava:jar:19.0:compile
[INFO]    |  +- com.google.api-client:google-api-client-appengine:jar:1.21.0:compile
[INFO]    |  |  +- com.google.oauth-client:google-oauth-client-appengine:jar:1.21.0:compile
[INFO]    |  |  |  +- com.google.oauth-client:google-oauth-client-servlet:jar:1.21.0:compile
[INFO]    |  |  |  |  \- com.google.http-client:google-http-client-jdo:jar:1.21.0:compile
[INFO]    |  |  |  \- javax.servlet:servlet-api:jar:2.5:compile
[INFO]    |  |  +- com.google.api-client:google-api-client:jar:1.21.0:compile
[INFO]    |  |  +- com.google.api-client:google-api-client-servlet:jar:1.21.0:compile
[INFO]    |  |  |  \- javax.jdo:jdo2-api:jar:2.3-eb:compile
[INFO]    |  |  |     \- javax.transaction:transaction-api:jar:1.1:compile
[INFO]    |  |  \- com.google.http-client:google-http-client-appengine:jar:1.21.0:compile
[INFO]    |  +- com.google.http-client:google-http-client-jackson:jar:1.21.0:compile
[INFO]    |  |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO]    |  +- joda-time:joda-time:jar:2.9.4:compile
[INFO]    |  +- org.json:json:jar:20140107:compile
[INFO]    |  +- com.google.protobuf:protobuf-java:jar:3.0.0-beta-3:compile
[INFO]    |  +- com.google.api:gax:jar:0.0.16:compile
[INFO]    |  |  \- com.google.inject:guice:jar:4.0:compile
[INFO]    |  |     +- javax.inject:javax.inject:jar:1:compile
[INFO]    |  |     \- aopalliance:aopalliance:jar:1.0:compile
[INFO]    |  \- com.google.api.grpc:grpc-google-common-protos:jar:0.0.7:compile
[INFO]    +- com.google.api.grpc:grpc-google-logging-v2:jar:0.0.7:compile
[INFO]    +- io.grpc:grpc-all:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-auth:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-netty:jar:0.15.0:compile
[INFO]    |  |  \- io.netty:netty-codec-http2:jar:4.1.1.Final:compile (version selected from constraint [4.1.1.Final,4.1.1.Final])
[INFO]    |  |     +- io.netty:netty-codec-http:jar:4.1.1.Final:compile
[INFO]    |  |     |  \- io.netty:netty-codec:jar:4.1.1.Final:compile
[INFO]    |  |     \- io.netty:netty-handler:jar:4.1.1.Final:compile
[INFO]    |  |        +- io.netty:netty-buffer:jar:4.1.1.Final:compile
[INFO]    |  |        |  \- io.netty:netty-common:jar:4.1.1.Final:compile
[INFO]    |  |        \- io.netty:netty-transport:jar:4.1.1.Final:compile
[INFO]    |  |           \- io.netty:netty-resolver:jar:4.1.1.Final:compile
[INFO]    |  +- io.grpc:grpc-okhttp:jar:0.15.0:compile
[INFO]    |  |  +- com.squareup.okio:okio:jar:1.6.0:compile
[INFO]    |  |  \- com.squareup.okhttp:okhttp:jar:2.5.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf-nano:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf.nano:protobuf-javanano:jar:3.0.0-alpha-5:compile
[INFO]    |  +- io.grpc:grpc-stub:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf:protobuf-java-util:jar:3.0.0-beta-3:compile
[INFO]    |  |     \- com.google.code.gson:gson:jar:2.7:compile
[INFO]    |  +- io.grpc:grpc-protobuf-lite:jar:0.15.0:compile
[INFO]    |  \- io.grpc:grpc-core:jar:0.15.0:compile (version selected from constraint [0.15.0,0.15.0])
[INFO]    \- com.google.auto.value:auto-value:jar:1.1:compile

If I counted right, there is 56 dependency for just transporting logging statements.

Would you consider decreasing dependencies?

@mziccard
Copy link
Contributor

Hi @cemo. Thanks for your interest in google-cloud-java.

First off, it would be nice if you could clarify what you mean with "foundation project". At present time google-cloud-java supports several services, some of which have JSON APIs on top of HTTP, while some others (as logging) use protos and gRPC.

Among the dependencies you list, 31 alone are needed to make gRPC and protos work:

[INFO]    +- io.netty:netty-tcnative-boringssl-static:jar:1.1.33.Fork17:compile
[INFO]    |  +- com.google.protobuf:protobuf-java:jar:3.0.0-beta-3:compile
[INFO]    |  +- com.google.api:gax:jar:0.0.16:compile
[INFO]    |  |  \- com.google.inject:guice:jar:4.0:compile
[INFO]    |  |     +- javax.inject:javax.inject:jar:1:compile
[INFO]    |  |     \- aopalliance:aopalliance:jar:1.0:compile
[INFO]    |  \- com.google.api.grpc:grpc-google-common-protos:jar:0.0.7:compile
[INFO]    +- com.google.api.grpc:grpc-google-logging-v2:jar:0.0.7:compile
[INFO]    +- io.grpc:grpc-all:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-auth:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-netty:jar:0.15.0:compile
[INFO]    |  |  \- io.netty:netty-codec-http2:jar:4.1.1.Final:compile (version selected from constraint [4.1.1.Final,4.1.1.Final])
[INFO]    |  |     +- io.netty:netty-codec-http:jar:4.1.1.Final:compile
[INFO]    |  |     |  \- io.netty:netty-codec:jar:4.1.1.Final:compile
[INFO]    |  |     \- io.netty:netty-handler:jar:4.1.1.Final:compile
[INFO]    |  |        +- io.netty:netty-buffer:jar:4.1.1.Final:compile
[INFO]    |  |        |  \- io.netty:netty-common:jar:4.1.1.Final:compile
[INFO]    |  |        \- io.netty:netty-transport:jar:4.1.1.Final:compile
[INFO]    |  |           \- io.netty:netty-resolver:jar:4.1.1.Final:compile
[INFO]    |  +- io.grpc:grpc-okhttp:jar:0.15.0:compile
[INFO]    |  |  +- com.squareup.okio:okio:jar:1.6.0:compile
[INFO]    |  |  \- com.squareup.okhttp:okhttp:jar:2.5.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf-nano:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf.nano:protobuf-javanano:jar:3.0.0-alpha-5:compile
[INFO]    |  +- io.grpc:grpc-stub:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf:protobuf-java-util:jar:3.0.0-beta-3:compile
[INFO]    |  |     \- com.google.code.gson:gson:jar:2.7:compile
[INFO]    |  +- io.grpc:grpc-protobuf-lite:jar:0.15.0:compile
[INFO]    |  \- io.grpc:grpc-core:jar:0.15.0:compile (version selected from constraint [0.15.0,0.15.0])
[INFO]    \- com.google.auto.value:auto-value:jar:1.1:compile

Then you have 10 dependencies that provide credentials support across different platforms:

[INFO]    |  +- com.google.auth:google-auth-library-credentials:jar:0.3.1:compile
[INFO]    |  +- com.google.auth:google-auth-library-oauth2-http:jar:0.3.1:compile
[INFO]    |  |  \- com.google.http-client:google-http-client-jackson2:jar:1.19.0:compile
[INFO]    |  |     \- com.fasterxml.jackson.core:jackson-core:jar:2.8.1:compile
[INFO]    |  +- com.google.http-client:google-http-client:jar:1.21.0:compile
[INFO]    |  |  +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO]    |  |  \- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO]    |  |     +- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
[INFO]    |  |     \- commons-codec:commons-codec:jar:1.10:compile
[INFO]    |  +- com.google.oauth-client:google-oauth-client:jar:1.21.0:compile

You can have a look at the project here.

I don't see any dependency we can get rid of. And believe that the amount of dependencies we have is not so big considering we are supporting two different transports at the moment.

@cemo
Copy link
Author

cemo commented Sep 21, 2016

Thanks for information @mziccard. By means of foundation I wanted to say that google cloud is a core function for many people.

Can I remove gRPC dependency If I will only use JSON?

@mziccard
Copy link
Contributor

If you need google-cloud-logging you cannot get rid of gRPC dependencies as google-cloud-logging module runs on top of gRPC. For all non-gRPC services (i.e. Storage) most of gRPC-related dependencies won't be included, namely:

[INFO]    +- io.netty:netty-tcnative-boringssl-static:jar:1.1.33.Fork17:compile
[INFO]    +- com.google.api.grpc:grpc-google-logging-v2:jar:0.0.7:compile
[INFO]    +- io.grpc:grpc-all:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-auth:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-netty:jar:0.15.0:compile
[INFO]    |  |  \- io.netty:netty-codec-http2:jar:4.1.1.Final:compile (version selected from constraint [4.1.1.Final,4.1.1.Final])
[INFO]    |  |     +- io.netty:netty-codec-http:jar:4.1.1.Final:compile
[INFO]    |  |     |  \- io.netty:netty-codec:jar:4.1.1.Final:compile
[INFO]    |  |     \- io.netty:netty-handler:jar:4.1.1.Final:compile
[INFO]    |  |        +- io.netty:netty-buffer:jar:4.1.1.Final:compile
[INFO]    |  |        |  \- io.netty:netty-common:jar:4.1.1.Final:compile
[INFO]    |  |        \- io.netty:netty-transport:jar:4.1.1.Final:compile
[INFO]    |  |           \- io.netty:netty-resolver:jar:4.1.1.Final:compile
[INFO]    |  +- io.grpc:grpc-okhttp:jar:0.15.0:compile
[INFO]    |  |  +- com.squareup.okio:okio:jar:1.6.0:compile
[INFO]    |  |  \- com.squareup.okhttp:okhttp:jar:2.5.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf-nano:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf.nano:protobuf-javanano:jar:3.0.0-alpha-5:compile
[INFO]    |  +- io.grpc:grpc-stub:jar:0.15.0:compile
[INFO]    |  +- io.grpc:grpc-protobuf:jar:0.15.0:compile
[INFO]    |  |  \- com.google.protobuf:protobuf-java-util:jar:3.0.0-beta-3:compile
[INFO]    |  |     \- com.google.code.gson:gson:jar:2.7:compile
[INFO]    |  +- io.grpc:grpc-protobuf-lite:jar:0.15.0:compile
[INFO]    |  \- io.grpc:grpc-core:jar:0.15.0:compile (version selected from constraint [0.15.0,0.15.0])

@cemo cemo closed this as completed Sep 21, 2016
github-actions bot pushed a commit that referenced this issue Oct 5, 2022
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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

2 participants