
Learn to build a microservices application with Go and GOPAC, featuring a JavaScript front end, a back-end-for-front-end, and two microservices—high score and game engine—connected via GOPAC.
Compare monolithic and microservice architectures, where monolith uses a repo with data access, while microservices use independent services with separate databases to isolate failures.
Explore a JavaScript reaction game that records click times and adapts difficulty via backend logic, enlarging targets when slow and shrinking them as you improve, with a focus on deployment.
Explore the architecture of a JavaScript game app featuring a frontend, a high score microservice, a game engine microservice, and a DFS backend-for-frontend that connects front end to back end.
Learn practical tips to maximize this course: use reading links, plan your own application idea, and adjust video speed. Use Stack Overflow to troubleshoot and build your developer profile.
Install git and set up a GitHub account to manage your course code, with GitLab or Bitbucket as alternatives. Install go (go 1.12) and Visual Studio Code for backend development.
Discover why Go, a fast, concurrent, and strictly typed language from Google with garbage collection and memory management, powers scalable services with built-in testing and profiling.
Install go and set up a go workspace under your home directory, with a go folder containing source, package, and other subdirectories; organize projects under github.com with your username.
Create a simple go program with package main, import format, and define func main to print Hello World. Save and run the program to see the output.
Explore Google DEP for dependency management in Go, learn to install and initialize it. Package your project with a self-contained vendor folder using zero log.
Explore how Go interfaces express a defined behavior, where any type that implements the speak function satisfies the human interface and can be used interchangeably.
Learn how the JavaScript game front end shows shapes, starts a timer, records time taken on click, and updates the best score in a self-contained front end with no backend.
Define a Protocol Buffers schema that specifies data types and messages for a typed API. Encode data in binary format to deliver efficient network transmission and enable backwards compatibility.
Explore GOPAC, a high performance RPC framework using protocol buffers for a single server schema, with bi-directional streaming, compression, low latency, and cross-language code generation.
Learn gRPC installations for Go, including installing the Protocol Buffers compiler on macOS, Windows, and Linux, then install go-specific packages and the GOPAC package to connect a server and client.
Provide an overview of the API structure for a microservices architecture with a front-end javascript game and back-end services, get high score, set high score, set score, and get size.
Learn the exact steps to build a gRPC server in Go: define a proto service, generate code with the protocol compiler, implement the interface, and start the server.
Define the high score microservice with protobuf: create api folders, declare v1 profiles, specify getHighScore and setHighScore RPCs, and define request/response messages with backward compatibility.
Generate code from protobuf prototypes with the protocol buffer compiler and Go plugin, producing client and server interfaces and message structs to implement on the server.
Implement a Go-based gRPC microservice that handles set high score and get high score RPCs, defines a server struct, and starts listening on a given address.
Start by opening a port, registering the service, and listening on a given address with a Go gRPC server.
Learn to build a Go gRPC client that dials a server address, constructs a client from the connection, and calls the get high score API, handling context and timeouts.
Learn to manage Go dependencies by keeping them in the project with the dep tool, initialize dep in your repo with dep init, and update dependencies automatically for easy sharing.
Explore Go's error handling patterns by inspecting frequent error checks and logging at multiple points, including custom MySQL messages, to improve robustness and traceability in large backend systems.
Create the game engine proto and pb file, mirroring the high score service, to expose get size and set score functions. Generate code, implement the server, and test the client.
Implement the game engine logic in Go by modeling a four-element scores slice, computing performance trends, and adjusting game size accordingly using getSize and setScore functions.
Implement rpcs for the game engine using Go and gRPC, wire get size and set score to the logic package, and build a new server.
Learn how to start the game engine microservice by copying a serving function, registering the engine server, and starting it with a command line interface, then verify with a client.
Write a test client for the game engine using Go and gRPC, connect to the server with a 10-second timeout, and verify the GetSites RPC response size.
Define a back end for front end resource struct that holds a high score client and a game engine client, then initialize both and route score requests to the api.
Write two functions that create the high score and game engine clients by dialing the server address, handling errors, and returning the client objects with nil error.
Explore how Gin, a Go web framework, routes http requests using a default router and context, mapping url paths like /ping to specific functions and responses.
Implement a gin handler for the m-highscore service that extracts the high score from context, converts it to a float, calls the backend to set and get, and returns JSON.
Develop and wire the game engine handlers in Go to call the get size API and set the score via gRPC, handling context, request/response, and error checks.
Set up routing using handlers to direct front end requests to a microservice with Go and gRPC. Configure addresses and ports, enable IPC calls between front end and backend services.
Check the full connection between the BFF and backend by calling the BFF directly, verify the back-end services high score and game engine respond with default values.
Connect front end to back end via ajax calls to fetch and update the high score and object size, compare scores, and log interactions with the game engine service.
This course includes creation of a Microservices-based javascript game application using Go and gRPC. Especially:
Simple introduction to Go
Introduction to gRPC
Build simple server-client system using gRPC
Create backend Microservices-based architecture of a simple javascript game
Ensure communication among the Microservices using gRPC
Use Git to version control
Use GitHub to store code
I have prepared it using my 2 year experience in Software industry carefully catering to the potential need of a beginner/intermediate level student. This is also useful for a working professional looking to get a good flavour of how Microservices architecture is accomplished using Go and gRPC.