PRIYANKA VERGADIA: Welcome to Build with Google Cloud
where we build reference architectures.
In this video, we will build an e-commerce platform
on Google Cloud.
What are your options?
Stay with me to find out.
[MUSIC PLAYING]
Let's say you're a retailer that sells pet products, shoes,
cars, anything.
Did you know that digital commerce platform
can be built and modernized in multiple ways?
I am Priyanka Vergadia, developer
advocate here at Google Cloud.
And today, let's see what your options
are to build a digital e-commerce platform on Google
Cloud.
You ready?
Let's go.
[MOTOR SPINNING]
First, you can build your own e-commerce platform
on Google Cloud.
Why does this make sense?
Because it provides the agility to create new capabilities
using data insights and access to machine learning and AI
tools within Google Cloud.
There are two ways to build your own platform.
You could either migrate your existing e-commerce platform
or modernize using containers.
Migrate means lifting and shifting your current platform
as-is into the Cloud.
This is the lowest risk and fastest way to get to Cloud.
It is suitable for custom built e-commerce stack
leveraging heavy OSS or running on premises.
And once you've migrated, you are on your path
to modernization.
You could choose to migrate and improve
where you can upgrade and improve or optimize
using containerised approach.
This means you're willing to move to containers
and are gradually moving to Google Cloud managed
services, such as GKE.
It sets the stage for a more seamless modernization path
to microservices on GKE.
If the goal is to modernize your commerce application
platform completely for benefits of Cloud and speed to market,
then you would re-architect to adopt containers using
microservices architecture.
This helps you shift focus to creating
those differentiated customer experiences for digital
and omnichannel revenue growth.
We'll come back to architect, the commerce migration
and modernization, but before we do that,
let's also check out the other options.
The second option is, you can create a headless commerce
platform on Google Cloud.
This is where you actually decouple the front end,
the mobile app, the CMS, et cetera, from your back end
or your commerce layer.
This approach provides flexibility
to your marketing teams to quickly alter
front-end elements to run campaigns, promotions,
and create most advanced customer experience
on your front end.
You're building front-end experience on Google Cloud
and are integrating with commerce
back ends from Google Cloud marketplace offering partners.
This unique approach offers the benefits of the agility
to launch or change highly personalized experiences,
flexibility to upgrade, update, or replace
your dependent systems, and scale
different parts of solutions independent of each other.
As you can imagine, this approach
has a low total cost of ownership, smaller IT teams,
and is not constrained by a monolithic roadmap
and timelines to offer new storefront features.
Third option?
You could use out-of-the-box SaaS solution on Google Cloud
marketplace, such as Shopify, BigCommerce, or HCL Commerce.
This will work for you if you require minimum customizations
and can take advantage of Google Cloud for customer 360
and data insights-driven analytics.
Which of these approaches are you
leaning towards to build your e-commerce platform, and why?
Share in the comments.
Let's dive into the first two approaches--
build your own and headless commerce-- one by one
to understand what it takes to build
and which one makes sense for your use case.
Now let's architect the build your own,
migrate, and improve approach.
This means you're not just migrating but also
looking to break down a legacy monolith commerce
application into a set of microservices that can help you
gain agility in launching those new features in a way
to improve customer experience by leveraging
data insights that are powered by AI and ML capabilities.
In order to do this, you're going
to need to migrate and improve using containerization
on Google Kubernetes Engine.
Let's see how.
You would deploy your application servers
and your database as services and containers inside a GKE
cluster.
You can accelerate this process of moving to GKE
by using Migrate for Anthos, Google's migration automation
tool.
All your static content--
including the images, media assets,
web files-- will be stored in Cloud Storage.
Any other application systems that still exist on premises
will be hooked up via a dedicated interconnect Cloud
VPN or API management.
Now let's see the request flow.
The user makes a request from their phone,
website, or chat application, which
then gets resolved by cloud DNS to a global any past IP address
for Cloud Load Balancing.
Cloud Armor works alongside Load Balancing
to provide DDoS protection and web application
firewall that detects and blocks layer 7 attacks.
reCAPTCHA Enterprise provides bot protection.
And API defense provides protection for abuse of APIs.
Combination of Cloud Armor, Apigee API defense,
and reCAPTCHA Enterprise offer the web application
and API Protection.
Once the request is validated by these,
it is then sent to the web server.
The web server then grabs the static content--
such as your images, CSS, your JavaScript--
to render that page from Cloud Storage.
It also stores them in Cloud CBN for next request, which helps
with performance and latency.
Next, web server would need to interact
with the app server for business logic, such as,
is this item in-store?
The internal load balancing between the web and application
servers help distribute the load.
Once the request lands on the app server,
it interacts with the database to get the response.
Yes, the item is in-store, and there are four more
left, or something like that.
Gets this information and then sends it back
to the user via web servers.
Now, if the request requires the app server
to gather information from a service that is on-premises,
then it can make a call to the service via an API
through Apigee API gateway or VPN
over the internet or just direct connectivity
to that data center.
If the request was a surge or recommendations, then
app server interfaces with the Google retail search
or the recommendations API to present the appropriate results
to the user.
Architecturally, build your own, migrate, and improve
provides you the flexibility to add features, ability
to scale easily by adding more GKE clusters during traffic
spikes.
It also offers applications the security
using a combination of Cloud Armor, Load Balancer,
reCAPTCHA, and API defense.
From the business perspective, the build your own
and migrate and improve approach enables the integration
with the data platform which creates
a strong closed loop between the data platform and the commerce
platform.
You can collect the first party customer data
from shopper interactions on their modern digital commerce
platform to use in your data platform
for predictive analytics and marketing activation.
You can also gain insights from data in data platform
to offer personalized shopping experiences and promotions
on the digital commerce site.
Are you ready to migrate and improve?
We've got a link to the documentation below
to help you out.
Now, how would you architect your migration as-is
or lift and shift your e-commerce platform
to Google Cloud?
Say your priority is to move to Google Cloud
as quickly as possible or you have a homegrown OSS
stack based on-premises, an e-commerce platform that
is unique and works well and you just want to migrate.
That means you just want to migrate as-is
without making any changes.
Just get to the Cloud so you can take that first step
towards modernization.
For an as-is migration like this,
we recommend migrating to Compute Engine
virtual machines.
Let's see how to architect this.
Your request flow pretty much stays the same,
except for your web and application
servers and your database.
You will create your web and application servers
on Compute Engine managed instance groups, which
will scale based on the number of requests you receive.
You will also deploy your primary and secondary databases
on Compute Engine instances.
This architecture offers the ability
to scale the web and app tiers independently using the managed
instance groups and provides low-latency responses back
to the end customer to keep them engaged in their buying
journey.
You have the same application security
using a combination of Cloud Armor, Load Balancer,
reCAPTCHA, and API Defense.
In addition, it allows you as a retailer
to quickly meet unexpected user traffic spikes without having
a large-sized deployment initially,
but automatically scale easily up and down enabled
by your configuration policies.
Are you ready to migrate your e-commerce application as-is?
We've got a link in the documentation to help you out.
Now, let's say you have migrated to Google Cloud using
GKE or Compute Engine, or you're building
an entire modernized e-commerce platform from scratch.
How would you go from here to modernized, fully-containerized
microservices architecture?
Let's see.
All your requests flow stays the same as you saw earlier.
What changes is that now you're going
to think about smaller services and separate them out
into four layers--
presentation layer, which could be your single-page application
builder and content; a services layer, which would include
services, such as sessions, search, account, inventory,
orders, and anything else that you can think
of; the storage layer, which would be your storage
choices for those services.
There could be different storages
based on the kind of service--
for example, Cloud SQL or Spanner for inventory products
and maybe Firestore for sessions.
Cache layer would be your transient cache
using memory store to access recently queried data
without querying the storage layer again.
You can now see the flexibility that this architecture allows
you to have.
You can add and deploy any new services any time
without affecting any other services.
You can also have different teams
working on different services in different programming
languages.
Lots more flexibility both from the development side
and from the business side, which
leads to happy developers and happy customers.
And you have enabled your business
to have a strong closed loop between the data
platform and the commerce platform
to understand customer behavior and offer personalized
experiences.
Another huge advantage of this approach
is the seamless integration with other Google Cloud Services,
such as Workspace, Maps, G Pay, mobile, Android,
Chrome devices, and more.
Are you ready to start your e-commerce modernization
journey?
We've got a link to a sample code repository for you
to get started.
Now, let's take a deep dive into the headless commerce solution.
As a retailer, you might want to own and control
the front end for providing an engaging and differentiated
shopping experience and leverage the ready-to-use back-end
commerce building blocks for capabilities,
such as product catalog, pricing, promotions, cards,
shipping, accounts, and other things.
In this fast-paced world where user behavior changes
every day, headless commerce approach
is increasingly preferred for speed-to-market.
You can easily launch new experiences quickly and benefit
from innovations in back-end capabilities
added by our partners on Google Cloud Marketplace,
such as Commerce Tools.
How would you architect this?
Well, let's see.
The user would have the same secured experience
using web application and API security solution.
The front end is deployed on GKE or Cloud Run
and can use Cloud Storage for static assets,
and Firestore or Cloud SQL for your dynamic storage
and database options.
Interacting with the recommendations API
and retail search for an engaging product discovery
and shopping experience, that would reduce search abandonment
and increase sales conversions.
Commerce tools platform from Marketplace
serves as the back end for commerce operations.
It provides over 300 APIs for e-commerce back-end needs,
such as your products, categories, orders,
and other such things.
This approach is an alternative to build or buy approach
as it offers a right mix of both approaches
to realize a solution that enables brand differentiation,
flexibility, and agility.
To help you get started with headless commerce,
we've built an end-to-end demo.
Check it out below and let us know how it goes.
We just looked at the different options
to build a modern e-commerce platform on Google Cloud.
Depending on your situation, you can
choose to migrate as-is to Compute Engine VMs,
migrate and improve using containers,
build an entirely modern microservices-based
architecture creating containerized services,
or use partners offered services to adopt headless commerce
approach.
Any direction you take is a success and a great start
to gain agility in launching new features,
innovation, and improving customer experience
by leveraging data insights powered by AI and ML,
and tools, such as retail search and recommendations AI.
Now, it's your turn.
Go build the headless commerce demo
with the documentation and a full sample
code repository linked below.
If you like this video, then I hope
you completely destroy those like and subscribe buttons
to let us know.
I cannot wait to build more stuff with you.
[MUSIC PLAYING]