In this tutorial, we’ll be writing from scratch a fully-functional Data microservice, using the patterns and mechanisms available in the Pip.Services toolkit, as well as the programming language you have selected. The microservice that we are going to be using as an example in this tutorial is called [The Beacons microservice], which is part of [The IoT Microservices Collection]. This microservice is meant to perform the following simple tasks:
Imagine the following situation: you are walking through a building that has beacons installed at various locations throughout the entire building. These beacons are broadcasting signals via bluetooth, at regular time intervals, which can be “seen” from about 200 feet away. The beacons, along with their positions, are stored in our microservice. When your smartphone starts “seeing” some of these signals, it sends a list of the beacons it “sees” to the microservice, which then calculates the position of your phone as being in the middle of the beacons it “sees”. Simple, but effective - wouldn’t you agree?
The Beacons microservice that we are going to be developing will consist of a number of loosely-coupled components, following the componentized microservice design. The structure of this microservice is displayed on the diagram below:
To make it easier to follow along, we’ve divided the tutorial into the following 7 steps:
Let’s get started! Head on over to Step 1. Setting up the project.