Demystifying Cloud-Native Commerce – DZone Cloud

In today’s world, both eCommerce and cloud-native are the two most important areas where technology and business innovations are fused together to build scalable and experience-driven platforms. The surge in the eCommerce space after the COVID-19 pandemic has triggered many queries in the business and technology worlds. Whether it is a small company, mid-size or large corporation, everyone has been impacted by the pandemic to a certain extent.

Stores are closing. Contactless shopping and payments are becoming the norm. Supply-chain is becoming a critical issue due to transportation restrictions. Travel is getting into habitual restrictions. Cross-country shipment and local delivery are experiencing challenging times. All businesses are looking for an alternative way of doing business. In this space, direct-to-consumer is becoming the standard and online digital presence is the need of the hour.

Similarly, technology has become the key enabler for digital presence. As more and more businesses are growing online, the need for infrastructure and computing power have been in tremendous demand. In this area, the cloud is the most important place to serve the platform’s needs. The on-demand scalability, speed and performance, high availability, numerous tools and frameworks, operational efficiency, and an overall optimized TCO have boosted the cloud market to a great extent.

With both these areas in mind, we have prototyped an eCommerce portal running with the AWS Serverless platform fully. This is not uncommon: many organizations are using eCommerce in different spheres of the business starting from order capture to order fulfillment to delivery applications. Even Amazon’s eCommerce site runs on AWS only. In this exploratory work of the last 12 months with a small team, we have found certain learnings all the way. We will share that in this blog post.

AWS and re:Invent 2021

We are highly motivated by AWS’s almost 200+ services across several areas of software building, starting from basic foundational services to personalization to DevOps to operational and connected devices. Wherever we find a use case for building software, AWS has spread its reach there. The re:Invent 2021 was quite exciting; Especially when CEO Adam Selipsky and CTO Warner Vogel gave about 4 hours of keynotes and provided good insight into the direction AWS is moving in the future.

They are leaning towards building their own processing and high performing chips, more matured AI/ML models, sustainable platforms and infrastructures, LCNC platform, industry solutions in manufacturing and healthcare, as well as connected cars in the driverless arena.

Please check the snapshot below from the keynote speech by Warner Vogel at re:Invent 2021. Each of these boxes represents one AWS service.

Below is a quick snapshot of companies using AWS for eCommerce.

Snapshot of companies using AWS for eCommerce

In the next section, we will talk about the prototype and how each one of these services is built.

Prototype and How Services Are Built

AWS has a history in the retail and digital commerce space. They have certification programs and also work with many partners through their marketplace.

Four Pillars of Digital Commerce

If we look at how AWS services are tied to digital commerce, we see the following four pillars:

  • Agility and TCO
  • Conversion and services
  • Experience touchpoints
  • Brand intelligence and connect

Pillars of Digital Commerce

The prototype has been built under the guidance of these pillars, though only a subset of these services has been used in agility and TCO as well as experience touchpoints for now.

Architecture

Below is a logical architecture of the end-to-end journey. We have developed a part of the overall flow. The site is operational with a basic data setup to browse-cart-checkout-order flows.

High-Level Architecture

The list of services used to build the eCommerce portal is mentioned below. We divided the functionalities into 4 stages. The current portal is used with the services mentioned under phase 1 only.

Use Cases - AWS Services

The following features were planned to implement in this application.

Functional Context

The next section will deep-dive into how different services are built and what kind of architectural considerations were taken for the same.

Deep-Dive Into Architectural Considerations

All the services are used with native capabilities only. The power of serverless components was explored here. The front-end was built with AWSAmplify, which has a very nice layer to mediate between front-end and back-end layers in a very moduled and decoupled way. This means the front-end can be implemented in ReactJS or AngularJS while the backend can be AWS native services or some external/3rd party endpoints. Amplify can fix and match this data and pass information to the front-end layer to render the information. It also supports GraphQL endpoints along with REST which makes the APIs more manageable, performing, and adaptable to channels. Amplify also works seamlessly with authentication and authorization servers, natively integrated with API Gateway and AWS Cognito so that APIs can be secured properly with minimal effort.

From the AWS service point-of-view, the combination of storage as S3 or NoSQL DB like Amazon DynamoDB is used, as these are natively connected with Lambda services.

All the services for eCommerce applications have been created like serverless microservices which can be managed, maintained, and independently using Serverless Application Model, aka SAM, as the enabler. This gives the nimbleness and agility in the entire design and development lifecycle without greater flexibility. In certain cases, mock services are used as the backend systems like Order Management System (OMS) or Warehouse Management System (WMS) were not available.

Deep Dive Overview

Below is the presentation layer which is connecting to different backend services.

Presentation Layer

The presentation layer is powered by Amplify, which is a flexible framework to build customer experience. While Amplify provides interfaces to build the front-end with popular frameworks like Angular, it also gives the flexibility to connect to back-end services (be it AWS native services or others) to pull data. Here we have used AppSync for the GraphQL-based query layer for all backend services.

All services are built with a combination of Lambda, SNS, S3, and DynamoDB depending on what services are to be built here. It gives highly managedable and decoupled service layers to build microservice-oriented architecture. All backend services are using SAM (Serverless Application Model) with their own domain so that each one can be independently managed.

We also did a simple load test on the site using JMeter and found that the average response time was about ~250ms. Cold Start was also handled using:

  1. Provisioned Concurrency
  2. Python/NodeJS as a language with the lowest cold start times

Simple load test on the site using JMeter

It was a great experience to completely build the commerce using AWS Serverless. There is a lot of power in building services using AWS, so we both enjoyed the work very much.

.

Leave a Comment