Creating a Microservice in Go - Part 1

Developed with
Calculated Systems

Lab Steps

lock
Connecting to the Go Development Environment
lock
Testing the Go API Server
lock
Understanding the Database and Data
lock
Understanding the Routing, Handlers, and Web Server
lock
Implementing the CREATE Operation
lock
Retrieving Data From the Database
lock
Retrieving All the Games

The hands-on lab is part of this learning path

Ready for the real environment experience?

DifficultyIntermediate
Time Limit1h
Students52
Ratings
5/5
starstarstarstarstar

Description

You have a small collection of retro video games and you want to build a microservice API to manage them. In the spirit of microservices, you want to keeping the code base to one entity, games. This microservice will provide functionality to create, get, view, and delete a game entity. Within this lab, you will implement the functionality to create and view these entities. It will also be RESTFUL (reading and writing JSON), and provide endpoints to return a collection of games.

Learning Objectives

Upon completion of this lab you will be able to:

  • Understand Go code basics of creating a web server and connecting to a database
  • Implement web server code and SQL code to create entities in a database
  • Implement web server code and SQL code to retrieve entities from a database

Intended Audience

This lab is intended for:

  • Developers, especially those working with Go
  • Anyone leveraging containers

Prerequisites

You should possess:

  • Basic understanding of the Go programming language
  • Familiarity with basic SQL commands
  • Understanding of the Linux command line
  • Experience with JSON and CRUD APIs is recommended but not required

The following content is sufficient to fulfill these prerequisites:

About the Author
Students4729
Labs31
Courses12
Learning paths16

Calculated Systems was founded by experts in Hadoop, Google Cloud and AWS. Calculated Systems enables code-free capture, mapping and transformation of data in the cloud based on Apache NiFi, an open source project originally developed within the NSA. Calculated Systems accelerates time to market for new innovations while maintaining data integrity.  With cloud automation tools, deep industry expertise, and experience productionalizing workloads development cycles are cut down to a fraction of their normal time. The ability to quickly develop large scale data ingestion and processing  decreases the risk companies face in long development cycles. Calculated Systems is one of the industry leaders in Big Data transformation and education of these complex technologies.

Covered Topics