- Hi, I'm Mahin from AWS.
- Hi, I'm Hamza from Salesflo,
and "This is My Architecture".
- So today we are talking about a serverless architecture
that helps with building and customizing workflows
for large organizations.
So Hamza, talk to me about the customer challenge
that led to the solution.
- Sure, for businesses spread
over large geographical landscapes,
effective compliance control monitoring
and visibility is crucial for growth.
For example, consumer good companies
hire hundreds or thousands of field forces
to improve product visibility in stores,
and any delays, for example, in replacement of stocks,
can lead to losses.
This is where Salesflo Engage comes in.
It helps to effectively manage on-ground operations
by providing live visibility
into any task that's performed,
and actually gives insight
that help empower informed decisions.
- Let's dive in.
- Sure.
So there are two parts of the application.
First is the web application that is used
to configure workflows and journey plans.
So let's dive straight into that.
So the domain is hosted onto Amazon Route 53,
and then we have API Gateway
that serves as the communication between the front-end
and the back-end of the application.
API Gateway then invokes the back-end processing
through AWS Fargate and Lambda.
So we use a AWS Fargate for more complex
and long-running jobs,
such as data validations and image processing.
- And what about jobs that don't take long?
- So we use AWS Lambda for short-running jobs,
such as transactional data processing,
could be add, update, delete
of operations of the web application itself,
and it is actually connected through Amazon RDS
to store their transactional data.
We also have ElastiCache for frequently accessed data
so that we don't go on to throttle the database.
- So what sort of volumes are we talking
when you use ElastiCache?
- Absolutely.
So we have observed that at peak load times,
it can be a million concurrent users.
Hence it makes a lot of sense to use it
for frequently accessed data,
such as session management and user permission,
so that we don't end up throttling the transactions
onto the database.
- Now, coming to the mobile application there,
help me understand, how does a user get access to the data?
- Absolutely.
So the mobile application is sending large streams of data
such as the workflow analytics data
and the user-tracking data.
So we reliably ingest that data using Kinesis Firehose,
and Firehose actually natively backs up that data
onto an S3 bucket.
We also have AWS Lambda.
So what happens is the Kinesis
actually then aggregates that data
and sends the payload onto a Lambda function,
the Lambda function passes that data
and passes onto a state machine
that is configured using AWS Step Functions.
So whatever workflow
that was designed on the web application
is actually modularly configured at the back-end
through AWS Step Functions.
So these configurations could be something as,
like alarms for the users for key business metrics.
So whenever the thresholds for those metrics are breached,
the Step Function notifies the Simple Notification Service
to prompt the user to take some action.
So these prompts could be through email,
or SMS, or from the mobile application as well.
- Okay, fantastic.
And you've got dashboard and reporting
for the web application there, and there is Athena and Glue,
so help me understand the purpose for Athena and Glue here.
- Absolutely.
So the data is also then sent to Lambda,
which is stored onto a relational database for safekeeping.
And then actually, what Kinesis does very interestingly
is to send that data in a consolidated manner
into Amazon S3.
So let me just go and draw a line here.
And what it does interesting
is to actually convert the data into Apache Parquet format,
which is a big data-ready format,
and it actually compresses the data by 90%.
This helps us to actually make analysis later on.
So Amazon S3 then acts as a foundation for data lake,
and we use Amazon Glue to actually,
as a crawler actually to identify, classify that data,
and then to catalog it.
Then we use Amazon Athena
to actually query that data on-demand.
What happens is when the application user
wants dashboards or reporting,
it can go and queue the Amazon Athena,
and it can get the data on demand from S3
without the need of actually provisioning
long-running EMR clusters or warehouses.
- Fantastic.
So Hamza, obviously, using dashboards and reporting,
one of the main activities is efficiency gains.
So what stats can you quote
in terms of what the customers have been able to achieve?
- I think with enhanced visibility of data and reporting,
customers are actually able to improve
their field force performance by 30%,
primarily focusing on two key metrics,
that is the infield time spent and better market coverage.
- Fantastic.
Hamza, thank you for walking us through
the fantastic architecture you've built here
for workflow management.
And thank you for watching "This is My Architecture".
- Thank you.