ronen / defog Goto Github PK
View Code? Open in Web Editor NEWWrapper 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
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.