GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Have someone from Google review the Cloud Storage implementation · Issue #46 · googleapis/google-cloud-java

Have someone from Google review the Cloud Storage implementation #46

New issue
Copy link
New issue
Copy link
Closed
Closed
Have someone from Google review the Cloud Storage implementation#46
Copy link
Assignees
aozarov
Labels
🚨 criticalP0 critical issue. Requires immediate fixapi: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Description

@jgeewax
jgeewax
opened on May 8, 2015
Issue body actions

Tracking bug for getting a review and feedback from someone on the Cloud Storage team @ Google.

Activity

Next
  1. jgeewax
    added
    api: storageIssues related to the Cloud Storage API.
    on May 8, 2015
  2. jgeewax
    added this to the This milestone has been deleted milestone on May 8, 2015
  3. Capstan
    self-assigned this
    on May 8, 2015
  4. jboynes commented on May 10, 2015

    @jboynes
    jboynes
    on May 10, 2015
    More actions

    The semantics of this API look very similar to functionality provided the NIO2 java.nio.file API. Rather than invent an alternative we could use the existing idioms:

    StorageService -> FileSystemProvider
    Bucket -> FileSystem
    StorageObject -> Path
    Input/OutputChannel -> FileChannel, SeekableByteChannel et al.
    Acl -> FileAttribute, AclEntry

    Basic usage example:

    URI bucketId = URI.create("gcs://.../my-bucket");
    try (FileSystem myBucket = FileSystems.newFileSystem(bucketId, null)) {
        Path someFile = myBucket.getPath("/path/to/someFile.txt");
        Files.copy(someFile, System.out);
    }
  5. Capstan commented on May 10, 2015

    @Capstan
    Capstan
    on May 10, 2015
    Contributor
    More actions

    That has merit, and some prior art. GCS has some limitations in that there's no real directory structure, just naming conventions. Between that and the eventual consistency of the object index, you end up with unfortunate behavior around trying to delete "directories". It might be a better match to have the StorageService be both the FileSystemProvider and FileSystem, and the Buckets be the root directories, and then disallow directory creation underneath. On the other hand, that tends to break FileSystem consumers' expectations, so we'll be breaking expectations either way. Are FileSystems allowed to operate in a "mode" so the consumer can choose which style they want?

    Another issue is that the gcs pseudo-URI has never been documented, and is missing some specific disambiguation about specifying object generations when the object name itself looks like it is ending in a generation, e.g., "objectname#1234". This can likely be addressed, though unclear whether or not in a backwards-compatible manner with ad hoc gcs parser/generators.

  6. jboynes commented on May 10, 2015

    @jboynes
    jboynes
    on May 10, 2015
    More actions

    The key would be to make the primary user-facing interface through Path and Files intuitive. There's precedent for directory and root behaviour being a little quirky cf. ZipFS which may or may not have directory nodes or Windows with its drive letters. We would just need to document the quirks.

    Different modes can be configured when a FileSystem is created but I think using that to determine how buckets manifest would run into issues with resolving URIs cf. the issues in Windows in URIs for local and UNC paths. Probably doable but possibly confusing e.g. why on Windows does "file:///C:/foo.txt" work but "file://localhost/C:/foo.txt" not.

    I actually pulled "gcs:" out of a hat - I had no idea it was a real thing. "gs:" for compatibility with gsutil is another option. IIRC the syntax there is "gs://bucket/path/to/someFile.txt" making bucket the authority and not part of the path. That seems more like a FileSystem identifier than a root directory.

    I don't see the ambiguity with generations as I would expect path segment "object#1234" to be encoded to "object%231234" as "1234" is not a fragment identifier. The set of generations for an object could be retrieved using a custom FileAttribute and FileAttributeView.

  7. aozarov commented on May 10, 2015

    @aozarov
    aozarov
    on May 10, 2015
    Contributor
    More actions

    The idea of using Java 7 nio.file for accessing Google Cloud Storage was considered but rejected as not all GCS functionality (e.g. composite), behaviour (e.g. delimiter treatment, file names,..) and ACLs could be fully expressed or mapped. The goal for gcloud-java is to express (or to be able to express) all functionality of the service in an easier to use and idiomatic way and to allow possible higher level libraries (such as java 7 FileSystem) to use it and pick and choose what to expose. In fact, we already have such an effort in place and we are in the process of migrating it to use glcoud-java (now it is based on appengine_gcs_client) and finding it a new home (we were thinking of gcloud-java-contrib but this is still open).

  8. jgeewax commented on May 14, 2015

    @jgeewax
    jgeewax
    on May 14, 2015
    Author
    More actions

    Just wanted to jump in and clarify the ultimate goal of gcloud-java (and all the gcloud-* libraries in general):

    If you are a developer, the gcloud- library should make it easy to do the common tasks for all of our cloud services (for storage, this would be things like ... save a blob, download a blob, generate a signed URL for a blob, etc). It should not provide extremely high-level complex functionality (ie, gcloud-* for Datastore should not provide a full ORM), but the scope is still quite broad.

    Using Storage as a reference point here:

    We should be able to get a "read stream" on a blob (here is where NodeJS does this: https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/lib/storage/file.js#L390, in S3 in Java we use an InputStream http://docs.aws.amazon.com/AmazonS3/latest/dev/RetrievingObjectUsingJava.html), however we might not expose an complex abstraction that makes GCS look and act like a full file system.

    It's a tough balance to strike, however when in doubt we should err on the side of a whether a typical user would want to do this to accomplish a task -- using AWS as a reference point (primarily because they've set a precedent on what developers have come to expect from cloud client libraries).

  9. aozarov commented on May 14, 2015

    @aozarov
    aozarov
    on May 14, 2015
    Contributor
    More actions

    I agree, and for that reason I didn't based the storage API on nio.file (even though I think it is nice and should be part of a contrib library that we provide). gcloud-java does provide a way to read a stream from blob via reader(bucket, blobName, options...) that returns a standard readable Java Channel (which could be converted to other types of streams via a standard utility).

  10. jgeewax
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Jun 1, 2015
  11. aozarov commented on Oct 29, 2015

    @aozarov
    aozarov
    on Oct 29, 2015
    Contributor
    More actions

    @Capstan issue #14 is only blocked on #306 but I think that one should be considered as a bug-fix and therefore I think the API is ready for its final review.

    /cc @BrandonY @mfschwartz

  12. aozarov commented on Nov 12, 2015

    @aozarov
    aozarov
    on Nov 12, 2015
    Contributor
    More actions

    Review was completed.
    Here are the issues that were raised:

    blockers:
    #363 - We should include generation as part of the BlobId
    #359 - BlobReadChannel should fail if content comes from different generations
    #354 - Replace BucketInfo.StorageClass and BucketInfo.Location classes with plain string
    #351 - We should better document the Storage API

    non-blockers:
    #353 - Add an option for crc32/md5 client side validation for Storage.readAllBytes
    #365 - Limit rpc batch delete calls to ~100
    #364 - Consider other options for Batch requests

  13. 24 remaining items

  14. github-actions
    added 3 commits that reference this issue on Oct 4, 2022

    chore(main): release 0.2.3 (#55)

    5a6bae9

    chore(main): release 0.1.3 (#30)

    e494c0d

    chore(deps): update dependency com.google.cloud:google-cloud-apikeys …

    1013a7c
  15. github-actions
    added a commit that references this issue on Nov 9, 2022

    deps: update dependency com.google.api.grpc:proto-google-cloud-beyond…

    643927c
  16. chingor13
    added a commit that references this issue on Jan 22, 2026

    fix: flakey ITDatastoreTest#testSkippedResults (#46)

    3035ef2
  17. chingor13
    added a commit that references this issue on Feb 24, 2026

    Merge pull request #46 from pongad/master

    b990e71
  18. chingor13
    added a commit that references this issue on Mar 12, 2026

    Merge pull request #46 from pongad/master

    b476ace
  19. suztomo
    added 3 commits that reference this issue on Mar 23, 2026

    deps: update dependency com.google.api-client:google-api-client-bom t…

    724eb41

    chore: update common templates

    394b50c

    chore: release 1.14.0 (googleapis#82)

    2f3b7c0
  20. meltsufin
    added 4 commits that reference this issue on Apr 29, 2026

    Pubsub ordering keys (#5624)

    fe9c781

    chore(deps): update dependency junit:junit to v4.13 (#46)

    d1e4a04

    Pubsub ordering keys (#5624)

    511ee71

    chore(deps): update dependency junit:junit to v4.13 (#46)

    deece36
  21. benjaminp
    added a commit that references this issue on Jul 13, 2026

    fix: handle recovery failures during stream reframing failure (google…

    ceec872
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @aozarov
    aozarov

Labels

🚨 criticalP0 critical issue. Requires immediate fixapi: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.