Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Flysystem in Filesystem driver #312

Open
Anahkiasen opened this issue Jul 16, 2016 · 4 comments
Open

Use Flysystem in Filesystem driver #312

Anahkiasen opened this issue Jul 16, 2016 · 4 comments

Comments

@Anahkiasen
Copy link

Currently the filesystem driver is limited to local filesystem, it would be nice if it used Flysystem underneath which would bring support for all the adapters the latter supports (Dropbox, SFTP, etc), has that been considered?

@thinkspill
Copy link

Wouldn't storing a cache on a remote filesystem add too much latency to cache operations?

@Anahkiasen
Copy link
Author

Not any more latency than using cache on a remote Redis instance or anything similar. Having a Flysystem driver would open the door for any of the drivers it supports, S3, Dropbox, Azure, etc.

@gggeek
Copy link
Contributor

gggeek commented Nov 13, 2017

I would not add any further layers to the Filesystem driver, but rather add a separate Flysystem driver.
The reason is simple:

  1. race conditions are hard enough to debug with plain FS semantics (have you ever tried swapping local disk for NFS for a cache drive?). Flysystem adds another layer on top of storage systems that have wildly inconsistent semantics
  2. even assuming that no race conditions or corner-case bugs are introduced, perfs would still suffer compared to the current driver

@Anahkiasen
Copy link
Author

Anahkiasen commented Nov 14, 2017

I'd be fine with it being a separate driver.
That being said you cannot make assumptions as to how people use cache, in the use case I needed this for there was only ever one user to interact with the cache at a time (as this was for a CLI app) and performance was not a concern. People use cache for a lot more things than just web applications. If I want to use Stash in a pet project to cache things on my DO instance or something, I should be able to. Cache is way too broad of a concept to make design decisions based on how you think it would be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants