5 ms·
This is pretty cool. How would you start using MimicDB with an existing S3 bucket?
by mmelin 13y ago
This is pretty cool. How would you start using MimicDB with an existing S3 bucket?
- film42 13y agoIt sounds like it provides a nice s3 cache system for your backend. That is, it matches every s3 call to be a simple drop in request replacement powered by redis for caching. Disclaimer: I'm tired and may have read it wrong.
- gpsarakis 13y agoIt says that it only stores metadata locally not objects themselves (although it could probably have an option for that too and serve as a general S3 cache). Nice effort, Redis is perfectly fine but I believe that the storage layer should be somehow more separated in case someone wants another type of storage, e.g. in-memory SQLite is adequate and already installed in most systems.
- film42 13y agoI agree about with you about a replacement for redis. Maybe it's only me, but I seem to be relying too much on redis for simple things. I feel that soon enough I'll need 4 independent redis servers for my production environment. That's of course tongue-in-cheek, but there's a degree of seriousness.
- nathancahill 13y agoGood idea. Maybe in the future it will support different backend databases. For now, Redis is perfect.
- mmelin 13y agoYes, I think that's the gist of it. It looks like it assumes it has seen every call to the bucket it's working on though. So to start using it with an existing bucket, you'd have to warm up the Redis cache by downloading all metadata from the bucket?
- alcari 13y agoIt looks like a drop-in replacement for boto's S3 interface, so if you're already using that, you can probably just change the imports to refer to MimicDB.
- kawsper 13y agoI think it is a proxy for S3 that sits between your application and S3. So it works with Boto, or your favorite S3 library.
- nathancahill 13y agoExactly. If you're using boto.s3.connection or boto.s3.bucket you can change that to mimicdb.s3.connection and mimicdb.s3.bucket.
- nathancahill 13y agoYou can call the .sync() function on an S3Connection or a Bucket object. The MimicDB instance is populated with the current data on S3. Also, syncing is stateless, so you can call it anytime to insure consistency.