Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸

2.8K posts

Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸 banner
Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸

Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸

@travisfont

Information Guardian · Builder turning chaos into systems 👨‍💻🚀 #SoftwareEngineer #AgenticEngineering #AgenticAI Also @MatooEvents, @InsideBlocksX & @GeoTraaf

Luxembourg Katılım Mayıs 2013
976 Takip Edilen244 Takipçiler
Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸 retweetledi
Vishwanath Patil
Vishwanath Patil@patilvishi·
Serialization ≠ Externalization ≠ Protocol Buffers They all convert objects into bytes... But they are not the same thing. Choosing the wrong one can impact performance, compatibility, and scalability. Here is the easiest way to remember them: Serialization ➜ Java automatically converts an object into a byte stream. Externalization ➜ You decide exactly what gets written and how. Protocol Buffers (ProtoBuf) ➜ A schema-based, language-neutral binary serialization format designed for fast and compact data exchange. Quick memory trick - Serialization = Automatic - Externalization = Manual Control - ProtoBuf = Fast & Cross-Platform Imagine an Order Service You need to send an order over the network. Serialization ObjectOutputStream ↓ Java Object ↓ Byte Stream Java serializes every eligible field automatically. Simple... But the payload can be larger, Java-specific, and sensitive to class evolution. Externalization writeExternal() ↓ Choose Fields ↓ Byte Stream You explicitly control: - Which fields are written - The serialization format - The order of fields Smaller payload. Better performance. More control. Protocol Buffers .proto Schema ↓ Generate Classes ↓ Serialize ↓ Compact Binary Example: message User { int64 id = 1; string name = 2; } The same schema works across: - Java - Go - Python - C++ - Node.js - .NET Perfect for microservices and gRPC. When should you use each? Serialization - Legacy Java applications - Simple object persistence - Session replication - Quick prototypes Externalization - Performance-critical Java applications - Custom serialization logic - Fine-grained control over stored data Protocol Buffers - Microservices - gRPC - Event streaming - High-performance APIs - Cross-language communication -Distributed systems The biggest misconception Many developers think: ProtoBuf is just another serialization library. Not really. Serialization and Externalization are Java object serialization mechanisms. ProtoBuf is a schema-first data interchange format designed for interoperability across languages and platforms. It's not tied to Java objects. Another misconception Externalization always replaces Serialization. Not necessarily. Externalization is useful when you need complete control. For many applications, default serialization (or a modern serialization format) may be sufficient. Choose based on your requirements not complexity. One sentence to remember forever Serialization = Java writes everything automatically. Externalization = You decide what gets written. ProtoBuf = Define a schema once, communicate efficiently everywhere. Modern distributed systems rarely communicate using Java Serialization anymore. They prefer Protocol Buffers, Avro, or similar schema-based formats because they are smaller, faster, version-friendly, and language-independent. The right serialization strategy can significantly improve the performance and maintainability of your APIs and microservices.
Vishwanath Patil tweet media
English
4
25
88
1.8K
Tanuj
Tanuj@tanujDE3180·
Backend Interview Question: Which endpoint is better? Design A or Design B
Tanuj tweet media
English
54
10
158
31.9K
Nitin.nn
Nitin.nn@NitinthisSide_·
Be honest. Which note-taking app are you betting on long-term?
Nitin.nn tweet media
English
32
2
30
3K
Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸 retweetledi
Vishwanath Patil
Vishwanath Patil@patilvishi·
System Desing fundamanetals - Day 25 API Gateway Explained: Why Microservices Need More Than Nginx Yesterday we learned how Nginx acts as a reverse proxy. But once your application grows from one service to dozens of microservices... Simply routing requests isn't enough. That's where an API Gateway comes in. What is an API Gateway? An API Gateway is the single entry point for all client requests. Instead of clients calling multiple services directly... They communicate with one gateway. Client │ ▼ API Gateway │ ┌─────────────────────────┐ ▼ ▼ ▼ User Service Order Service Payment Service The gateway routes each request to the correct backend service. Why Not Call Services Directly? Imagine a mobile app needing data from: - User Service - Orders Service - Payment Service - Notification Service Without a gateway... The client must know every service URL. Every API version. Every authentication mechanism. That's difficult to maintain. What Does an API Gateway Do? ✔Request Routing ✔Authentication & Authorization ✔Rate Limiting ✔Load Balancing ✔SSL/TLS Termination ✔Logging ✔Monitoring ✔API Versioning ✔Request Aggregation Real-World Example A shopping app opens. The home screen needs: - User profile - Orders - Recommendations - Notifications Instead of making four separate requests... The client sends one request to the API Gateway. The gateway collects responses from multiple services and returns a single response. Nginx vs API Gateway Nginx - Excellent reverse proxy - Static files - SSL termination - Load balancing API Gateway - Everything Nginx can do... Plus: - Authentication - Rate limiting - API aggregation - Service discovery - Request transformation - Microservice orchestration Popular API Gateways - Spring Cloud Gateway - Kong - AWS API Gateway - Apigee - Envoy Gateway - Traefik Key Takeaway A reverse proxy manages traffic. An API Gateway manages APIs. As your application evolves into microservices, an API Gateway becomes the central point for security, routing, and governance. Tomorrow we will explore CDN (Content Delivery Network) and see how websites deliver content quickly to users around the world.
Vishwanath Patil tweet media
English
3
21
118
2.7K
Tanuj
Tanuj@tanujDE3180·
Backend Interview Question: Which endpoint scales better ? Autoincrement vs UUID
Tanuj tweet media
English
77
21
710
288.2K
Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸 retweetledi
Dhanian 🗯️
Dhanian 🗯️@e_opore·
WHAT IS gRPC? DEFINITION -> gRPC (Google Remote Procedure Call) is a high-performance, open-source framework for communication between distributed applications -> It enables clients and servers to communicate efficiently using Remote Procedure Calls (RPCs) -> Uses HTTP/2 for transport and Protocol Buffers (Protobuf) for data serialization CORE FEATURES HIGH PERFORMANCE -> Uses binary serialization with Protocol Buffers -> Faster and more efficient than text-based APIs like JSON HTTP/2 SUPPORT -> Multiplexes multiple requests over a single connection -> Supports header compression and bidirectional streaming CODE GENERATION -> Automatically generates client and server code -> Supports many programming languages CROSS-PLATFORM -> Works across different operating systems and programming languages -> Ideal for distributed systems and microservices HOW gRPC WORKS -> Client calls a remote method (RPC) -> Request is serialized using Protocol Buffers -> Request is sent over HTTP/2 -> Server receives and processes the request -> Server executes business logic -> Response is serialized using Protocol Buffers -> Response is returned to the client RPC TYPES UNARY RPC -> Client sends one request and receives one response SERVER STREAMING RPC -> Client sends one request and receives multiple responses CLIENT STREAMING RPC -> Client sends multiple requests and receives one response BIDIRECTIONAL STREAMING RPC -> Client and server exchange multiple messages simultaneously KEY COMPONENTS PROTOBUF (.proto) FILE -> Defines services and message structures -> Acts as the contract between client and server SERVICE -> Collection of remote procedures (methods) MESSAGE -> Structured data sent between client and server STUBS -> Auto-generated client and server code used for communication KEY CHARACTERISTICS -> HIGH PERFORMANCE -> Optimized for low latency and high throughput -> STRONGLY TYPED -> Uses Protocol Buffers for strict data structures -> LANGUAGE AGNOSTIC -> Supports Java, Go, Python, C#, Node.js, Rust, and many others -> SCALABLE -> Ideal for microservices and cloud-native applications ADVANTAGES -> Very fast and efficient communication -> Smaller payload sizes than JSON APIs -> Automatic code generation -> Supports streaming communication -> Excellent for microservices architecture DISADVANTAGES -> Harder to debug than REST APIs -> Less human-readable because it uses binary data -> Browser support requires gRPC-Web -> Learning Protocol Buffers adds complexity REAL-WORLD USE CASES -> Communication between microservices -> Cloud-native applications -> Real-time streaming systems -> IoT platforms -> Machine learning services -> Internal APIs for large-scale systems gRPC VS REST -> gRPC uses HTTP/2, while REST commonly uses HTTP/1.1 or HTTP/2 -> gRPC uses Protocol Buffers, while REST commonly uses JSON -> gRPC is optimized for speed and low latency, while REST prioritizes simplicity and broad compatibility -> gRPC supports bidirectional streaming, while REST typically follows a request-response model BEST PRACTICES -> Design clear and reusable .proto files -> Use streaming only when necessary -> Implement authentication using TLS and tokens -> Handle deadlines and request timeouts -> Enable logging and monitoring for RPC calls -> Version APIs to maintain backward compatibility BACKEND ENGINEERING HANDBOOK -> Grab Backend Engineering Handbook -> codewithdhanian.gumroad.com/l/ungqng
Dhanian 🗯️ tweet media
English
1
60
240
7.3K
Travis van der Font (Traaf) 🇱🇺🇪🇺🇺🇸 retweetledi
Kavita
Kavita@kav_kavi11·
Rate limiting: the quiet guardrail that keeps your API fast, fair, and alive.
Kavita tweet media
English
1
32
187
4.7K