GithubHelp home page GithubHelp logo

Implement deletion by prefix API about uplink HOT 6 OPEN

storj avatar storj commented on July 24, 2024
Implement deletion by prefix API

from uplink.

Comments (6)

egonelbre avatar egonelbre commented on July 24, 2024

Is this deletion by prefix or multiple objects.

For deletion by prefix we can implement a separate func, however, for deleting multiple objects we may want to consider a batching API that also supports renames, deletes, downloads etc.

from uplink.

mniewrzal avatar mniewrzal commented on July 24, 2024

I don't remember exactly for which functionality we added this TODO point while doing MPU API. I agree with what you wrote also I don't plan to work on this actively until we will have real use cases e.g. performance issues.

from uplink.

egonelbre avatar egonelbre commented on July 24, 2024

Given storj/storj#4256, I think delete by prefix is a reasonable feature.

from uplink.

mniewrzal avatar mniewrzal commented on July 24, 2024

Sounds good. I changed the title to reflect intention.

from uplink.

kaloyan-raev avatar kaloyan-raev commented on July 24, 2024

Such an API would help in a few use cases:

  • Implement rclone purge.
  • Improve uplink rm --recursive. Currently, it lists the prefix and deletes the object one by one.
  • Any app that emulates folders with prefixes.

from uplink.

egonelbre avatar egonelbre commented on July 24, 2024

One thing to consider is that we probably want to give feedback to the caller on the progress. Otherwise, it might seem like the API call has gotten stuck.

There are two approaches that come to mind:

A. Add DeleteByPrefix with a Limit. The Limit (e.g. max 1000) is enforced by the satellite, and it will respond with the number of deleted objects. This has the added benefit that there's some uplink rate limiting happening for the calls.

B. Add streaming rpc DeleteByPrefix which every N deletes sends an update to the satellite.

from uplink.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.