grpc-web VS json-api

Compare grpc-web vs json-api and see what are their differences.

Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
grpc-web json-api
33 59
8,301 7,314
1.2% 0.5%
6.5 4.9
9 days ago 5 days ago
JavaScript CSS
Apache License 2.0 Creative Commons Zero v1.0 Universal
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

grpc-web

Posts with mentions or reviews of grpc-web. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-14.
  • Ask HN: WebSocket server transforming channel subscriptions to gRPC streams
    2 projects | news.ycombinator.com | 14 Aug 2023
    * Additionally, client can stream data to the backend server (if bidirectional GRPC streams are used). I.e. client sends WebSocket messages, those will be transformed to GRPC messages by WebSocket server and delivered to the application backend.

    As a result we have a system which allows to quickly create individual streams by using strict GRPC contract but terminating connections over WebSocket transport. So it works well in web browsers. After that no need to write WebSocket protocol, client implementation, handle WebSocket connection. This all will be solved by a suggested WebSocket server and its client SDKs.

    The mechanics is similar to Websocketd (https://github.com/joewalnes/websocketd), but instead of creating OS processes we create GRPC streams. The difference from grpc-web (https://github.com/grpc/grpc-web) is that we provide streaming capabilities but not exposing GRPC contract to the client - just allowing to stream any data as payload (both binary and text) with some wrappers from our client SDKs side for managing subscriptions. I.e. it's not native GRPC streams on the client side - we expose just Connection/Subscription object to stream in both directions. GRPC streams used only for communication between WebSocket server and backend. To mention - grpc-web does not support all kinds of streaming now (https://github.com/grpc/grpc-web#streaming-support) while proposed solution can. This all should provide a cross-platform way to quickly write streaming apps due to client SDKs and language-agnostic nature of GRPC.

    I personally see both pros and cons in this scheme (without concentrating on both too much here to keep the question short). I spent some time thinking about this myself, already have some working prototypes – but turned out need more opinions before moving forward with the idea and releasing this, kinda lost in doubts.

    My main question - whether this seems interesting for someone here? Do you find this useful and see practical value?

  • Build and Deploy a gRPC-Web App Using Rust Tonic and React
    7 projects | dev.to | 19 Jul 2023
    By default, web browsers do not support gRPC, but we will use gRPC-web to make it possible.
  • Lemmy v0.18.0 Release - A reddit alternative written in Rust.
    2 projects | /r/rust | 23 Jun 2023
    You just have to use a library implementation for JavaScript https://github.com/grpc/grpc-web
  • Full Stack Forays with Go and gRPC
    5 projects | dev.to | 5 Jun 2023
    TypeScript support remains an experimental feature of gRPC.
  • Seeking Opinion: Choosing Between Gateway and Envoy Proxy for Our Microservices Architecture
    1 project | /r/SoftwareEngineering | 2 Jun 2023
  • Introducing Tempo: low latency, cross-platform, end-to-end typesafe APIs
    12 projects | /r/programming | 2 May 2023
    The gRPC-Web protocol supports HTTP/1 and can be used from a browser.
  • gRPC on the client side
    9 projects | dev.to | 16 Mar 2023
    -- grpc-web
  • Introduction to gRPC
    1 project | dev.to | 12 Mar 2023
    gRPC is mainly used in server-to-server communication, but it can also be used in client-to-server communication. gRPC-web is a gRPC implementation for web browsers. It is a JavaScript library that allows you to call gRPC services from a web browser. It supports Unary and Streaming Server API calls.
  • gRPC vs REST: Comparing API Styles in Practice
    6 projects | dev.to | 21 Feb 2023
    Since we're using Envoy, there's one more neat trick that we can employ. It turns out that Envoy also support gRPC-Web out of the box, a JavaScript client designed to support gRPC communication from the browser! That means that we can send gRPC messages over HTTP/1.1 as base64 encoded strings or as binary protobufs. Messages will be sent through our proxy and on to our backend service. The advantage of this is smaller and more efficient wire communication which should lead to better performance.
  • Understanding gRPC Concepts, Use Cases & Best Practices
    9 projects | dev.to | 15 Jan 2023
    protoc-gen-grpc-web — a plugin that allows our front end to communicate with the backend using gRPC calls. A separate blog post on this coming up in the future.

json-api

Posts with mentions or reviews of json-api. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-03-22.
  • Hatchify: The Fastest Way to Build JSON: APIs
    2 projects | dev.to | 22 Mar 2024
    In addition to saving you time on boilerplate, the API provided by Hatchify fully implements the JSON: API specification, which stipulates solid standards to define the peculiarities of CRUD REST APIs. Get back all the time spent bike-shedding how to implement standard API features like filtering, pagination, including related data, etc. JSON: API offers consistent practices for frontend and backend developers to agree on how resources are fetched and returned. Since Hatchify provides the core of your API for you, you can count on it’s standardized functionality to give your API a consistent start.
  • SQL as API
    7 projects | news.ycombinator.com | 25 Dec 2023
  • Show HN: Sunnybox – An Email API for Effortless IMAP Integration
    2 projects | news.ycombinator.com | 21 Dec 2023
    -JSON:API format responses (https://jsonapi.org) for better standardization.

    Built using Ruby on Rails, Sunnybox is designed to offer a powerful yet easy-to-use solution for developers managing email systems.

    I'd really appreciate your feedback on:

    - The API's user-friendliness and efficiency.

  • What if an SQL Statement Returned a Database?
    4 projects | news.ycombinator.com | 12 Dec 2023
    https://github.com/json-api/json-api/issues/795

    There is an atomic operations extension:

  • A View on Functional Software Architecture
    5 projects | dev.to | 10 Dec 2023
    JSON:API to format each message
  • Custom Fields: Give Your Customers the Fields They Need
    1 project | dev.to | 6 Dec 2023
    As we’re building a RESTful API that’s formatted by the JSON:API specification and store our data in a MySQL8 relational database, a few things were pretty straightforward – we need a new model and we’ll name it Custom Field (naming wasn’t an issue here 🥲).
  • How to (and how not to) design REST APIs
    3 projects | news.ycombinator.com | 1 Nov 2023
    I found json api spec[1] recently. This kind of is better standard for REST APIs. It is bit rough to handle client side but once you get the hang of it, it is breeze to use

    [1] https://jsonapi.org/

  • Building a Secure RESTful API Using NestJS and Prisma With Minimum Code
    5 projects | dev.to | 6 Sep 2023
    That's it! Now we have a complete set of RESTful CRUD APIs at "/api/zen" that conforms to the JSON:API specification, and the access policies fully protect the APIs. The API provides rich filtering and relation-fetching capabilities. The following are some examples; you can find more details here.
  • JSON Schema Store
    5 projects | news.ycombinator.com | 20 Aug 2023
    Does this have any relation to https://jsonapi.org/ ?
  • An Introduction to APIs
    2 projects | news.ycombinator.com | 30 Jul 2023
    Basic REST and JSON RPC are very simple to start with, but have common problems when application gets bigger. How do you represent relations, pagination, filtering etc? My go-to specification for structuring JSON documents is https://jsonapi.org/ It covers most basic needs of a standard API.

What are some alternatives?

When comparing grpc-web and json-api you can also consider the following projects:

ngx-grpc - Angular gRPC framework

NSwag - The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.

grpc-over-webrtc - gRPC over WebRTC

api-guidelines - Microsoft REST API Guidelines

grpcurl - Like cURL, but for gRPC: Command-line tool for interacting with gRPC servers

laravel-json-api - JSON API (jsonapi.org) package for Laravel applications.

buf - The best way of working with Protocol Buffers.

apollo - 🚀 Apollo/GraphQL integration for VueJS

webrpc - webrpc is a schema-driven approach to writing backend services for modern Web apps and networks

evans - Evans: more expressive universal gRPC client

grpc-swift - The Swift language implementation of gRPC.