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

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.

主站蜘蛛池模板: 大安市| 阜南县| 峨边| 确山县| 南召县| 新乡县| 莲花县| 天祝| 城口县| 榆树市| 渭南市| 沅江市| 新疆| 平果县| 武威市| 闽清县| 西昌市| 奈曼旗| 中牟县| 历史| 高唐县| 盐源县| 观塘区| 慈利县| 腾冲县| 容城县| 玉山县| 稻城县| 泸西县| 大新县| 忻城县| 枣阳市| 资源县| 桂东县| 广德县| 永泰县| 斗六市| 会东县| 大渡口区| 灵川县| 讷河市|