Dmytro Plekhotkin
Dmytro Plekhotkin

Reputation: 1993

What library to use to access Google Cloud Storage using Java?

There two libraries that Google suggests to use to access Storage: appengine-gcs-client(described here) or google-cloud-storage(described here).

So maven dependency could be:

<dependency>
    <groupId>com.google.appengine.tools</groupId>
    <artifactId>appengine-gcs-client</artifactId>
    <version>0.7</version>
</dependency>

or

<dependency>
  <groupId>com.google.cloud</groupId>
  <artifactId>google-cloud-storage</artifactId>
  <version>1.14.0</version>
</dependency>

Can someone explain what is a difference between these libraries and what library should be used in 2018?

Upvotes: 0

Views: 208

Answers (2)

Brandon Yarbrough
Brandon Yarbrough

Reputation: 38369

You should prefer google-cloud-storage. The other library is significantly older and was designed to help with situations that might arise on app engine that the older clients didn't handle as well, such as the need to serialize an ongoing upload or download and resume it later. The google-cloud-storage Java library is the current best option, and it solves those cases just as well.

Upvotes: 2

OhadR
OhadR

Reputation: 8839

the "google-cloud-storage" seems to be much more "alive":

[google-cloud-storage google-cloud-storage

appengine-gcs-client appengine-gcs-client

Upvotes: 1

Related Questions