StackShareStackShare
Follow on
StackShare

Discover and share technology stacks from companies around the world.

Follow on

© 2025 StackShare. All rights reserved.

Product

  • Stacks
  • Tools
  • Feed

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  1. Stackups
  2. Utilities
  3. API Tools
  4. Remote Procedure Call
  5. JSON-RPC vs REST

JSON-RPC vs REST

OverviewComparisonAlternatives

Overview

REST
REST
Stacks238
Followers198
Votes0
JSON-RPC
JSON-RPC
Stacks33
Followers53
Votes0

JSON-RPC vs REST: What are the differences?

Introduction

JSON-RPC and REST are two different approaches for client-server communication over the internet. While both JSON-RPC and REST allow for communication between client and server, they have distinct differences in terms of structure, protocols, and flexibility.

  1. Request-Response Model: JSON-RPC follows a strict request-response model, where a client makes a request to a server and expects a response from the server. The requests and responses are formatted using the JSON-RPC protocol, which includes specific fields such as method and params. REST, on the other hand, is a more flexible architecture that allows clients to interact with server resources using different HTTP methods like GET, POST, PUT, DELETE. REST requests and responses typically use JSON or XML formats.

  2. Transport Protocols: JSON-RPC primarily relies on HTTP as the transport protocol, making it easier to implement and utilize existing HTTP infrastructure. REST, on the other hand, is not tied to any specific transport protocol and can operate over various protocols like HTTP, TCP, SMTP, etc. This flexibility allows REST to be used in a wider range of scenarios.

  3. Stateless vs Stateful: REST follows a stateless model, where each request from the client to the server contains all the necessary information to process the request. The server does not store any client-specific information and can process requests independently. JSON-RPC, on the other hand, can maintain server-side state information between requests, allowing for more complex interactions and session management.

  4. Flexibility and Extensibility: JSON-RPC provides a more standardized and structured approach to client-server communication, making it easier to define and enforce rules for data exchange. REST, being more flexible and loosely-coupled, allows for easier integration with diverse systems and enables the addition of new resources and endpoints without impacting existing functionality.

  5. Error Handling: In JSON-RPC, errors are returned explicitly within the response, with error codes and error messages provided. This makes it easier for clients to handle and process errors. In REST, errors are typically indicated using appropriate HTTP status codes and may be accompanied by error descriptions in the response body. The handling of errors in REST may vary depending on the specific status codes used.

  6. Caching and Performance: REST architecture includes support for caching mechanisms, allowing clients to cache responses for better performance. JSON-RPC does not have built-in support for caching and each request-response cycle requires direct interaction between the client and server, potentially impacting performance in some scenarios.

In Summary, JSON-RPC follows a strict request-response model using the JSON-RPC protocol over HTTP, while REST provides a more flexible and loosely-coupled architecture that supports various transport protocols, stateless interactions, and caching mechanisms.

Share your Stack

Help developers discover the tools you use. Get visibility for your team's tech choices and contribute to the community's knowledge.

View Docs
CLI (Node.js)
or
Manual

Detailed Comparison

REST
REST
JSON-RPC
JSON-RPC

An architectural style for developing web services. A distributed system framework that uses Web protocols and technologies.

It is a very simple protocol, defining only a few data types and commands. It allows for notifications (data sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered out of order.

Statistics
Stacks
238
Stacks
33
Followers
198
Followers
53
Votes
0
Votes
0
Pros & Cons
Pros
  • 4
    Popularity
No community feedback yet
Integrations
No integrations available
Python
Python
MQTT
MQTT

What are some alternatives to REST, JSON-RPC?

gRPC

gRPC

gRPC is a modern open source high performance RPC framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking...

Apache Dubbo

Apache Dubbo

It is a high-performance, light weight, java based RPC framework. Dubbo offers three key functionalities, which include interface based remote call, fault tolerance & load balancing, and automatic service registration & discovery.

Mercury

Mercury

A modular JSON-RPC library that allows pluggable transport layers, JSON libraries, and effect/async monads. It is used to communicate with embedded devices where the device is acting in the server role.

Tars

Tars

It is an open-source microservice platform. It contains a high-performance RPC framework and a service management platform. Based on Tars, you can develop a reliable microservice system efficiently. It is designed for high reliability, high performance, and efficient service management. By significantly reducing system operation work, developers can focus on business logic and meet fast changes of user requirements.

RSocket

RSocket

It is a binary protocol for use on byte stream transports such as TCP, WebSockets, and Aeron. It provides a protocol for Reactive Streams semantics between client-server, and server-server communication.

Kitex

Kitex

It is a high-performance and strong-extensibility Golang RPC framework that helps developers build microservices. If performance and extensibility are the main concerns when you develop microservices, it can be a good choice.

Gravity Framework

Gravity Framework

It is a modern back-end framework with full-stack capacities written in Typescript. Its main feature is to facilitate communication in a safe way between server and client by using a remote procedure call system. It will give you the power to call a function defined in the server directly from the client - like if it's just a normal Javascript function.

FRPC

FRPC

It is a proto3-compatible RPC Framework that's designed from the ground up to be lightweight, extensible, and extremely performant. On average fRPC outperforms other RPC frameworks by 2-4x in an apples-to-apples comparison, and is easily able to handle more than 2 million RPCs/second on a single server.

Related Comparisons

Bootstrap
Materialize

Bootstrap vs Materialize

Laravel
Django

Django vs Laravel vs Node.js

Bootstrap
Foundation

Bootstrap vs Foundation vs Material UI

Node.js
Spring Boot

Node.js vs Spring-Boot

Liquibase
Flyway

Flyway vs Liquibase