Courses / Data, AI & infrastructure / gRPC & Protocol Buffers

₹199Self-paced

gRPC & Protocol Buffers

Build a versioned gRPC service and client in Node.js with unary and streaming calls, deadlines, authentication and tests that prove old and new versions still work together.

  • Who it's for. Node.js developers who know REST APIs and want to design typed, evolvable service interfaces with Protocol Buffers.
  • Before you start. Prerequisite course: REST API Design, plus working JavaScript in Node.js (the course language, chosen because the closest neighbouring service course, Node.js and Express API Development the earlier course, uses it and its learners already run node:test and npm scripts.
  • 33 to 57 hours of study with practice
  • 9 modules, 62 lessons
  • 3 guided projects and a final project

What you'll learn

  • Write proto3 schemas with deliberate field numbers, presence, enums, collections and oneofs, and compute the exact wire bytes of small messages by hand.
  • Generate typed Node.js clients and servers with @grpc/proto-loader and its type generator, with pinned options and a drift check.
  • Set deadlines, stop work on cancellation, propagate a remaining budget, choose status codes by cause and decide retries from the code.
  • Secure calls with TLS and metadata credentials and enforce authentication at one point, returning UNAUTHENTICATED and PERMISSION_DENIED correctly.
  • Prove compatibility with golden bytes, a version matrix, a schema-diff gate, status-code contract tests and a release check, and demonstrate a versioned service and client.

Skills you'll gain

  • Protocol buffers
  • Schema evolution
  • Generated clients
  • Unary RPC
  • Streaming RPC
  • Deadlines
  • status
  • Authentication boundaries
  • Operating at the edges
  • Compatibility lab

Tools you'll use

  • Protocol Buffers (proto3)
  • gRPC
  • Node.js
  • @grpc/proto-loader
  • node:test
  • TLS
  • npm

Details to know

  • Certificate on completionIssued after your final project is reviewed
  • 9 module checkpointsA quiz and a practical task close each module
  • Self-pacedStudy any time; your progress is saved

How every lesson works

Each lesson follows the same four steps, so you always know what comes next.

  1. 01

    Watch & Learn

    A short animated video explains one idea at a time.

  2. 02

    Guided Practice

    Work through an example step by step and check the result.

  3. 03

    Quiz & Challenge

    Short questions check the idea has landed before you move on.

  4. 04

    Mini Project

    Build something useful from a project brief.

Learn at your own pace

This is a self-paced course. There are no live classes and no fixed timetable.

  • Start any timeStudy when it suits you. Lessons are short, so they fit around work or college.
  • Pick up where you left offYour progress is saved to your account.
  • Ask when you're stuckUse Ask Mentor inside the learning platform.

Your path in 3 phases

Each phase ends with something you have built and checked.

  1. 01

    Modules 1 to 3

    Schemas and evolution

    Write proto3 schemas, compute wire bytes by hand, evolve schemas safely, and generate typed Node.js clients and servers.

    You build: Guided project: Hand-checked wire format and a safe schema change.

  2. 02

    Modules 4 to 6

    Unary and streaming RPC

    Implement unary and streaming methods with validation and backpressure, then enforce deadlines, cancellation and accurate status codes.

    You build: Guided project: Loopback service with unary and streaming methods.

  3. 03

    Modules 7 to 9

    Security, operations and compatibility

    Secure calls with TLS and metadata credentials, explain health checks and load balancing, and prove compatibility with golden bytes and a version matrix.

    You build: Guided project: Deadlines, status codes and authenticated calls.

Full curriculum

9 modules and 62 lessons, 33 to 57 hours of study

01Protocol buffers9 lessons, 4 to 6 hours

Lessons

  • Anatomy of a proto3 file
  • Field numbers and tags
  • Scalar types and zero defaults
  • Explicit presence with optional
  • Enums with an UNSPECIFIED zero
  • Repeated, map and nested fields
  • oneof for mutually exclusive fields
  • Reading the wire: tags and varints
  • Length-delimited fields, ZigZag and packed repeated

After this module you can

  • Write a .proto file with syntax, package, one message and typed fields, and name what each top-level statement controls.
  • Explain why field numbers rather than names identify fields on the wire, and apply the 1-15 one-byte rule and the reserved 19000-19999 range.
  • Encode strings and nested messages as LEN records, encode negative values with sint ZigZag, and explain packed repeated encoding.
02Schema evolution8 lessons, 3 to 6 hours

Lessons

  • Wire-safe versus wire-unsafe changes
  • Reserving removed numbers and names
  • Changing field types: compatible pairs
  • Enum evolution and unknown values
  • Unknown fields survive binary hops
  • Well-known types: Timestamp, Duration, Empty
  • FieldMask, Any, Struct and why wrappers are obsolete
  • Package versioning and file layout

After this module you can

  • Classify a proposed schema edit as wire-safe, conditionally safe or unsafe using the documented update rules.
  • Use reserved statements for retired field numbers and names and show that reuse is rejected by the compiler or loader.
  • Version a service by package (v1, v2), keep one top-level entry per file, and decide when a change requires a new major version.
03Generated clients6 lessons, 3 to 4 hours

Lessons

  • What generation means: runtime loading versus generated types
  • Loader options that change message shapes
  • Generating TypeScript types with proto-loader-gen-types
  • Creating a client stub and channel
  • Promise wrappers and a typed client facade
  • Regeneration discipline and drift checks

After this module you can

  • Explain how @grpc/proto-loader builds service definitions at runtime and how generated TypeScript types describe those same objects.
  • Predict how keepCase, longs, enums, defaults and oneofs change decoded objects and choose a consistent set for a project.
  • Decide which generated files are committed, add a script that regenerates them and a check that fails when the checked-in output is stale.
04Unary RPC6 lessons, 3 to 4 hours

Lessons

  • Defining a service and an rpc method
  • Implementing a unary handler
  • Calling a unary RPC from a client
  • Validating requests and INVALID_ARGUMENT
  • Designing request and response messages for evolution
  • A loopback integration test with an ephemeral port

After this module you can

  • Write a service block with one unary rpc, a dedicated request message and a dedicated response message.
  • Write a server handler that reads call.request and answers with callback(null, response) or an error.
  • Start a real server on 127.0.0.1 with an OS-assigned port in a test, call it with a real client, and shut both down cleanly.
05Streaming RPC7 lessons, 3 to 5 hours

Lessons

  • Server streaming: write and end
  • Client streaming: aggregate and reply once
  • Bidirectional streaming: independent read and write
  • Ordering inside a stream, none across calls
  • Backpressure: respecting write() and drain
  • Ending streams: end, errors and final status
  • Choosing stream, paginate or unary

After this module you can

  • Implement a server-streaming rpc that writes several messages with call.write and finishes with call.end, and consume it on the client.
  • Implement a client-streaming rpc whose handler reads messages from call and replies with one response in the callback when the stream ends.
  • Choose a unary list with page tokens, a server stream or a bidi stream for a stated requirement and defend the choice with measurable criteria.
06Deadlines and status8 lessons, 3 to 6 hours

Lessons

  • Setting a client deadline
  • What DEADLINE_EXCEEDED does and does not imply
  • Cancellation on the server side
  • Propagating the remaining deadline budget
  • Choosing status codes by cause
  • Retry decisions: UNAVAILABLE, ABORTED, FAILED_PRECONDITION
  • Error details: message text, trailers and the rich error model
  • Fault-injection tests for status and deadline behaviour

After this module you can

  • Attach a deadline to a call and observe that without one the call may wait indefinitely.
  • Explain that DEADLINE_EXCEEDED says the client stopped waiting, not that the server did nothing, and design a safe retry.
  • Build a table-driven fault-injection suite that proves the expected status code and deadline behaviour for every injected fault.
07Authentication boundaries6 lessons, 3 to 4 hours

Lessons

  • Channel credentials and TLS on loopback
  • Mutual TLS as a concept
  • Metadata and call credentials
  • A server-side authentication interceptor
  • Client interceptors for metadata and logging
  • UNAUTHENTICATED versus PERMISSION_DENIED and owner scoping

After this module you can

  • Start a TLS-protected server with a test certificate and connect a client that trusts that certificate, and show a plaintext client failing.
  • Describe what mutual TLS adds, who verifies whom, and when a client certificate replaces a token.
  • Return UNAUTHENTICATED for missing credentials, PERMISSION_DENIED for an identified caller without rights, and decide when NOT_FOUND hides existence.
08Operating at the edges6 lessons, 3 to 4 hours

Lessons

  • The standard health checking service
  • Graceful shutdown and draining
  • Load balancing concepts: proxy versus client-side
  • Client-side policies: pick_first and round_robin
  • Message size limits and keepalive settings
  • The gRPC-Web boundary

After this module you can

  • Register the grpc.health.v1 service, set status per service name, and call Check from a client.
  • Mark the service NOT_SERVING, let in-flight calls finish, then shut the server down, and test that an in-flight call completes.
  • State what gRPC-Web is for, why browsers need it and a proxy, and which call shapes and constraints to verify before choosing it.
09Compatibility lab6 lessons, 3 to 4 hours

Lessons

  • Golden bytes: freezing encoded fixtures
  • The old/new compatibility matrix
  • An automated schema-diff gate
  • Contract tests for status codes under injected faults
  • Deadline behaviour with injected clocks
  • Release checklist and deprecation window

After this module you can

  • Store encoded byte arrays for supplied messages as fixtures and make a test fail when a schema edit changes them.
  • Run old client with new server and new client with old server for a schema change, and record each pair's result.
  • Write and enforce a release checklist: schema gate, compatibility matrix, status-code suite, version bump and a dated deprecation plan for the previous package.

What you'll build

3 guided projects along the way, then a final project.

  • Hand-checked wire format and a safe schema change

    after module 2
  • Loopback service with unary and streaming methods

    after module 5
  • Deadlines, status codes and authenticated calls

    after module 7

Final project

Versioned protobuf service and client with compatibility tests. Choose one option: Versioned inventory ledger service and client | Versioned appointment desk service and client | Versioned telemetry hub service and client

What you submit

Source submission as a project folder with package.json, pinned dependencies, two versioned .proto packages and a README with setup instructions.

How it's reviewed

Trainer-reviewed live demonstration: run the tests, start both versions side by side, make a v1 and a v2 client call, and answer questions on one compatibility decision. Marked against the course project review rubric.

Where you'll use it

  • Change a deployed .proto schema without breaking existing clients, reserving retired field numbers.
  • Set deadlines and status codes so callers stop work and retry only when they should.

Roles that use these skills

  • Backend developer
  • API developer
  • Platform engineer

Earn the certificate by building, not watching

  1. Complete the lessons and pass each module checkpoint.
  2. Build your final project and demonstrate it.
  3. OUTLEARN reviews your project and issues your certificate. It is not issued automatically.

Frequently asked questions

Why Node.js?

The course uses JavaScript in Node.js, the same language as the neighbouring Node.js and Express course, so learners already run node:test and npm scripts.

What should I know first?

REST API Design and async JavaScript in Node.js.

How is gRPC & Protocol Buffers structured, and is it open now?

It has 9 modules and 62 lessons. It is not yet released to learners.

Be first in when gRPC & Protocol Buffers opens

Email us and we will tell you as soon as enrolment opens.

Notify me when it opens
₹199Opens soon
Notify me