Enhance Applications with Edge Computing
Edge computing is a technology that brings data storage and processing closer to the source of data —the edge of your network. The use of edge computing introduces several advantages, mainly reduced latency, increased security, and improved scalability.
Using Azion services and products, it’s possible to demonstrate how an e-commerce application’s shopping cart feature can be moved to an edge computing environment. The proposed serverless approach integrated with other edge capabilities offers high performance, scalability, and reliable data transactions.
Enhanced Applications Architecture
Dataflow
-
The user accesses the domain, which represents a service running on Azion’s edge computing platform.
1.1. The request is directed to an application running in the cloud via the respective path.
1.2. The request is routed to an application running at the edge through the corresponding path.
-
The edge application rule, which has been configured to activate an edge function, is triggered. This edge function, developed in JavaScript and deployed onto the Azion Edge Platform, runs the logic for the shopping cart.
-
Operations requiring database transactions (like adding, updating, or removing items from the cart) are accomplished with Edge SQL. This reduces latency as these operations are performed closer to the user. The static content (like product details, images, etc.) if any, will be stored in Edge Storage, reducing latency and costs by allowing for faster retrieval and reducing the load on central servers.
After this process, the application returns a response to the request.
Components
- Edge Application: set up an edge application to configure delivery and cache policies, create rules to automate cache policy assignments based on content type, and determine how content is cached.
- Edge Functions: allows you to create event-driven, serverless applications, at the edge of the network, closer to users.
- Edge Storage: a scalable and secure storage service designed to integrate object storage with the Azion Edge Platform using the S3 standard for object operations.
- Edge SQL: an edge-native SQL solution designed for serverless applications. It’s fully ACID-compliant and utilizes SQLite’s SQL dialect to provide a familiar development environment, facilitating fast integration.
Implementation
- Create an edge application:
- Create an edge function and instantiate it in the recently created application.
- Create a domain and associate it with the edge application:
- On Console, create a domain using the + Create button on the homepage.
- Using the Azion API to create a domain.
- If you created an application through a template, the domain is created for you.
- Test and monitor your edge application.