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

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.

主站蜘蛛池模板: 潍坊市| 盱眙县| 元谋县| 大田县| 巴林右旗| 岢岚县| 鄯善县| 锦州市| 梅河口市| 亚东县| 印江| 南岸区| 盱眙县| 连南| 三门县| 唐山市| 寿宁县| 盖州市| 凤凰县| 织金县| 娄烦县| 南岸区| 新营市| 白城市| 临颍县| 龙岩市| 贵州省| 定日县| 台安县| 安远县| 宁陵县| 绥江县| 方城县| 嵊州市| 武宁县| 呼玛县| 广元市| 五原县| 海丰县| 遵化市| 青田县|