Introduction to the Modern Server-side Stack — Golang, Protobuf, and gRPC

by | Mar 28, 2019 | Uncategorized | 0 comments

All Premium Themes And WEBSITE Utilities Tools You Ever Need! Greatest 100% Free Bonuses With Any Purchase.

Greatest CYBER MONDAY SALES with Bonuses are offered to following date: Get Started For Free!
Purchase Any Product Today! Premium Bonuses More Than $10,997 Will Be Emailed To You To Keep Even Just For Trying It Out.
Click Here To See Greatest Bonuses

and Try Out Any Today!

Here’s the deal.. if you buy any product(s) Linked from this sitewww.Knowledge-Easy.com including Clickbank products, as long as not Google’s product ads, I am gonna Send ALL to you absolutely FREE!. That’s right, you WILL OWN ALL THE PRODUCTS, for Now, just follow these instructions:

1. Order the product(s) you want by click here and select the Top Product, Top Skill you like on this site ..

2. Automatically send you bonuses or simply send me your receipt to consultingadvantages@yahoo.com Or just Enter name and your email in the form at the Bonus Details.

3. I will validate your purchases. AND Send Themes, ALL 50 Greatests Plus The Ultimate Marketing Weapon & “WEBMASTER’S SURVIVAL KIT” to you include ALL Others are YOURS to keep even you return your purchase. No Questions Asked! High Classic Guaranteed for you! Download All Items At One Place.

That’s it !

*Also Unconditionally, NO RISK WHAT SO EVER with Any Product you buy this website,

60 Days Money Back Guarantee,

IF NOT HAPPY FOR ANY REASON, FUL REFUND, No Questions Asked!

Download Instantly in Hands Top Rated today!

Remember, you really have nothing to lose if the item you purchased is not right for you! Keep All The Bonuses.

Super Premium Bonuses Are Limited Time Only!

Day(s)

:

Hour(s)

:

Minute(s)

:

Second(s)

Get Paid To Use Facebook, Twitter and YouTube
Online Social Media Jobs Pay $25 - $50/Hour.
No Experience Required. Work At Home, $316/day!
View 1000s of companies hiring writers now!

Order Now!

MOST POPULAR

*****
Customer Support Chat Job: $25/hr
Chat On Twitter Job - $25/hr
Get Paid to chat with customers on
a business’s Twitter account.

Try Free Now!

Get Paid To Review Apps On Phone
Want to get paid $810 per week online?
Get Paid To Review Perfect Apps Weekly.

Order Now
!
Look For REAL Online Job?
Get Paid To Write Articles $200/day
View 1000s of companies hiring writers now!

Try-Out Free Now!

How To Develop Your Skill For Great Success And Happiness Including Become CPA? | Additional special tips From Admin

Proficiency Expansion is usually the number 1 fundamental and principal element of achieving true being successful in all professions as you found in a lot of our modern society plus in All over the world. For that reason fortunate to focus on together with you in the subsequent related to what flourishing Talent Progression is; how or what procedures we deliver the results to get dreams and subsequently one may work with what the person takes pleasure in to conduct every single day with regard to a maximum lifetime. Is it so good if you are competent to grow properly and find being successful in exactly what you dreamed, targeted for, disciplined and did wonders very hard every day and undoubtedly you develop into a CPA, Attorney, an holder of a sizeable manufacturer or possibly even a healthcare professional who will be able to remarkably chip in superb support and principles to some others, who many, any modern society and local community definitely shown admiration for and respected. I can's think I can support others to be best specialized level who seem to will contribute important systems and alleviation values to society and communities right now. How happy are you if you turn into one similar to so with your personal name on the label? I get arrived at SUCCESS and get over all the very difficult locations which is passing the CPA qualifications to be CPA. At the same time, we will also go over what are the downfalls, or many other situations that is perhaps on your current way and the best way I have privately experienced them and is going to demonstrate to you the way to get over them. | From Admin and Read More at Cont'.

Introduction to the Modern Server-side Stack — Golang, Protobuf, and gRPC

There are some new players in town for server programming and this time it’s all about Google. Golang has rapidly been gaining popularity ever since Google started using it for their own production systems. And since the inception of Microservice Architecture, people have been focusing on modern data communication solutions like gRPC along with Protobuf. In this post, I will walk you through each of these briefly.

Golang or Go is an open source, general purpose programming language by Google. It has been gaining popularity recently for all good reasons. It may come as a surprise to most people that language is almost 10 years old and has been production ready for almost 7 years, according to Google.

Golang is designed to be simple, modern, easy to understand, and quick to grasp. The creators of the language designed it in such a way that an average programmer can have a working knowledge of the language over a weekend. I can attest to the fact that they definitely succeeded. Speaking of the creators, these are the experts that have been involved in the original draft of the C language so we can be assured that these guys know what they are doing.

For most of the use cases, we actually don’t. In fact, Go doesn’t solve any new problems that haven’t been solved by some other language/tool before. But it does try to solve a specific set of relevant problems that people generally face in an efficient, elegant, and intuitive manner. Go’s primary focus is the following:

I’m going to briefly explain how Go provides all of the above. You can read more about the language and its features in detail from Go’s official website.

Concurrency is one of the primary concerns in most of the server applications and it should be the primary concern of the language, considering the modern microprocessors. Go introduces a concept called a ‘goroutine’. A ‘goroutine’ is analogous to a ‘lightweight user-space thread’. It is much more complicated than that in reality as several goroutines multiplex on a single thread but the above expression should give you a general idea. These are light enough that you can actually spin up a million goroutines simultaneously as they start with a very tiny stack. In fact, that’s recommended. Any function/method in Go can be used to spawn a Goroutine. You can just do ‘go myAsyncTask()’ to spawn a goroutine from ‘myAsyncTask’ function. The following is an example:

Yes, it’s that easy and it is meant to be that way as Go is a simple language and you are expected to spawn a goroutine for every independent async task without caring much. Go’s runtime automatically takes care of running the goroutines in parallel if multiple cores are available. But how do these goroutines communicate? The answer is the channels.

‘Channel’ is also a language primitive that is meant to be used for communication among goroutines. You can pass anything from a channel to another goroutine (A primitive Go type or a Go struct or even other channels). A channel is essentially a blocking double-ended queue (can be single ended too). If you want a goroutine(s) to wait for a certain condition to be met before continuing further you can implement cooperative blocking of goroutines with the help of channels.

These two primitives give a lot of flexibility and simplicity in writing asynchronous or parallel code. Other helper libraries like a goroutine pool can be easily created from the above primitives. One basic example is:

Unlike a lot of other modern languages, Golang doesn’t have a lot of features. In fact, a compelling case can be made for the language being too restrictive in its feature set and that’s intended. It is not designed around a programming paradigm like Java or designed to support multiple programming paradigms like Python. It’s just bare bones structural programming. Just the essential features are thrown into the language and not a single thing more.

After looking at the language, you may feel that the language doesn’t follow any particular philosophy or direction and it feels like every feature is included in here to solve a specific problem and nothing more than that. For example, it has methods and interfaces but not classes; the compiler produces a statically linked binary but still has a garbage collector; it has strict static typing but doesn’t support generics. The language does have a thin runtime but doesn’t support exceptions.

The main idea here that the developer should spend the least amount of time expressing his/her idea or algorithm as code without thinking about “What’s the best way to do this in x language?” and it should be easy to understand for others. It’s still not perfect, it does feel limiting from time to time and some of the essential features like Generics and Exceptions are being considered for the ‘Go 2’.

Single threaded execution performance NOT a good metric to judge a language, especially when the language is focused around concurrency and parallelism. But still, Golang sports impressive benchmark numbers only beaten by hardcore system programming languages like C, C++, Rust, etc. and it is still improving. The performance is actually very impressive considering its a Garbage collected language and is good enough for almost every use case.

The adoption of a new tool/language directly depends on its developer experience. And the adoption of Go does speak for its tooling. Here we can see that same ideas and tooling is very minimal but sufficient. It’s all achieved by the ‘go’ command and its subcommands. It’s all command line.

There is no package manager for the language like pip, npm. But you can get any community package by just doing

Yes, it works. You can just pull packages directly from GitHub or anywhere else. They are just source files.

But what about package.json..? I don’t see any equivalent for `go get`. Because there isn’t. You don’t need to specify all your dependency in a single file. You can directly use:

In your source file itself and when you do `go build` it will automatically `go get` it for you. You can see the full source file here:

This binds the dependency declaration with the source itself.

As you can see by now, it’s simple, minimal and yet sufficient and elegant. There is first-hand support for both unit tests and benchmarks with flame charts too. Just like the feature set, it also has its downsides. For example, ‘go get’ doesn’t support versions and you are locked to the import URL passed in your source file. It is evolving and other tools have come up for dependency management.

Golang was originally designed to solve the problems that Google had with their massive code bases and the imperative need to code efficient concurrent apps. It makes coding applications/libraries that utilize the multicore nature of modern microchips very easy. And, it never gets into a developer’s way. It’s a simple modern language and it never tries to become anything more than that.

Protobuf or Protocol Buffers is a binary communication format by Google. It is used to serialize structured data. A communication format? Kind of like JSON? Yes. It’s more than 10 years old and Google has been using it for a while now.

But don’t we have JSON and it’s so ubiquitous…

Just like Golang, Protobufs doesn’t really solve anything new. It just solves existing problems more efficiently and in a modern way. Unlike Golang, they are not necessarily more elegant than the existing solutions. Here are the focus points of Protobuf:

Binary format and speed

So are Protobuf really that fast? The short answer is, yes. According to the Google Developers, they are 3 to 10 times smaller and 20 to 100 times faster than XML. It’s not a surprise as it is a binary format, the serialized data is not human readable.

Protobufs take a more planned approach. You define ‘.proto’ files which are kind of the schema files but are much more powerful. You essentially define how you want your messages to be structured, which fields are optional or required, their data types etc. After that, the Protobuf compiler will generate the data access classes for you. You can use these classes in your business logic to facilitate communication.

Looking at a `.proto` file related to a service will also give you a very clear idea of the specifics of the communication and the features that are exposed. A typical .proto file looks like this:

Fun Fact: Jon Skeet, the king of Stack Overflow is one of the main contributors in the project.

gRPC, as you guessed it, is a modern RPC (Remote Procedure Call) framework. It is a batteries included framework with built-in support for load balancing, tracing, health checking, and authentication. It was open sourced by Google in 2015 and it’s been gaining popularity ever since.

SOAP with WSDL has been used long time for communication between different systems in a Service Oriented Architecture. At the time, the contracts used to be strictly defined and systems were big and monolithic, exposing a large number of such interfaces.

Then came the concept of ‘browsing’ where the server and client don’t need to be tightly coupled. A client should be able to browse service offerings even if they were coded independently. If the client demanded the information about a book, the service along with what’s requested may also offer a list of related books so that client can browse. REST paradigm was essential to this as it allows the server and client to communicate freely without strict restriction using some primitive verbs.

As you can see above, the service is behaving like a monolithic system, which along with what is required is also doing n number of other things to provide the client with the intended ‘browsing’ experience. But this is not always the use case. Is it?

There are many reasons to adopt a Microservice Architecture. The prominent one being the fact that it is very hard to scale a Monolithic system. While designing a big system with Microservices Architecture each business or technical requirement is intended to be carried out as a cooperative composition of several primitive ‘micro’ services.

These services don’t need to be comprehensive in their responses. They should perform specific duties with expected responses. Ideally, they should behave like pure functions for seamless composability.

Now using REST as a communication paradigm for such services doesn’t provide us with much of a benefit. However, exposing a REST API for a service does enable a lot of expression capability for that service but again if such expression power is neither required nor intended we can use a paradigm that focuses more on other factors.

gRPC intends to improve upon the following technical aspects over traditional HTTP requests:

As it’s an RPC framework, we again have concepts like Service Definition and Interface Description Language which may feel alien to the people who were not there before REST but this time it feels a lot less clumsy as gRPC uses Protobuf for both of these.

Protobuf is designed in such a way that it can be used as a communication format as well as a protocol specification tool without introducing anything new. A typical gRPC service definition looks like this:

You just write a ‘.proto’ file for your service describing the interface name, what it expects, and what it returns as Protobuf messages. Protobuf compiler will then generate both the client and server side code. Clients can call this directly and server-side can implement these APIs to fill in the business logic.

Golang, along with gRPC using Protobuf is an emerging stack for modern server programming. Golang simplifies making concurrent/parallel applications and gRPC with Protobuf enables efficient communication with a pleasing developer experience.

*******************************************************************

This post was originally published on Velotio Blog.

Velotio Technologies is an outsourced software product development partner for technology startups and enterprises. We specialize in enterprise B2B and SaaS product development with a focus on artificial intelligence and machine learning, DevOps, and test engineering.

Interested in learning more about us? We would love to connect with you on our Website, LinkedIn or Twitter.

*******************************************************************

Introduction to the Modern Server-side Stack — Golang, Protobuf, and gRPC

Research & References of Introduction to the Modern Server-side Stack — Golang, Protobuf, and gRPC|A&C Accounting And Tax Services
Source

Send your purchase information or ask a question here!

7 + 11 =

Welcome To Knowledge-Easy Management Sound Tips and Thank You Very Much! Have a great day!

From Admin and Read More here. A note for you if you pursue CPA licence, KEEP PRACTICE with the MANY WONDER HELPS I showed you. Make sure to check your works after solving simulations. If a Cashflow statement or your consolidation statement is balanced, you know you pass right after sitting for the exams. I hope my information are great and helpful. Implement them. They worked for me. Hey.... turn gray hair to black also guys. Do not forget HEALTH? Proficiency Expansion is the number 1 vital and significant factor of accomplishing valid financial success in all of procedures as you will watched in the the community and even in All over the world. For that reason happy to discuss with everyone in the soon after in relation to everything that good Talent Development is;. precisely how or what approaches we deliver the results to reach desires and eventually one should perform with what whomever prefers to accomplish just about every single daytime just for a comprehensive lifetime. Is it so great if you are ready to develop competently and locate achievement in just what you believed, geared for, regimented and previously worked very hard each afternoon and unquestionably you turn into a CPA, Attorney, an master of a large manufacturer or perhaps even a health care provider who may well seriously add fantastic aid and principles to other folks, who many, any population and society obviously esteemed and respected. I can's believe I can assist others to be major expert level exactly who will bring sizeable remedies and alleviation valuations to society and communities nowadays. How joyful are you if you grow to be one like so with your private name on the title? I have landed at SUCCESS and conquer every the tricky portions which is passing the CPA qualifications to be CPA. Furthermore, we will also go over what are the hurdles, or alternative factors that will be on your current means and precisely how I have privately experienced all of them and will show you tips on how to prevail over them.

0 Comments

Submit a Comment

Business Best Sellers

 

Get Paid To Use Facebook, Twitter and YouTube
Online Social Media Jobs Pay $25 - $50/Hour.
No Experience Required. Work At Home, $316/day!
View 1000s of companies hiring writers now!
Order Now!

 

MOST POPULAR

*****

Customer Support Chat Job: $25/hr
Chat On Twitter Job - $25/hr
Get Paid to chat with customers on
a business’s Twitter account.
Try Free Now!

 

Get Paid To Review Apps On Phone
Want to get paid $810 per week online?
Get Paid To Review Perfect Apps Weekly.
Order Now!

Look For REAL Online Job?
Get Paid To Write Articles $200/day
View 1000s of companies hiring writers now!
Try-Out Free Now!

 

 
error: Content is protected !!