• @[email protected]
    link
    fedilink
    21 year ago

    My understanding of that article was that it was not necessarily about duplicated code, but duplicated data. If you have two places storing the same data, and different parts of your app go to each of it, you need to somehow keep them in sync, and that’s often a pain.

    I’m trying to be very rigorous about avoiding that, duplicated code I’m a bit less rigorous about.

    • @[email protected]
      link
      fedilink
      2
      edit-2
      1 year ago

      Microservices and document db’s go brrrrrrr. Data duplication is completely fine as long as there is only one source of truth that can be updated, all copies must be read only. Then the copies should either regularly poll the source or the source should publish update events that the copies can consume to stay in sync. It’s simple stuff but keeps your system way more available and fast than having multiple services talk to a shared db or worse, multiple services constantly fetching data through a proxy.