Giter Site home page Giter Site logo

Comments (3)

jessebenson avatar jessebenson commented on September 28, 2024 1

Yes - persistent indexing reduces the throughput and increases latency per operation, and Service Fabric doesn't deal well with large transactions. The implementation is greatly simplified and the error cases are handled by the built-in transaction support.

I was going to implement the in-memory indexes (see the empty https://github.com/jessebenson/service-fabric-indexing/tree/master/src/ServiceFabric.Extensions.Data.Indexing.Memory), but I never got around to it. The implementation using notifications is significantly more complex and error-prone, and recovery becomes an expensive operation.

from service-fabric-indexing.

jessebenson avatar jessebenson commented on September 28, 2024

@chandramouleswaran - thanks for your interest! The "index" is itself a separate reliable collection that is updated as part of the same transaction. Therefore, if an exception occurs or if tx.CommitAsync is not called, the entire transaction will get rolled back (including changes to the index).

For example, let's look at the implementation of SetAsync(). It first updates the original dictionary using the provided transaction:
https://github.com/jessebenson/service-fabric-indexing/blob/master/src/ServiceFabric.Extensions.Data.Indexing/ReliableIndexedDictionary.cs#L216

Then we update the other reliable collections (i.e. the indexes) as part of the same transaction:
https://github.com/jessebenson/service-fabric-indexing/blob/master/src/ServiceFabric.Extensions.Data.Indexing/ReliableIndexedDictionary.cs#L426

from service-fabric-indexing.

chandramouleswaran avatar chandramouleswaran commented on September 28, 2024

Thanks for the quick reply. My mistake - I assumed this was kept in memory 😃
If the index is persisted then there is no correctness problem - but there could be a performance problem. If we commit a small set of data but index is big - then we will run into commit failures or timing out as other posts are pointing out.

In our team, we are looking for an indexing solution where we do not have to persist more data than needed. We have a working model with notifications for basic cases but we want to explore OSS first before building something new.

from service-fabric-indexing.

Related Issues (7)

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.