Beginners guide to microservices with Go, Spring and RaspPi
4.3 (3 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
47 students enrolled

Beginners guide to microservices with Go, Spring and RaspPi

Home-made monitoring system with Raspberry Pi and microservices.
4.3 (3 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
47 students enrolled
Last updated 10/2019
English
English [Auto-generated]
Current price: $15.99 Original price: $24.99 Discount: 36% off
17 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 46.5 hours on-demand video
  • 1 article
  • 25 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • With this course you will learn what microservices are.
  • What are differences between "classic" monolithic applications and microservices.
  • You will learn how to plan, design and implement microservices based on Golang.
  • I will show you how to combine netflix's discovery service (eureka) and zuul gateway with Go-based microservices.
  • You will also learn how to dockerize created microservices and run them on Raspberry Pi.
  • How to write simple sketch in Arduino IDE to report temperature measurements (from DS18B20 sensor and ESP8266 board) in microservices-based application.
Requirements
  • Basic development skills
  • Basic Go knowledge
  • Basic Java knowledge
  • Will to start exploring IoT
Description

This course starts with introduction to microservices in context of "classic" monolith applications. It explains how to combine two different frameworks (Spring and Go), to use their strong sides on very small, but also pretty strong hardware - Raspberry Pi.

It shows  how to combine simple sensors with ESP8266 Wifi modules and collect measurements from many places and use microservices to create small but yet complex application with dashboard, searching and simple configuration.

Finally in this course you will learn a little bit about docker and how to compose your microservices as good as your angular ui application into docker containers, which can be then stopped/restarted/rebuild/replaced easily within couple of steps. 

I hope you will enjoy learning from the course as much as I have  had fun creating it.

Who this course is for:
  • Developers interested in microservices, Golang, Raspberry Pi and microcontrollers.
  • Hobbyist who wants to explore capabilities of Raspberry Pi.
  • Hobbyist interested in monitoring their own house with self-made monitoring system.
Course content
Expand all 308 lectures 46:29:16
+ Getting started
6 lectures 01:14:34

Hello everybody! In case you are impatient and want to try the code right away, you can simply grab the code from the repositories and start running it on your raspberry pi. In case you are willing to learn a bit, and have the will to get in touch with more details about the system, please follow the lectures, or select the sections which are closer to your heart. Both ways are ok. And if you select to choose the first one (with starting to run the code right away) - try to explore the code by your own, try to brake some parts, then fix them, and brake another parts. I think that the best way to learn something is by simply experimenting with code, braking it, making some parts to fail and figuring out, why they are failing, and eventually fixing them.


Whatever way is yours - try to be opened and experiment.

Github repositories
02:27

This lecture makes an overview of the final, working application, so that you will get the feeling of what is going to be build with this course.

Preview 12:10

This lecture shows you how the monolithic application is build, so that you will know the context from where microservices came out, and what problems they are aiming at.

"Classic" monolithic applications
17:28

This lecture describes basics of microservices. You will get the feeling of the elements which are used to solve different kind of problems, which will arrive when you start building your first microservices-based application.

What are microservices?
13:29

This lecture shows parts of our xdevices applications. Their correlation, their main responsibilities and how all elements will be combined together.

Preview 21:41
+ Setting up
4 lectures 01:14:11

Short introduction how to setup windows machine for development, following cheat-steps document.

WIndows setup
16:17

Short introduction how to setup mac for development, following cheat-steps document.

Mac setup
18:49

Introduction how to setup Raspberry Pi to make it ready for development and running xdevices application.

Raspberry Pi setup
36:55

Introduction to creation of github repository.

Creating github project
02:10
+ Service discovery
6 lectures 01:28:53

In this lecture we will explore service discovery subject. Let's find out what service discovery is, and what is it's place in our system we are building.

Introduction
12:14

In this lecture we will explore the docker. We will find out, how we are going to use docker within our xdevices applications and what is it really about to use docker-compose.

Docker images for Pi
27:51

In this lecture we will create our first spring boot application with spring initializer.

First spring boot application
06:34

In this lecture we are to transform our spring-boot application from previous lecture into eureka discovery service.

Transforming into eureka service
11:35

In this lecture we are going to dockerize our eureka discovery service.

Dockerizing eureka service
17:20

In this lecture we are about to test our eureka service with docker on raspberry pi.

Testing eureka service
13:19
+ Management of building and deploying docker containers with Jenkins
5 lectures 37:21

In this lecture I explain why we need automation and what tools we are going to need and use for automation.

Introduction
05:42

In this lecture I am about to show you steps needed to install and configure jenkins on our system.

Installing and configuring jenkins
09:11

In this lecture we are going to build our first jenkins job for building our discovery and image.

Job for building discovery
09:45

In this lecture we are going to build a jenkins job for starting containers from created images.

Job for starting containers
06:32

In this lecture we are going to build a jenkins job for stopping running containers.

Job for stopping containers
06:11
+ Proxy Gateway
3 lectures 36:27

In this lecture we will shortly discuss what gateway proxy is.

Introduction
04:42

In this lecture we are going to create and configure zuul proxy gateway.

Zuul proxy gateway
19:16

In this lecture we are going to prepare Dockerfile for proxy and job in jenkins to build proxy image.

Dockerizing proxy service
12:29
+ Docker compose to bind them all
5 lectures 29:27

In this lecture we are about to create docker-compose to bind our services together. Additionally we are to create jenkins job to start docker-composed services.

Creating docker-compose and corresponding jenkins job
12:56

In this lecture we are going to create jenkins job for stopping all running containers.

Job for stopping running containers
04:30

In this lecture we are going to clean up our jenkins from unwanted jobs.

Cleaning jenkins jobs
01:44

In this lecture we are about to install Multijob plugin, as preparation for building small automation pipeline for xdevices.

Multijob plugin
02:28

In this lecture we are about to create multijob pipeline for building and starting xdevices services.

Building automation for xdevicesdev
07:49
+ Go services prerequisites
21 lectures 03:05:32

In this lecture we are going to talk about some of the great resources about golang and some of very important principles in programming: KISS, SRP and DRY.

Introduction
09:28

In this lecture we are going to create utilities repository out from attached resources: utilities.zip

Utilities - setup
03:09

In this lecture we are about to install tour of go locally.

Utilities - go tour offline
02:32

In this lecture we are about to configure pretty nice feature of IntelliJ - file watchers for go.

Utilities - configuring file watchers in IntelliJ
02:27

In this lecture we are going to talk shortly about packages, imports and exports.

Utilities - go: packages, imports, exports
08:08

In this lecture we are about to talk how to create a function and about basic conventions in go regarding functions.

Utilities - go: functions
04:30

In this lecture we are about to create simple "serviceone" service, where we are going to discuss main package and init() function.

Utilities - go: init() function
04:48

In this lecture we are about to discuss IsUuidValid function from utilities package.

Utilities - IsUuidValid func
17:50

In this lecture we are about to discuss IsZero function from utilities package.

Utilities - IsZero func
06:30

In this lecture I challenge you to prepare at least 4 tests using the tools and libraries described in previous lectures. It's about creating IsZero tests for reflect package and for our IsZero function.

Utilities - IsZero func challenge
03:31

In this lecture we are going to discuss solution for the challenge from previous lecture.

Utilities - IsZero func challenge solution
13:09

In this lecture we are about to take a look into GetIP function from utilities.

Utilities - GetIP func
06:40

In this lecture we are about to look into registration ticket of proxy service, and shortly discuss which parts are needed for our registration ticket implemented in go for our services, so that they can be also registered in eureka service discovery.

Utilities - Eureka's registration ticket: introduction
10:05

In this lecture we are going to get known with golang's struct.

Utilities - go: struct
05:41

In this lecture we are going to talk about concept of composition in Go.

Utilities - composition
08:19

In this lecture we are about to talk shortly about channels, and for what we need channels.

Utilities - go: channels
05:04

In this lecture we are about to look into details of registration ticket from utilities.

Utilities - Eureka's registration ticket: implementation
20:47

In this lecture we are about to take a look at configuration manager.

Utilities - config manager
15:38

In this lecture we are about to take a look into Eureka manager from utilities.

Utilities - Eureka manager
17:42

Let's start with a challenge. Create a small go application, which will use Eureka manager from utilities and register itself in Eureka discovery service running on raspberry pi. And which is going to send heartbeat every 15 seconds.

Utilities - "Service one" challenge
03:08

In this lecture we are about to discuss our solution for "service one" service from previous lecture.

Utilities - "Service one" solution
16:26
+ Dispatcher (backend)
9 lectures 01:22:34

In this lecture we are going to talk a little bit what is in our target in this section. And what we are about to achieve in this section.

Introduction
14:18

In this lecture we are about to setup our new github repository for dispatcher.

Setup
01:09

In this lecture we are going to implement our config manager.

Config manager
06:06

In this lecture we are going to implement and prepare our dispatcher's eureka manager.

Eureka manager
03:36

In this lecture we are going to jump into echo framework, with which we are about to create our first rest endpoint handler - the ping handler.

Ping handler
07:45

In this lecture we are going into developing another handler - temperature handler - which is going to process incoming messages from sensors. It's the first draft of the handler, so it's logic is pretty simple right now.

Temperature handler
11:18

In this lecture we are binding all previous parts into one, runnable unit - dispatcher.go file, where eureka manager is going to be initiated and echo framework finally is going to be used to define our REST endpoints.

Main function & init
06:37

In this lecture we are going to prepare Dockerfile and run.sh script for our dispatcher. And we are going to configure a job, which is going to create dispatchers image.

Dockerizing
23:40

In this lecture we are about to see our dispatcher instances in action. With one instance running on Pi-box, and one running on local development machine, we are going to ping dispatcher (with postman) with using their proxied url. We are expecting to get different IP's as results.

Testing two instances of dispatcher agains discovery service
08:05
+ Temperature sensor with ESP8266
6 lectures 01:27:53

In this lecture we are going to review  some of the wifi boards available on the market and some of the gears we are going to use for building our sensor unit.

Introduction - ESP8266 boards and other gears
16:37

In this lecture we are going to concentrate on what parts do we need and how to connect them together to build sensors units. We will talk about two possible variations of sensor units - one with D1 mini Pro, and one with Wemos Lolin board.

Basic schematics
19:17

In this lecture we are about to discuss our sketch for esp8266 which is capable to go into deep sleep. Sketch is also attached as resources for this lecture, so grab it and have a closer look into it. You will have to adjust your variables in the sketch to make it work with your home-network of course (so adjust ssid and password respectively)

Arduino IDE sketch for deep sleep capable esp8266
16:12

In this lecture we are going to overview our first D1 mini Pro sensor unit. And we are going to flash it with sketch from previous lecture (for deep sleep capable boards) and test it with our dispatcher running on raspberry pi.

D1 mini Pro-based sensor unit - overview and testing
16:27

In this lecture we are going to discuss sketch for boards, which are not capable of deep sleep mode (without power saving mode). Sketch is also attached as resources for this lecture, so grab it and have a closer look into it. You will have to adjust your variables in the sketch to make it work with your home-network of course (so adjust ssid and password respectively)

Arduino IDE sketch for deep sleep NOT-capable esp8266
09:59

In this lecture we are going to overview our LoLin based sensor unit, and flash it with sketch from previous lecture (for boards not capable of deep sleep mode) and test it with our dispatcher running on raspberry pi.

LoLin-based sensor unit - overview and testing
09:21
+ Temperature simulator with spring boot
6 lectures 42:00

In this lecture we are going to prepare our next spring boot application - temperature simulator.

Introduction and setup
04:57

In this lecture we are going to implement ErrorMsg class - with short introduction to lombok library. And also BadRequestResponseErrorHandler, which is going to be used to intercept all BadRequest responses.

Implementing ErrorMsg and BadRequestResponseErrorHandler
07:14

In this lecture we are about to overview how our TemperatureSimulator is constructed and what are the crucial parts of it, so that those parts will make it work.

Overview of TemperatureSimulator class and enabling scheduling in simulator
20:22

In this lecture we are going to simply run our simulator and test it against dispatcher running on Pi.

Testing against running dispatcher on Pi
03:11

This is a challenge for you. So get ready and prepare a simulator, which will send invalid uuid. Use already existing code to create @Scheduled annotated method.

Invalid temperature sensor simulator - challenge
01:16

In this lecture we are going to implement solution for our invalid sensor simulator and test it against dispatcher on RaspPi.

Invalid temperature sensor simulator - solution
05:00