Applications and Architectures

Robust. Scalable. Secure.

Weather

The Weather application is a highly scalable and completely serverless application hosted in AWS. The application consists of a React SPA, or single-page application, user interface which interacts with the LEANSTACKS REST API to obtain weather forecast information. The REST API is backed by a suite of serverless microservices in AWS Lambda. The microservices store information in highly scalable DynamoDB tables.

Open the Weather application.

Architecture

Weather Application Architecture Diagram

Features

Content Delivery Network (CDN)
All requests for the Weather application are serviced by an Amazon CloudFront CDN. Requests to fetch both static and dynamic resources, i.e. API calls, are routed to the CDN. Rules within CloudFront determine where requests are routed. Static resources, such as JavaScript and HTML for the Weather UI, are served from Amazon S3 buckets. Dynamic content, such as REST API calls, are routed to the Amazon API Gateway. Since CloudFront CDNs are hosted at Amazon edge locations around the globe, there is much lower network latency by routing all requests across Amazon's high-speed networks rather than traversing the Internet.

React SPA User Interface
The Weather UI component is constructed using modern, single-page application technologies and techniques. The foundation of the technlogy stack is the React Framework.

REST API
The UI obtains data from the LEANSTACKS REST API. The REST API is implemented in Amazon API Gateway. The Gateway authenticates requests with AWS Lambda Authorizers before routing the requests to backend services.

Microservices
The business functionality is implemented in fine-grained, domain-specific microservices. The microservices are deployed as AWS Lambda functions. The Lambda functions utilize microservice design patterns such as Robust API, Gatekeeper, Aggregator, and Circuit Breaker. Each microservice is authored in JavaScript and uses the Node.js 8.10 runtime. The Serverless Framework is the foundation of the DevOps and application technology stacks.

Database
Amazon DynamoDB tables serve as both a cache for third-party vendor APIs and as a transactional database. DynamoDB is inexpensive to operate, highly scalable, and serverless.

Screenshots

Technology Stacks

User Interface
  • React
  • Redux
  • Moment
  • Lodash
  • Bootstrap
  • FontAwesome
  • Babel
  • JavaScript
  • Webpack
Services
  • AWS SDK
  • Express
  • Moment
  • Lodash
  • Node.js 8.10
  • JavaScript
  • Serverless Framework

Try it on LEANSTACKS  Weather.