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

metadata caching #45

Closed
akiradeveloper opened this issue Feb 26, 2016 · 2 comments
Closed

metadata caching #45

akiradeveloper opened this issue Feb 26, 2016 · 2 comments

Comments

@akiradeveloper
Copy link
Owner

akashic-storage saves various metadata such as acl, location, ... and they are files serialized by scala-pikcle library.

On each request, they are read from filesystem (hopefully it's cached in the backend) and deserialized or unpickled. They are really heavy because 1) IO goes out of JVM through the native operating system, so the run path is long 2) deserialization is, needless to say, heavy.

Fortunately, everything in akashic-storage is immutable and we can safely cache them.

One of my idea is to use guava caching but I don't believe it's scala-ish. I am looking for a nice library or a way to implement my own nicer one.

@akiradeveloper
Copy link
Owner Author

At the present my thought on this feature is negative because there is no way to safely cache object given that the distributed system is under the abstraction.
If BasicFileAttributes#fileKey guarantees its uniqueness along the time it can be a good choice for the key for the lookup table but the reality is that it is implementation dependent.

I should keep akashic-storage versatile. So there is no solution until now.

@akiradeveloper
Copy link
Owner Author

implemented and documented

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

No branches or pull requests

1 participant