Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
haydnv
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
haydnv
5y ago
mmap does map file contents into memory but does not provide read-write locking. The main limitation is that a file is not necessarily the same thing as the Rust data structure that it encodes. For example, if you store a Rust Vec in a file
2.
▲
by
haydnv
5y ago
I realized based on several of the comments here that I should have included a comparison with OS filesystem caching in the documentation for freqfs. I will update this in the next release. The major advantage of freqfs over just letting th
3.
▲
by
haydnv
5y ago
I think if you call your precompression function in FileLoad::load it should do what you need--please file an issue if this is not the case: https://github.com/haydnv/freqfs/issues
4.
▲
by
haydnv
5y ago
I don't know that it's fair to say it's "doubling" the memory use of each file because the OS cache memory is still "free" from the perspective of an application. Where it comes in handy is an applications
5.
▲
by
haydnv
5y ago
Yeah I just learned about tokio-uring and I'm planning to get it into the next major release of freqfs
6.
▲
by
haydnv
5y ago
That's great! Please let me know how it goes! Feel free to file any bug reports or feature requests here: https://github.com/haydnv/freqfs/issues
7.
▲
by
haydnv
5y ago
It should work on Windows (because tokio::fs works on Windows) although I have not personally tested this
8.
▲
by
haydnv
5y ago
If there is any concurrent access to cached files not through freqfs, there is a risk of inconsistency and crashes.
9.
▲
by
haydnv
5y ago
It might be possible to replace freqfs with mmap on a POSIX OS, but a) you would still have to implement your own read-write lock, and b) you would (I think probably?) lose some consistency in behavior across different host operating system
10.
▲
by
haydnv
5y ago
One advantage is consistency across host platforms, but the main advantage is that the file data can be accessed (and mutated) in memory in a deserialized format. If you let the OS take care of it, you would still have the overhead of seria
11.
▲
Freqfs: In-memory filesystem cache for Rust
(docs.rs)
139 points
by
haydnv
5y ago
|
74 comments
12.
▲
Video tutorial: cross-service transactions and replication with Tinychain
(youtube.com)
1 points
by
haydnv
5y ago
|
0 comments
13.
▲
by
haydnv
5y ago
I think what's really interesting about this that most readers seem to overlook is the claims about subluminal warp drive, which is practically realizable in a way that the science-fictional faster-than-light case is not
14.
▲
Video tutorial: edge caching with Tinychain
(youtube.com)
1 points
by
haydnv
5y ago
|
0 comments
15.
▲
Tinychain releases v0.2 beta with support for blockchain and datbase tables
(github.com)
2 points
by
haydnv
5y ago
|
0 comments
16.
▲
Video tutorial: code a custom blockchain in under 30 seconds with Tinychain
(youtube.com)
3 points
by
haydnv
5y ago
|
0 comments
17.
▲
Tinychain, app host with automatic cross-service transactions, releases to beta
(github.com)
2 points
by
haydnv
6y ago
|
0 comments
18.
▲
Python client for Tinychain featuring automatic cross-service transactions
(pypi.org)
2 points
by
haydnv
6y ago
|
0 comments
19.
▲
Destream: A streaming, asynchronous version of Serde for Rust
(docs.rs)
2 points
by
haydnv
6y ago
|
0 comments