Skip to main content

How to design & develop REST microservices in Golang (Go)

20h 26m 49s
English
Paid

Course description

In this second part of the series I'm working with MySQL, Cassandra and Elasticsearch as persistence layers and we're going to create 3 different microservices using different design patterns: MVC, featured MVC and Domain Driven Development implementing the Hexagonal architecture.

Read more about the course

At the end of the course you'll learn:

  • How to structure our application's packages and code.

  • MVC pattern, Domain Driven Development and Hexagonal Architecture applied!

  • How to configure MySQL client in Go. DAO pattern implemented.

  • How to configure and use CassandraDB client in Go.

  • How to configure and use Elasticsearch in Go.

  • Testing and mocking database integrations.

  • Stress test the microservice with goroutines.

  • How dependencies work in Go. Usage of Go modules.

  • How to build, publish, use and share a custom Go library.

  • Application design patterns.

  • Preparing our distributed logging system.

  • Real life examples and exercises.

Requirements:
  • Just complete the Golang tour available at Golang's website
  • Nice to have: Part 1 of this course

Who this course is for:

  • Software engineers.
  • Software developers.
  • Technical leaders.
  • Architects.
  • Anyone who wants to get serious about microservices in Go.

What you'll learn:

  • How to structure and organize your microservice.
  • Domain Driven Development.
  • Hexagonal architecture applied.
  • MySQL integration and configuration.
  • Integrate Cassandra DB in your microservices.
  • Elasticsearch integration and configuration.
  • Logging to standard output and log files.
  • DAO pattern implementation.
  • How to build, publish and use a custom Go library.
  • Testing all the layers of your application.
  • How dependencies work in Go.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 47 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing

Watch Online How to design & develop REST microservices in Golang (Go)

0:00
/
#1: Course goal: What we're going to build

All Course Lessons (47)

#Lesson TitleDurationAccess
1
Course goal: What we're going to build Demo
07:35
2
A quick preview
10:15
3
Create projects in Github
13:20
4
HTTP frameworks
10:12
5
Basic application structure: MVC pattern
30:10
6
Starting from our domain
46:35
7
How to structure our domain persistence
41:08
8
Working with dates
21:05
9
Configure MySQL client in Go
29:39
10
How to insert rows
26:42
11
How to read rows
14:59
12
How to handle MySQL errors
33:31
13
How to update rows
33:39
14
How to delete rows
21:43
15
How to find rows
51:43
16
How to marshal structs
33:04
17
Services structure
25:34
18
No logging system
38:08
19
OAuth authentication
11:28
20
Domain Driven Development
18:21
21
DDD - Starting with the domain
27:58
22
DDD - Project structure
36:27
23
Introduction to Cassandra DB
10:56
24
Cassandra Go client
22:11
25
How to insert, get and update records
29:58
26
Tune our get session implementation
05:51
27
Authenticating users
11:28
28
Generating access tokens
57:12
29
Different requests for the two APIs
15:37
30
Creating a shared OAuth library
52:46
31
How dependencies work: go get & dep
17:13
32
Defining transitive dependencies
06:32
33
Creating a shared utils library
26:42
34
Application structure: MVC & gorilla/mux
47:01
35
Configure our mux router
36:25
36
Introduction to Elasticsearch
12:11
37
Adding ElasticSearch client
29:45
38
Index documents in ES
38:59
39
Moving our logger to the utils library
33:04
40
Improving our errors library
32:47
41
Vendoring all of our APIs
17:57
42
How to get documents by ID
36:14
43
Searching documents in ES
44:47
44
Homework: Add delete and update endpoints
03:53
45
Testing our application: OAuth client
28:16
46
Use Docker to ship our Items API
24:00
47
Extra class - Take a look at my online content
01:48

Unlock unlimited learning

Get instant access to all 46 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Build a Google Analytics in Go

Build a Google Analytics in Go

Sources: Dominic St-Pierre
This course assumes you've taken my Build SaaS apps in Go course or are familiar with Go's standard library for building web applications.
7 hours 18 minutes 48 seconds
Redis Internals

Redis Internals

Sources: Arpit Bhayani
This is a self-paced course in which you will study the internal workings of Redis by re-implementing its key features in Golang. Together we will...
9 hours 6 minutes 41 seconds
Let's Build a Go version of Laravel

Let's Build a Go version of Laravel

Sources: udemy
Laravel is one of the most popular web web application frameworks in the PHP world, and with good reason. It's easy to use, well designed, and lets developers w
19 hours 22 minutes 16 seconds
Building Production-Ready Services with gRPC and Go

Building Production-Ready Services with gRPC and Go

Sources: ByteSizeGo
The course "Building Production-Ready Services with gRPC and Go" covers the development of high-performance services using gRPC and the Go language. It...
11 hours 23 minutes 33 seconds
How to develop a productive HTTP client in Golang (Go)

How to develop a productive HTTP client in Golang (Go)

Sources: udemy
Have you ever called a REST API from your Go program? Did you implemented your own HTTP client or did you ended up using some of the thousand libraries out there? Do you know wh...
9 hours 44 minutes 29 seconds