Git Product home page Git Product logo

Comments (6)

badrishc avatar badrishc commented on June 15, 2024

If you can provide a stand alone repro, we can look into it.

from faster.

cschuchardt88 avatar cschuchardt88 commented on June 15, 2024

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.

badrishc avatar badrishc commented on June 15, 2024

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.

cschuchardt88 avatar cschuchardt88 commented on June 15, 2024

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.

badrishc avatar badrishc commented on June 15, 2024

Correct, FASTER does not include a range index. It is designed for point reads, upserts, read-modify-writes, and full scans.

from faster.

cschuchardt88 avatar cschuchardt88 commented on June 15, 2024

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)

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.