功能背后:自动保存的隐藏挑战

We recently expanded autosave in Figma so you can work offline without worrying about losing changes. Engineer Rudi Chen takes us behind the scenes of building this update: how we made product decisions, managed large merge conflicts, and navigated the complexities of Figma’s multiplayer technology.

我们最近在 Figma 中扩展了自动保存功能,这样您就可以在离线状态下工作而不必担心丢失修改。工程师Rudi Chen带我们了解了这次更新的幕后情况:我们是如何做出产品决策,管理大型合并冲突,以及驾驭复杂的 Figma 多人游戏技术的。

It wasn’t so long ago that software made you hit the save key obsessively. After all, we’ve all had an unlucky circumstance in which we closed the application accidentally, it crashed, or we lost power—and hours of work. In online applications like Figma, we flush changes to the server as soon as they’re made; offline changes can’t sync with the server until you reconnect to the internet. Until recently, users ran the risk of losing data should something happen to their computer or browser while offline.

不久前,软件还让你痴迷地按下保存键。毕竟,我们都有过这样的不幸经历:我们不小心关闭了应用程序,它崩溃了,或者我们断电了--还有几个小时的工作。在像Figma这样的在线应用程序中,我们会在更改后立即将其冲到服务器上;而离线更改则无法与服务器同步,直到您重新连接到互联网。直到最近,如果用户的电脑或浏览器在离线时发生意外,他们将面临丢失数据的风险。

With our newly expanded autosave system, edits now save to disk when a document becomes disconnected from the server so changes to the document persist—even if the tab with Figma closes. When the user next reloads this document in a new tab, the changes will be restored and uploaded to the server.

通过我们新扩展的自动保存系统,当文档与服务器断开连接时,编辑内容会保存到磁盘上,因此,即使Figma的标签关闭,对文档的修改也会持续存在。当用户下次在新标签页中重新加载该文档时,所做的更改将被恢复并上传到服务器。

But why does such a feature warrant a blog post? “Saving the file to disk periodically” isn’t exactly a groundbreaking innovation. But as it often happens, interesting challenges lie not in individual features, but the interaction between them. Figma’s central paradigm is being a browser-based, cloud-based, and realtime application. We’ve written about how we handle conflict resolution in multiplayer before. Now, in the process of examining autosave, we’ll see how how supporting multiplayer adds a lot of complexity to other features ...

开通本站会员,查看完整译文。

Accueil - Wiki
Copyright © 2011-2024 iteam. Current version is 2.137.1. UTC+08:00, 2024-11-15 10:25
浙ICP备14020137号-1 $Carte des visiteurs$