tmt96 / rs-object-space Goto Github PK
View Code? Open in Web Editor NEWAn object store library for highly concurrent program written in Rust
License: Apache License 2.0
An object store library for highly concurrent program written in Rust
License: Apache License 2.0
Agent
is our main method of providing simple multithreading. Each Agent
should run on a separate thread & be tied to one ObjectSpace
. Ideally, it should be a thin wrapper around ObjectSpace
functionality.
Agent
API is currently unfinished, mostly due to trouble specifying different associated types for Agent
, AgentRange
, and AgentKey
. We should finalize before alpha preview.
After #7 , performance regresses by about 30%. We want to investigate how to revert this performance regression
Currently the naming of the API is unclear (e.g: ObjectSpaceRange
, ObjectSpaceKey
,...) We should replace it with more descriptive naming (e.g: RangedLookupSpace
)
Currently we have two versions for single object retrieval methods (read
and take
): one is non-blocking and returns Option<T>
(try_read
). The other is blocking until an object satisfying condition is found (read
). We could add a third version that block until a timeout and returns Option<T>
(e.g: read_timeout
): if timeout elapsed and no object satisfying the condition is found we returns None
Float in Rust does not implement PartialOrd
, causing problems for implementing Range
functions for TreeobjectSpace
, which relies on BTreeMap
. Converting float Range
to Range<NotNaN<f64>>
should solve the problem.
Currently upon storing objects TreeObjectSpace
flattens the result Value
from serde_json
serialization to support field range & value lookup.
e.g: Given this struct
#[derive(Serialize, Deserialize)]
struct Pagination {
limit: u64,
offset: u64,
total: u64,
}
#[derive(Serialize, Deserialize)]
struct Users {
users: Vec<User>,
pagination: Pagination,
}
The resulting Value resembles:
Value {
"users": Value(Array),
"pagination.limit": Value(Number),
"pagination.offset": Value(Number),
"pagination.total": Value(Number)
}
A recent release from serde
includes a flatten
flag. using the flag for Pagination gives:
"users": Value(Array),
"limit": Value(Number),
"offset": Value(Number),
"total": Value(Number)
We may investigate how we could use this flag to simplify our serialization process.
Questions:
count
?Currently TreeObjectSpace
does not support Enum. As Enum is an integral part of Rust (e.g: Option
, Result
, etc), supporting for Enum is crucial.
This might require rethinking field name checking in Entry
as different subtypes in an enum may contain different field names. Refer https://serde.rs/json.html for more information on how enum is represented in serde-json
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.