We all want our web apps and APIs to respond quickly and scale to dizzying heights of traffic. The traditional request/response cycle of web applications gets us part way to that goal, but it certainly won't get us to being the next Amazon. Asynchronous messaging is a powerful architectural pattern that will help us avoid fundamental problems with scaling while keeping our CFML apps fast and responsive. In this session, we'll look at how systems like Amazon's Simple Queue Service (SQS) and Simple Notification Service (SNS) - along with similar systems in Azure and Google Cloud Platform - can help you build highly responsive, highly scalable CFML apps and services.
70. var remainingTime = 55000;
do {
var messageProcessStartTime = getTickCount();
// get SQS message, generate and send email, delete message
var messageProcessEndTime = getTickCount();
remainingTime -= (messageProcessEndTime - messageProcessStartTime);
} while (remainingTime gt 0);
Example
81. Kinesis Data Firehose:
Can ingest up to 500,000 records/second
Stores records for up to 7 days
Manages writing to the destination
Can be queried in real-time with Kinesis Data Analytics
Example
84. Amazon Athena:
Query files in S3 with SQL
Store in JSON, CSV, or Parquet formats
Ad-hoc or repeated queries
Pay based on amount of data scanned
Example