Today's software landscape is increasingly being defined by microservice-based architectures that rely on small applications to coordinate with each other to support the desired features. In this course, Moving Beyond JSON and XML with Protocol Buffers, you will see just how protocol buffers provide a way to enable this communication faster and more efficiently than competing protocols such as XML and JSON. First, you'll see features and practices that are available to allow messages to evolve without breaking older applications. Next, you'll be introduced to the syntax that is used to define messages to be used with Protocol Buffers. Finally, you'll be introduced protocol buffers and the advantages that they can bring to an application. By the end of this course, you'll be prepared to use protocol buffers to efficiently communicate between services while maintaining high performance levels.
Michael Van Sickle is an application architect in Akron, Ohio.
He is a mechanical engineer by training and a software engineer by choice.
He is passionate about learning new programming languages and user
Course Overview Hi everyone. My name is Mike Van Sickle and welcome to my course Moving Beyond JSON and XML with Protocol Buffers. I'm an engineer at SitePen. Inter-application messaging have long been dominated by XML and JSON based protocols, especially when the applications needed to work in a language neutral way. Protocol buffers offer a third option to consider with the promise of decreasing message size and increasing speed, sometimes by a factor of 10 or more. This course is going to get you going with protocol buffers and show you how to integrate them into your applications, whether you're looking for an alternative to JSON for a web application or as a more efficient transport mechanism for use in your microservice based back end. Some of the major topics we'll cover include how to use protocol buffers in server to server or server to client applications, creating messages with protocol buffers, how to organize protocol buffer definition files to work together, how to safely version messages and how to get started with protocol buffers and the many languages that are supported. By the end of this course, you'll know how to work with protocol buffers and integrate them into your next application. Before beginning the course, you should be familiar with inter-service messaging patterns, such as AJAX for Client-server applications. I hope you'll join me on this journey to learn protocol buffers with the Moving Beyond JSON and XML with Protocol Buffers course at Pluralsight.
Defining Messages Hello, and welcome back to this course where we're talking about protocol buffers as an alternative to using JSON or XML when transferring data between two applications. In the last module we really got things started by talking about the performance benefits that you can get by integrating protocol buffers into your application. In this module we're really going to start digging in and learn how to define our own messages so we can use protocol buffers for our applications. Now if I look at how a message is constructed and I paint with a very broad brush, then we're basically going to see two types of content to a message. The first type are fields, and the second type, if you forgive me for a little bit of a weak term, is everything else. Now fields are the primary thing that the message is there for, it's going to define the actual data that we're going to be sending across. There is many other features that a message can contain in order to augment or change how the message is used by its clients. Let's dig in the fields and see how they're put together.
Using Other Features Hello and welcome back to this course where we're learning how to protocol buffers as an alternative to JSON or XML when sending data between two applications. In the last module we covered the basics of how to create messages and add them to our protocol buffer definition files. In this module we're going to cover the other features that those files can contain and how to specify them. So as we look at the content of this module, it's going to break down into four basic categories. First, we'll go over how to work with global enumerations as opposed to the nested enumerations that we used in the last module. Then we'll learn how to create multiple messages and embed them in the same protocol buffer definition file. Then we'll start to learn how to have our protocol buffer definition files work together by learning how we can import one file's contents into the another one. And finally, we'll learn another organizational concept that comes with protocol buffer definition files, and that is how to use packages in order to separate out the different message definitions into a well-organized hierarchy. So let's get started and learn how to work with global enumerations.
Managing Message Revisions One of the biggest things that protocol buffers have to get right is the ability to define the messages that we need in order to allow our applications to efficiently communicate one another. Over the last two modules, we've talked about the tools and features that protocol buffers expose to us in order to give us that. In this module, I want to dig into how we can keep our applications fresh and working as new features and new use cases get added to our application suite, while still maintaining backward compatibility with parts of our infrastructure that we might not be able to update as new applications and features get introduced. So there are really two concepts to talk about when we talk about working with versioning with protocol buffers. The first is a concept called reserved fields and we'll dig into that and what those can do for us in order to make sure that we communicate out aspects of a message definition that should no longer be used. The other thing we have are really just the rules and recommendations that are provided. Now the rules are the things that are enforced by the compiler and recommendations are best practices that are documented on the protocol buffer site in order to help steer you away from bad practices that could cause you problems down the road. So let's start our conversation by talking about how to work with reserved fields.