Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto save server architecture

I want to save a lengthy form's inputs at the server. But I don't think making db calls on each auto-save action is the best approach to go for.

What would constitute as a good approach to solve this?

Another problem is that I have 3 app servers. So in memory cache wouldn't work.

I was thinking keeping the data in redis and updating it on every call and finally updating the db. But since I have 3 servers how do I make sure the calls are in queue?

Can anyone help with the architecture?

like image 492
amit Avatar asked Jun 08 '17 11:06

amit


People also ask

How does AutoSave work?

AutoSave is a new feature available in Excel, Word, and PowerPoint for Microsoft 365 subscribers that saves your file automatically, every few seconds, as you work. AutoSave is enabled by default in Microsoft 365 when a file is stored on OneDrive, OneDrive for Business, or SharePoint Online.

Does Figma have AutoSave?

Figma is a vector-based design tool that is gaining popularity in the design community. One of the features that sets Figma apart from other design tools is its auto-save feature. Figma automatically saves your work as you go, so you never have to worry about losing your progress.

Is it AutoSave or auto save?

verb (used without object), au·to·saved, au·to·sav·ing. to be automatically saved: Most video games autosave after each new level.

How often does Figma save?

Figma saves your work by adding checkpoints to the file's version history. Figma records a new checkpoint after 30 minutes of inactivity in the file.


1 Answers

But I don't think making db calls on each auto-save action is the best approach to go for.

That's the real question, let's start with that. Why would you think that? You want auto-save, right? This is the only thing that saves user work.

All the other options you listed (memcached/redis, in-process caching) - not only do they not save user work, they're ticking time bombs. Think of all things that can fail there: redis dies, network is split, the whole data center is hit by lightning.

Why create all the complexity when you can just... save? You may find out that it's not that slow (if this was your concern).

like image 137
Sergio Tulentsev Avatar answered Oct 02 '22 18:10

Sergio Tulentsev