Code Monkey home page Code Monkey logo

Comments (3)

maxpert avatar maxpert commented on May 27, 2024

Yep I wonder if people are read through https://fly.io/docs/litefs/how-it-works/ and the limitations around how LiteFS is playing transactions. I think there is some margin of improvement and I will be spending some time reading through SQLite codebase and LiteFS to make sure I integrate a full transaction capturing mechanism to have some sort of IDs within transactions.

from marmot.

maxpert avatar maxpert commented on May 27, 2024

So after some deeper investigation turns out there is no clean way so far to detect transaction boundaries externally, even from log files unless they checkpoint. It might however start experimenting with some sort of locking mechanism built on top of NATS using the KV store they provide.

from marmot.

maxpert avatar maxpert commented on May 27, 2024

I've been experimented with couple of things lately, and I am not sure if I like any of them so far.
WAL log change detection, and generating a UUID to be attached to each change log. The problem with the approach is while I can group changes that are making modifications in transaction. This can also cause (due to OS Scheduling) non-transactional changes to be included in group as well. There is no clean way to do it at log level. I even tried SQLite forums.

This forked me ended up exploring NATS Key Value or stream options to have one writer writing changes at time, or use something like etcd to embed and acquire locks to transact.

While doing this exercise I realized this is fundamentally against the eventual consistent nature of Marmot. I am trying to put in locking mechanism when not having that goal was the first thing in my mind while I was building Marmot. I want Marmot to be closer to Cassandra rather than a strongly consistent store. The last writer wins is a defacto for a lot of data stores.

So after months worth of exploration, and coming back to where I started, right now I have decided to not include transaction level boundaries in the change logs.

from marmot.

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.