Posts

Showing posts with the label Protocol Buffers

Changing the Default Terminal to Terminator on Ubuntu

Image
Terminator is a powerful tool for developers, allowing you to manage multiple terminal sessions in a single window. Features like splitting panes, tabs, and simultaneous input can significantly boost your productivity. Step 1: Install Terminator First, install Terminator using the apt package manager. sudo apt update sudo apt install terminator -y The -y option automatically answers 'yes' to any prompts during the installation process, streamlining the setup. Step 2: Set as the System Default Ubuntu uses a utility called update-alternatives to manage default applications. We'll use this tool to change the default terminal emulator ( x-terminal-emulator ) to Terminator. Run the Configuration Command Enter the following command in your terminal. A list of available terminals will appear. sudo update-alternatives --config x-terminal-emulator Select Terminator From the resulting list, enter the selection number corresponding to terminator and press Enter. ...

How to Add a gRPC Endpoint to a Spring Boot Microservice

Image
This blog guides you through the standard procedure for adding a gRPC endpoint to the order-service project. The primary goal is to handle "create new order" requests from external clients via gRPC. This process involves calling an internal u ser-service to validate user information. Why Use gRPC? Performance: It's fast, using HTTP/2 and binary serialization (Protobuf), which reduces communication overhead. Strict API Specification: The .proto file clearly defines the service interface and message structures, ensuring type safety at compile time. Multi-language Support: It's suitable for polyglot architectures, as clients and servers can be implemented in various languages. 1. Define the Service with Protocol Buffers (.proto) First, define the service contract by creating a .proto file in the src/main/proto directory. order.proto syntax = "proto3"; package com.abc.order.grpc; // Java code generation options option java_multiple_fil...