URI: 
        _______               __                   _______
       |   |   |.---.-..----.|  |--..-----..----. |    |  |.-----..--.--.--..-----.
       |       ||  _  ||  __||    < |  -__||   _| |       ||  -__||  |  |  ||__ --|
       |___|___||___._||____||__|__||_____||__|   |__|____||_____||________||_____|
                                                             on Gopher (inofficial)
  HTML Visit Hacker News on the Web
       
       
       COMMENT PAGE FOR:
  HTML   Marmot – A distributed SQLite server with MySQL wire compatible interface
       
       
        schulm wrote 3 hours 7 min ago:
        Is this suitable for LocalFirst apps?
       
        phplovesong wrote 3 hours 41 min ago:
        Looks like yet another AI generated project.
       
        joelthelion wrote 3 hours 41 min ago:
        Naïve question : why would you want to use this over, say postgre?
       
        PunchyHamster wrote 3 hours 48 min ago:
        weird choice considering SQLite is more similar to PostgreSQL
       
          phplovesong wrote 3 hours 40 min ago:
          AI probably generated the mysql thing, and OP just went with it.
       
        ChocolateGod wrote 4 hours 8 min ago:
        I wonder if you could tie this with Litestream to get streamed backups.
       
        savolai wrote 4 hours 53 min ago:
        So would it make sense to use to use this on a nas to keep wordpress
        sites’ content backed up?
       
        bawolff wrote 4 hours 53 min ago:
        > Marmot uses gossip protocol (no leader)
        
        So umm, does that mean it sacrifices consistency?
       
          foldr wrote 3 hours 8 min ago:
          
          
  HTML    [1]: https://github.com/maxpert/marmot?tab=readme-ov-file#limitat...
       
        wg0 wrote 5 hours 19 min ago:
        Is there something similar that exists for Postgres?
       
        iliesaya wrote 7 hours 15 min ago:
        is this an alternative to SymmetricDS to replicate database on multiple
        node without master/slave ?
       
        naveed125 wrote 8 hours 13 min ago:
        That looks pretty cool
       
        _a9 wrote 8 hours 33 min ago:
        I used this a while back while running a waybackmachine style site for
        a large social media platform. I wanted to keep it simple with sqlite
        but when it got popular it started to become a problem. Marmot was the
        only thing that I was able to get to work with the amount of data I was
        pulling in. It would sync the master db from the main archiver server
        to all the ha servers so the user would be able to access it
        immediately no matter what ha server they got. The dev team was nice to
        talk to when I had some issues in setting it up.
        
        It was definitively a weird backend setup I had made but it just worked
        once set up so I didnt have to touch any of the frontend code.
       
        oblio wrote 8 hours 45 min ago:
        Funny, I was just reading about this: [1] FreePascal ORM, so in an
        adjacent space (ORM, can work with both SQLite and MySQL).
        
        I guess DB devs really love marmots? :-))
        
  HTML  [1]: https://github.com/synopse/mORMot2
       
        maxpert wrote 9 hours 8 min ago:
        Author here! Every time I post my own stuff here it seems to sink, so
        hopefully this actually reaches some of you.
        
        Marmot started as a sidecar project using triggers and polling to
        replicate changes over NATS. It worked, but I hit a wall pretty fast.
        Most people really want full ACID compliance and DDL replication across
        the cluster. I realized the only clean way to do that was to expose
        SQLite over a standard protocol.
        
        While projects like rqlite use REST and others go the page-capture
        route, I decided to implement the MySQL protocol instead. It just makes
        the most sense for compatibility.
        
        I’ve reached a point where it works with WordPress, which
        theoretically covers a huge chunk of the web. There are scripts in the
        repo to deploy a WP cluster running on top of Marmot. Any DB change
        replicates across the whole cluster, so you can finally scale WordPress
        out properly.
        
        On the performance side, I’m seeing about 6K-7K inserts per second on
        my local machine with a 3-node quorum. It supports unix-sockets, and
        you can even have your processes read the SQLite DB file directly while
        routing writes through the MySQL interface. This gives you a lot of
        flexibility for read-heavy apps.
        
        I know the "AI slop" label gets thrown around a lot lately, but I’ve
        been running this in production consistently. It’s taken a massive
        amount of manual hours to get the behavior exactly where it needs to
        be.
       
          spiffytech wrote 2 hours 54 min ago:
          Since Marmot pivoted to the MySQL wire protocol, I haven't had a
          clear picture of its advantages over using normal MySQL with
          active-active replication. Can you speak to that?
       
          hardwaresofton wrote 6 hours 27 min ago:
          Just want to note that every time I see it I’m impressed with the
          project, great job so far.
          
          The fact that you’ve been running this with WP is also a really
          huge use case/demonstration of trust in your different software —
          IMO this should be on the README prominently.
          
          These days I personally just ignore projects that insist on MySQL —
          Postgres has won in my mind and is the better choice. The only way
          I’d run something like a WP hosting service is with a tool like
          Marmot.
          
          One thing you might find interesting is trying marmot with something
          like Litestream v2 — marmot of course has its own replication
          system but I like the idea of having a backup system writing to s3.
          It seems trivial (as you’ve noted that you can still work directly
          on the s3 file) but would be a nice blog post/experiment to see
          “worked out” so to speak.(and probably wouldn't sink to the
          bottom of hn!)
       
            maxpert wrote 7 min ago:
            Marmot already supports debezium, so you can do way more than just
            basic S3 backups. I've noted your suggestions, it's definitely
            helpful.
       
            raphinou wrote 1 hour 27 min ago:
            Also a postgres user. Wondering why MySQL wire protocol and not
            pgsql's: did the mysql choice have advantages compared to pgsql in
            this case?
       
        geenat wrote 9 hours 13 min ago:
        Oh man, tons of updates including DDL replication! V2 looks very
        impressive.
        
        Now I'm curious how sharding/routing is handled- which seems like the
        final piece of the puzzle for scaling writes.
       
          maxpert wrote 8 hours 55 min ago:
          Right now I've started off with full replication of every database in
          cluster. On my roadmap I have:
          
          - Ability to launch a replica on selected databases from main
          cluster.
          
          - Ability for replica to only download and replicate changes of
          select databases (right now all or nothing).
          
          - Ability for replica to proxy DML & DDL into write cluster
          transparently.
          
          - Custom set of commands for replicas to download and attach/detach
          databases on the fly.
          
          This will instantly solve 80% of the problems for most of consumption
          today. I will probably go after on demand page stream and other stuff
          once core features are done.
          
          Not to mention this solves majority use-cases of lambdas. One can
          have a persistent main cluster, and then lambda's coming up or going
          down on demand transparently.
       
       
   DIR <- back to front page