- Columnar Storage: Stores data by columns, not rows, which speeds up queries for specific fields.
- Compression: Shrinks data to save space and make reading faster.
- Compatibility: Works well with big data tools like Hadoop, Spark, and others
Digital Transformation, Artificial Intelligence, Machine Learning, IoT, Big Data Analytics, Enterprise Architecture, Performance Engineering, Security, Design and Development tips on Java and .NET platforms.
Monday, September 22, 2025
Ruminating on Parquet, Delta Lake and Iceberg
Thursday, September 04, 2025
JSON-RPC vs REST and why JSON-RPC is used in MCP?
I was going down the rabbit hole of MCP protocol details and realised that it was using JSON-RPC instead of REST.
JSON-RPC is a simple protocol that lets a program on one computer run a function on another computer. It uses JSON to send and receive the requests and responses, making it easy to use and understand.
It is transport-agnostic and can work over HTTP, TCP, sockets, or other message-passing environments. A JSON-RPC request typically includes the method to be called, parameters for that method (optional), and an ID to match the response.
Given below is a simple example of a request and response:
Given below are the top 3 differences in JSON-RPC vs REST for API design:
Architecture Style:
- JSON-RPC: RPC-oriented, focusing on invoking specific methods or procedures on the server (e.g., calling a function like getBalance()). It treats interactions as direct commands.
- REST: Resource-oriented, centered on manipulating resources (e.g., /users/{id}) using standard HTTP methods like GET, POST, PUT, and DELETE.
Endpoints and HTTP Methods:
- JSON-RPC: Uses a single endpoint (e.g., /rpc) with POST requests for all method calls, simplifying routing but limiting HTTP verb usage.
- REST: Employs multiple endpoints (e.g., /users, /orders) and leverages various HTTP methods (GET, POST, PUT, DELETE) to represent different actions on resources.
Request/Response Structure:
- JSON-RPC: Requests and responses follow a strict JSON format with fields like "method", "params", "id", and "result" or "error". Supports batching natively.
- REST: Uses flexible request formats (URL paths, query parameters, headers) and responses rely on HTTP status codes (e.g., 200, 404) with custom payloads; batching requires custom implementation.