Coder Social home page Coder Social logo

ronen / defog Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 0.0 81 KB

Wrapper to fog gem, proxying access to cloud files as local files. Access can be read-only (local cache), write-only (upload), or read-write (mirror)

License: MIT License

Ruby 100.00%

defog's People

Contributors

bitdeli-chef avatar ronen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

defog's Issues

passthrough mode for :local

It would be nice to have some sort of :passthrough => true option to Defog::Proxy.new(:provider => :local, ...) which would disable caching and proxying and directly serve up the actual files.

Rationale:

The current situation is that :local goes through the same caching mechanism as :AWS. This makes sense in particular for the common (i think) case that :local is being used in development as a standin for :AWS that is used production -- in this way development mimics the production behavior as closely as possible, and supports cache & synchronization manipulation.

But I've got a case where code that uses the Defog API to do some file processing on files stored in :AWS -- and it turns out in production i also want to occasionally do the same processing on files that originate on the client and aren't in AWS. Easy enough to do that by creating a Defog::Proxy using :local and it works fine -- except that it wastes time and space by making a proxy copy of each file and then synchronizing back. Would be nice to be able to skip proxying and act on the files directly.

Notes:

The :passthrough option would only make sense for :local. When enabled, things like :synchronize => false wouldn't make sense. (Ignore them? Warn? Error?) Also, without :passthrough, deleting the proxy file is equivalent to :synchronize => false, but if :passthrough were true deleting the "proxy" would really delete. This makes me think that without :passthrough, deleting a proxy file should instead either raise an error, or delete the remote file.

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.