A Web Without Spinners, an Introduction to Replicache (2024)

Episode 35 of the 20MinJS podcast covers a very innovative JavaScript library called “Replicache”.

This library allows you to quickly build multi-user, collaborative applications without worrying about the underlying architecture of such applications.Think about building GoogleDocs on your own, or perhaps something like Figma, where you can collaborate with other users on your designs, how would you approach building somethinglike that?

It sounds like a monumental task, the collaborative aspect of these applications opens up a huge Pandora’s box when you start looking into it. How do you handle updates? What happens if they’re notfully compatible? What if one of your users loses connectivity for a while? And I can keep asking questions like that.

Well, Replicache is meant to answer 99% of all those questions, and provide some guidance for the remaining 1%. This is why in this episode we talked to Aaron Boodman, founder of RociCorpt, the creators of Replicache.

As always, you can listen to the full interview here:

Or if you’re not into podcasts, just keep on reading!

Highligh #1: What exactly is Replicache?

One of the first questions we tackled was to properly define Replicache, because it’s really an exciting piece of techonology, but given the potential it brings, onemight think it’s either a framework, a SaaS that we interact with, or something completely different.In fact, Replicache is a JavaScript library that you can add to your projects and use it to coordinate mutations on top of your data source.

In other words, if you’re building an app that relies on data, then through the use of Replicache, you can centralize the way you affect that data (i.e through mutations) andwhile doing so, you’ll gain other benefits, such as:

  • “Multi player” support. In other words, your application can share the updates across all your app users and ensure that their UIs reflect the latest version of the data within milliseconds of it changing.
  • Offline mode. Replicache keeps a local cache of your changes, so it can let you keep working as if you were online for days. Once you come back online, it’ll internally synch with all other clients to provide you (and them) with the latest merged version of your data.
  • Blazingly fast UI updates. Due to the internal architecture of Replicache, and all the services it adds, your interaction with the data sources is done only when data has changed. That means you don’t waste time checking when nothing happens, or the opposite, checking too late once a lot of things have happened.

Of course, these are not features you can’t build on your own, but if you listen to the interview, you’ll hear Aaron mention how some companies spend years working on their own frameworks that can achieve all of this.Well, now with Replicache, you have the building blocks required to focus only on building your app, instead of spending time building the tools to eventually build your app.

You save a lot of time, and of course, a lot of money.

Highlight #2: What makes Replicache so fast?

While the project is closed-source and we can’t see the actual implementation, we have their architecture documents available that describe a bit of how Replicache works.Long story short, Replicache will have a local copy of their app running on your system, and your UI will connect to it directly. This local version will be the one synching data between you and the server (where the rest of the datas resides).

This means you’re able to get updates very quickly as soon as the data source sends updates to your local Replicache, it’ll push them to your UI.This local replicache is also responsible for the offline mode. Every time you lose connectivity, it’ll keep track of everything you’re doing, and once you’re back online, it’ll be the onein charge of synching the data as much as possible.

Note that when something like this happens, it’s very hard to ensure that the data can be merged without conflicts. Which is why for those cases, you’ll have to find a wayto implement a manual resolution process (Aaron talks about some options for this on the episode).

Highlight #3: What kind of back-end do you need for Replicache?

That’s a fascinating question because while the front-end is, obviously, pure JavaScript, Replicache claims to be “Bring Your Own Backend”, which means you can buildan application using Replicache with any tech stack. As long as you’re using JavaScript on the front (and what else would you use?) you can then code the back-end in anything you want.

That said, they provide some libraries for you to use on the back-end out of the box to simplify how you communicate with their services. So yes, you can build your applicationwith any tech stack, but if you’re not using one of the “preferred” ones (like NextJS, or React), then you’ll have to a little extra to make it all work.

If you’re wondering what exactly that “extra” is, you can check out their documentation here, it has all the details you need.

Highlight #4: Getting started with Replicache: how easy is it?

I can’t say I’m a Replicache expert after our interview with Aaron or after the few tests I did on my own, but I can definitely echo what Aaron mentioned during the interview: the easiest way to get started withReplicache to understand if you need it, is to use one of their pre-built apps.

You can boot up a basic To-Do app built with Replicache in seconds using a single command: npx create-replicache-app my-app react

With that, you can start reading code, and making changes to understand how it works. They have a small tutorial on their documentation showing you how to add a feature to that To-Do application.

Once you’ve gone through it and you’ve done your own tests, you’ll have a better grasp of all the new concepts you’ll be dealing with (like data mutators, where and how to store the data model, etc).

All in all, I’d rate Replicache as a “medium” in terms of difficulty getting started. Once you pass the initial hurdle, things look much more accessible.

This concludes the highlights of this interview, but don’t go yet! If I managed to peak your interest about Replicache, give the episode a listen, there is a lot more information there!

And if you’ve already tried Replicache, leave a comment and share your experience, I’d love to read what others have been doing with it!

A Web Without Spinners, an Introduction to Replicache (2024)
Top Articles
Stradivari - Geigenbau Leonhardt - Mittenwald
CATHOLIC ENCYCLOPEDIA: The Stradivari Family
Funny Roblox Id Codes 2023
Golden Abyss - Chapter 5 - Lunar_Angel
Www.paystubportal.com/7-11 Login
Joi Databas
DPhil Research - List of thesis titles
Shs Games 1V1 Lol
Evil Dead Rise Showtimes Near Massena Movieplex
Steamy Afternoon With Handsome Fernando
Which aspects are important in sales |#1 Prospection
Detroit Lions 50 50
18443168434
Zürich Stadion Letzigrund detailed interactive seating plan with seat & row numbers | Sitzplan Saalplan with Sitzplatz & Reihen Nummerierung
Grace Caroline Deepfake
978-0137606801
Nwi Arrests Lake County
Justified Official Series Trailer
London Ups Store
Committees Of Correspondence | Encyclopedia.com
Pizza Hut In Dinuba
Jinx Chapter 24: Release Date, Spoilers & Where To Read - OtakuKart
How Much You Should Be Tipping For Beauty Services - American Beauty Institute
Free Online Games on CrazyGames | Play Now!
Sizewise Stat Login
VERHUURD: Barentszstraat 12 in 'S-Gravenhage 2518 XG: Woonhuis.
Jet Ski Rental Conneaut Lake Pa
Unforeseen Drama: The Tower of Terror’s Mysterious Closure at Walt Disney World
Ups Print Store Near Me
C&T Wok Menu - Morrisville, NC Restaurant
How Taraswrld Leaks Exposed the Dark Side of TikTok Fame
Dashboard Unt
Access a Shared Resource | Computing for Arts + Sciences
Speechwire Login
Healthy Kaiserpermanente Org Sign On
Restored Republic
3473372961
Craigslist Gigs Norfolk
Litter-Robot 3 Pinch Contact & DFI Kit
Moxfield Deck Builder
Senior Houses For Sale Near Me
Whitehall Preparatory And Fitness Academy Calendar
Trivago Myrtle Beach Hotels
Anya Banerjee Feet
Three V Plymouth
Thotsbook Com
Vérificateur De Billet Loto-Québec
Funkin' on the Heights
Vci Classified Paducah
Www Pig11 Net
Ty Glass Sentenced
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6323

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.