
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 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.
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.
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.
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.
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.
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.
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.
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.