Coder Social home page Coder Social logo

rustfs's People

Contributors

danielpygo avatar vijay03 avatar xxks-kkk avatar yuhzheng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rustfs's Issues

SPDK level Rust FFI

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.

Use RUSTFLAGS instead of .cargo/config file

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"

Performance benchmark

Is your feature request related to a problem? Please describe.

Measure the performance overhead imposed by Rust language

Two parts:

  • Sequential write using dd on SSD (expect >= 200mb/s) vs. Sequential write using Rust on SSD (measure throughput)
  • Write randomly a 4kb blocks on SSD for 10K times (expect ~ 60ms) vs. Write randomly a 4k block on SSD using Rust 10K times (measure latency)

Describe the solution you'd like

Describe alternatives you've considered

Additional context

POSIX Interface

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

Add Travis Build to the project

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).

Software packaging using Vagrant

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.