TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Resources on application data preloading and caching strategies?

4 点作者 martijn_himself大约 4 年前
Intuitively it seems to me that the major issue with perceived slowness of large business applications (such as CRM systems) is the absence of any pre-loading &#x2F; caching of data for the user.<p>In my experience most users only work on a small subset of data and work on the same or similar records and processes every day, so I&#x27;d be interested to have the application learn what subset this is for a particular user or group of users and then do &#x27;pre-emptive&#x27; loading to increase the responsiveness of the application and improve the user experience.<p>If I want to avoid re-inventing the wheel, what are some good resources that deal with strategies on how to achieve this? What are common pitfalls?

2 条评论

bem大约 4 年前
One powerful way to deal with these problems is event sourcing. It&#x27;s a reasonably elegant way to materialize a single application-specific cache based on many different data sources. Two great resources:<p><a href="https:&#x2F;&#x2F;engineering.linkedin.com&#x2F;distributed-systems&#x2F;log-what-every-software-engineer-should-know-about-real-time-datas-unifying" rel="nofollow">https:&#x2F;&#x2F;engineering.linkedin.com&#x2F;distributed-systems&#x2F;log-wha...</a><p><a href="https:&#x2F;&#x2F;queue.acm.org&#x2F;detail.cfm?id=3321612" rel="nofollow">https:&#x2F;&#x2F;queue.acm.org&#x2F;detail.cfm?id=3321612</a>
ianpurton大约 4 年前
A good example is superhuman the email client. They cache data in the browsers local web sql database.<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Web_SQL_Database" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Web_SQL_Database</a><p>Then all searches etc are fast, due to not having to go to the server.<p>I&#x27;m not sure how they implement that, but I would probably go with a websocket that sends the latest data to the client which then stores it in Indexed DB (the browsers local database).<p>I don&#x27;t know of any solution that does this out of the box.