Comments (6)
If you can provide a stand alone repro, we can look into it.
from faster.
Problem with reproducing the error is the application is a plugin for a blockchain that uses faster as storage, that i'm making.
Sessions are not multi-thread safe? I think that is the cause of the error, plus the hanging of the session. What I have is two different threads on the same session. One thread importing blockchain data (just upserting) and the other thread reading data. At some point the session im guessing is locking up and sometimes i get that error like above comment. Also the import is slow compared to leveldb or rocksdb. But i think it has to do with my seek
function. Maybe you can point me in the right direction for getting optimal speed and disk persistence. It's very hard for someone new starting out. I read all the samples, but don't really understand what faster is doing. Plus code commits and documentation is are very generic.
Here is the code i found to work without the error. Each method can be called on another thread at any giving time. So i created a session at method level instead of using the session at class level, that fixed the error and stopped the hanging of the session. Maybe you point me in the right start direction for optimal speed and disk persistence. thank you
https://github.com/cschuchardt88/neo-modules/blob/FasterDBStore/src/FasterDBStore/FasterStore.cs
from faster.
Sessions are mono-threaded. You can use a pool of sessions to avoid two threads using the same session.
Example: https://github.com/microsoft/FASTER/blob/main/cs/playground/AsyncStress/SerializedFasterWrapper.cs
from faster.
thank you that works. But still slow only 9-10 blocks per second compared to leveldb which is 50-100 blocks a sec. Has to do with seeking through the whole database then ordering them. Faster needs some kind of seek function for seeking forward and backwards on keys. thanks again for the help.
from faster.
Correct, FASTER does not include a range index. It is designed for point reads, upserts, read-modify-writes, and full scans.
from faster.
is there anything that i can hook into; so i can order the keys? Or what do you recommend i do for seeking/ordering keys in faster?
from faster.
Related Issues (20)
- will there be support for range queries and secondary indexes? HOT 6
- should we have a function ContainsKey for ClientSession? when we only check if item exists by key. HOT 2
- Faster.Server in Docker HOT 1
- Problem with version 2.5.1 HOT 2
- Problem with read cache HOT 2
- Issues around IScanIteratorFunctions HOT 1
- Broken link to Playground example HOT 2
- Random crashes when server concurrent GC enabled HOT 2
- Commit only certain records HOT 3
- Random crashes when server concurrent GC enabled (didn't fixed) HOT 9
- Faster hangs in HandleRetryStatus HOT 2
- This repo is missing important files
- in memory concurrent support dictionary HOT 2
- JVM language support HOT 1
- ShardedStorageDevice and related classes/interfaces HOT 1
- using fasterkv with string key and string value produces byte[] of humongous size in heap memory HOT 5
- Can FASTER replace Redis? Is there a caching mechanism similar to Redis RDP? HOT 1
- Log tail iteration does not end when log completed HOT 2
- Implement atomic GetOrAdd/AddOrUpdate equivalency from ConcurrentDictionary<> HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faster.