EasyGrpc Logo
Module 1: Protobuf Basics & Messages

Defining Your First Protobuf Message

Progress: 1 / 3 Lessons
Step 1

Defining Your First Protobuf Message

What is Protocol Buffers?

Protocol Buffers (Protobuf) is Google's language-neutral, platform-neutral extensible mechanism for serializing structured data — think XML/JSON, but **smaller, faster, and simpler**.

Key Rules of Proto3 Syntax

1. Every file must start with syntax = "proto3";. 2. Data structures are defined using the message keyword. 3. Every field has a **type**, a **name**, and a unique **field number tag** (e.g. = 1;). 4. Field numbers **1 through 15** take 1 byte to encode, so use them for frequently populated fields!

---

Your Challenge:

Create a UserProfile message for a user management service with the following fields: - id of type string with tag 1 - username of type string with tag 2 - email of type string with tag 3 - age of type int32 with tag 4

Criteria (1 / 5)

Action Required
✓
Contains syntax = "proto3"
Syntax is set to 'proto3'
â—‹
Defines UserProfile message
Message 'UserProfile' is missing
â—‹
Contains string field "id = 1"
Field 'id' is missing
â—‹
Contains string field "username = 2"
Field 'username' is missing
â—‹
Contains int32 field "age = 4"
Field 'age' is missing
Type required .proto code in editor to pass.
schema.proto|proto3
UTF-8Monaco Engine
Loading Monaco Editor...
proto3package user.service
No Protobuf messages or services defined yet.
EasyGrpc | Interactive Protobuf & gRPC Playground