utsaslab / rustfs Goto Github PK
View Code? Open in Web Editor NEWA Rust user-space file system [WIP]
License: Other
A Rust user-space file system [WIP]
License: Other
The cornerstone of the project is the SPDK library, which is a C library. However, all the rest of the projects are written in Rust. We need to create a Rust friendly API that wraps the details of C stuff under the hood. In the Rust world, we call such APIs are Foreign Functions Interface (FFI). However, how can we design and implement such API requires a fair amount of thoughts. We have written the basic code templates (see spdk-rs
directory) but most of the stuff is left for implementation.
A good starting point for this work item is our Design wiki page.
Zeyuan
-Config now has path hard coded, need to be able to somehow pass in value from say environment variables (may need to parse and replace in build.rs?)
-Rust seems cannot support both build.rs and config (need confirmation). We rely on the build.rs to generate bindings and we rely on config to compile and link libraries. Are there better solutions?
This issue is related to the problem where .cargo/config does not allow you to use any environmental variables (can use the few predefined ones).
https://doc.rust-lang.org/cargo/reference/environment-variables.html
https://rurust.github.io/cargo-docs-ru/environment-variables.html
It seems redundant to use the .cargo/config to set the rustflags =[ ...], when it is possible to set the RUSTFLAGS environmental variable directly (cargo reads this and uses this on compiler incovations).
RUSTFLAGS would look something like this:
$ export RUSTFLAGS="-C link-arg=$SPDK_LIB_DIR/build/lib/libspdk.so"
Is your feature request related to a problem? Please describe.
Measure the performance overhead imposed by Rust language
Two parts:
dd
on SSD (expect >= 200mb/s) vs. Sequential write using Rust on SSD (measure throughput)Describe the solution you'd like
Describe alternatives you've considered
Additional context
Vijay: I was thinking about this project, and I realized we need to implement the POSIX interface so that applications can link to our library
One part of the project, perhaps for @danielpygo, could be to create those interfaces/wrappers for POSIX that @xxks-kkk can later implement
I don't think the POSIX API necessarily means a C api
but we do need some way for some target application, lets say the Redis key-value store, can run on our file system
u shud explore how applications can link to a rust library
Is your feature request related to a problem? Please describe.
To make sure the project can always build correctly for every code pull request merged, we need to have an automatic way to build the project. Also, for every pull request, we want to able to verify the
code can at least pass the build test before doing code review and merge.
Describe the solution you'd like
Travis CI is the solution we want to use. However, whether it is possible in our case is doubtful because our code has to be run on top of NVMe SSD. Whether we can simulate the hardware is left
to explore (I highly doubt we can actually do this but there might be some surprises).
The program developed under the repo requires the user to run it under sudo
, which can be dangerous especially from the development process perspective. One important reason is that SPDK utilizes DPDK as way to do memory management related work. If the programs on top of SPDK hangs and get killed, the resources allocated to SPDK application via DPDK may not have a chance to reclaim the resources.
The worst case can happen in this case is to reboot the machine, which is hard to do (imagine you have to go inside a data center to reboot one machine !physically!)
To handle this issue, we want to use vagrant to provide a VM with NVMe simulator enabled so that we can perform development work on that VM. If something bad happens, we can easily reboot the VM. Now the question is how we can build some tool to automatically setup VM, repo, and development toolchain so that developers can start to work without much overhead.
A good starting point is the vagrant provided by SPDK repo.
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.