Skip to Content
This is the Beta version of our new Learning Paths approach. Please email feedback.
Web 3.0 DAppService Oriented Architecture

Service Oriented Architecture

When writing programs, functions are a way to allow a set of instructions to be called from other parts of the program or other programs. Imagine a function in one program that could be called from another program over the network, a local network, or the Internet. This function would return some data to the calling program, which is required for its processing. This mechanism to allow one program to request and receive data from another program is referred to as an Application Programming Interface (API).

The architecture used by such applications is known as Service Oriented Architecture (SOA). Each program that provides specific functionality that other programs can use is referred to as a service or microservice (depending on the granularity of the function). Just as functions, microservices accept input parameters and return output values after processing or simply fetching them from a database. The calling program will call microservices in the desired sequence to complete a transaction.

APIs and Microservices

This solution will require the following components of an SOA:

  • Microservices, the set of functions that will be called by mutliple other components to perform some task such as filtering sensor data, writing and reading data to and from the database and the Smart Contract, and calling cloud services such as AWS Image Rekognition. We will be using a service from AWS known as Lamda Functions to deploy microservices.

  • The Application Programming Interfaces (APIs), which will be used by the microcontrollers to call the AWS Image Rekognition service and by the web app to write and read data to and from the database and the Smart Contract.

  • The API Gateway, which will host the API endpoints and make them accessible over the Internet. We will be using the AWS API Gateway to setup the APIs.

  • The AWS IoT Platform, which is where microcontrollers will post the sensor data.

This sections shows you how to set up an API Gateway, configure the API endpoints, and write and deploy microservices used in this solution.