1. 25
  1.  

  2. 6

    “ In CouchDB you need to explicitly resolve conflicts through your application’s code (not an easy task in certain scenarios).”

    True, but the article seems to imply CRDTs are an alternative to this, when in fact they’re just data structures amenable to automated conflict resolution. So you can use them with CouchDB, or any other data sync mechanism. [Like, ahem, Couchbase Lite, which I work on.]

    1. 5

      I’m using this strategy in my project, a blogging-forum system.

      I have built it on a flexible data format (.txt) and I run my local instance for writing stuff.

      When it is ready to publish, I can do that when I am online.

      1. 4

        This is effectively where I was headed about 1/1.5 years ago with disease surveillance / outbreak management software. We had a number of places we operated in which didn’t have infrastructure, didn’t like the idea of cloud or have the money for cloud, but could get hardware easily (laptops, phones, little mini servers). In a context where excel dominates, whatever you build needs to feel as ubiquitous as excel, and web apps just can’t be that, no matter how hard we try, even with electron, there are certain things that require too much working around or are just impossible to make work the way you want.

        At the end of my contract I had a fully offline, native desktop application that was using CRDTs to sync data between local instances of the application over TCP/UDP and using multicast to detect other peers. As well as using bluetooth to allow transfer between mobile, etc… You could open the application on a laptop or mini tower somewhere and configure it as a “transit hub” which basically acted as a sort of dumping ground for data which came near it. Data was synced across all the nodes in the graph of nodes via a gossip-like protocol, where a given user could be carrying the CRDTs for data they didn’t even know they had on their device. It was made so that a significant portion of users could operate completely offline, and their data would “findy a way” to make it to the transit hubs and eventually to the regional or country-level offices.

        It was frankly pretty awesome, and one of the things I’m most proud of building out of anything I’ve ever built, my walls were plastered with diagrams, reams of paper everywhere while I figured things out. Then I went into contract limbo, got fed up, and finally walked away from the project after 6 months of not being paid while still working on it, about 6 months later, Coronavirus came… The project was handed off to a company in India and all that work was tossed out for an app that required an always-on connection to the internet and the super ambitious roadmap I had built for the project as far as I’m aware was tossed along with it. Saddens me, it had such potential to do some real good, it was already active in most of the outbreaks in the last 5-6 years like Ebola, Dengue, the Rohinga crisis, Syria, all over the Pacific… had potentially curbed hundreds of deadly outbreaks in those regions…

        1. 2

          I’ve been doing this myself as much as possible. My laptop has a bunch of cores, 3 terabytes of storage, and I have a spare battery I can swap into this ThinkPad.

          I like the ability to focus with the internet turned off entirely, but most software required for software development does not work without internet. I hope that improves in the future!

          Does anyone do this kind of thing and has suggestions on how to do it better?

          1. 2

            Most software I use for development works fine offline — Sublime Text, Xcode, Git, etc. About the only thing I need to be online for (aside from communicating with coworkers) is reading issues (GitHub, Jira). IIRC there is an experimental issue tracker that stores its info inside your Git repo, which would solve that.

          2. 2

            This article reminded me of https://radicle.xyz . Looking forward to see what they will build.

            1. 1

              I’ve definitely been moving towards local-first in my own computing habits lately. I’m excited for theoretical stuff such as CRDTs and how it could enable a hybrid model, but I don’t think we need to wait for that. The nice thing about older software is that it already exists… It just takes time to figure out the best way to run it, and how it fits with modern workflows.

              1. 1

                It’s weird to see this as a ‘what-if’ scenario, when it’s literally the model used by MS Office, which is one of the biggest bits of mainstream software in the world. All of the office apps are local (though they also have web versions) and they operate on files. If the files are stored in the cloud then you get live editing, otherwise you get offline merging. Even if the files are stored in SharePoint / OneDrive, they’re copied locally automatically for offline work and if two people edit them offline then the system falls back to offline merging (yes, it does make me sad how OneDrive is slowly reinventing the CODA filesystem).

                1. 1

                  I read the paper and it’s interesting how merge conflicts didn’t really happen in their collaboration experiment because people naturally assumed different areas of responsibility. Maybe other tools with poor conflict resolution features had burned them before.

                  1. 1

                    I’d love to see this ethos gain traction. Whenever I’m traveling in a low/no connection region, I’m so grateful to the iPhone apps I have installed that remain useful. My expectation is always that they will be about as useful as a web browser with no connection. Most things are just a thin client. Often you can’t even access things like “messages” that could have easily been stored client side.

                    Shoutout to Pocket and maps.me. Anyone have offline-friendly favorites?

                    1. 1

                      some technical/information-theoretical support for what i’m always telling everyone is what humanity needs. nice!