官术网_书友最值得收藏!

Three-tier web application patterns

Web applications with the traditional request/response cycle are a sweet spot for serverless systems. Because serverless functions are short-lived, they lend themselves well to problems that are themselves short-lived and stateless. We have seen stateful systems emerge and become popular, such as WebSockets; however, much of the web and web applications still run in the traditional stateless request/response cycle. In our first set of patterns, we'll build different versions of web application APIs.

While there are three different patterns to cover for web applications, they will all share a common basis, which is the three-tier model. Here, the tiers are made up of the following:

  • Content Delivery Network (CDN) for presentation code/static assets (HTML, JavaScript, CSS, and so on)
  • Database for persistence
  • Serverless functions for application logic

REST APIs should be a common and familiar tool for most web developers. In Chapter 2A Three-Tier Web Application Using REST, we'll build out a fully featured REST API with a serverless design. This API will have all of the methods you'd expect in a classic REST API—create, read, update, delete (CRUD).

While REST APIs are common and well understood, they do face some challenges. After starting with a serverless REST API, we'll walk through the process of designing the changes needed to make that same API work as a single GraphQL endpoint that provides the same functionality in Chapter 3A Three-Tier Web Application Pattern with GraphQL.

Finally, in Chapter 4Integrating Legacy APIs with the Proxy Pattern, we'll use a proxy pattern to show how it's possible to completely change an API  but use a legacy API backend. This design is especially interesting for those who would like to get started migrating an API to a serverless platform but have an existing API to maintain.

主站蜘蛛池模板: 扬州市| 仪征市| 远安县| 华安县| 库伦旗| 读书| 华容县| 安徽省| 南木林县| 临清市| 贡觉县| 安溪县| 增城市| 江津市| 临江市| 中方县| 扶风县| 财经| 凉城县| 宁都县| 明光市| 金阳县| 岳阳县| 交口县| 门源| 临汾市| 罗江县| 浏阳市| 龙胜| 民丰县| 光山县| 台中市| 上饶县| 聂拉木县| 廉江市| 阳春市| 青龙| 高邑县| 湘潭县| 泸水县| 卓尼县|