pbf
connect-es
Our great sponsors
pbf | connect-es | |
---|---|---|
3 | 13 | |
763 | 1,196 | |
0.9% | 2.8% | |
0.0 | 9.2 | |
over 1 year ago | 2 days ago | |
JavaScript | TypeScript | |
BSD 3-clause "New" or "Revised" License | Apache License 2.0 |
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.
pbf
-
Outperform Protobuf.js with fixed-size encoding
does it beat https://github.com/mapbox/pbf ?
-
Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
at least in the frontend (without WASM), it depends.
i tested https://github.com/mapbox/pbf and while it was faster for deep/complex structs vs an unoptimized/repetative JSON blob, it was slower at shallow structs and flat arrays of stuff. if you spend a bit of time encode stuff as flat arrays to avoid mem alloc, JSON parsing wins by a lot since it goes through highly optimized C or assembly, while decoding protobuf in the JIT does not.
-
A standalone protobuf to typescript(for deno) code generator
The runtime is taken from mapbox/pbf (with basic type definitions)
connect-es
-
I Reviewed 1,000s of Opinions on gRPC
> However, it's important to note that browser support wasn't a primary focus in gRPC's design. This oversight necessitates an additional component, grpc-web, for browser accessibility. Furthermore, external services often have specific needs like caching and load balancing, which are not directly catered to by gRPC. Adopting gRPC for external services might require bespoke solutions to support these features.
The article should mention the Connect protocol for web-based Protobuf messaging:
-
Creating the Local First Stack
We can solve this with a service! Now there are many ways I could have started, but I decided to test out gRPC along the way. This was a mistake. I hoped for the best, but gRPC ended up not being a good choice for the web client. Why? you ask. The gRPC protocol works with all the bells and whistles of http when used server to server, but web clients are not as great. The Javascript client is dependent on http 2.0, and it requires a proxy like Envoy to work with a browser. What's more, I didn't love the structure of the generated web client. So through the process of working on this 'local first stack' I actually got sucked in to a big rabbit hole in making the rpc system work. I ended up going with Connect which is a tool that can create a service from a protobuf service definition, that also talks a simple http 1.1 protocol. What ultimately sold me on this solution as the best is that it also came with a very nice to use web client generation, and even plugs in to my favorite react http helper useQuery.
-
Leveraging Temporal for resilient remote procedure calls (RPC)
Our stack at Escape is written in multiple languages because each team has specific needs. We use TypeScript for its vibrant ecosystem, Python for cybersecurity research and Go for performance-sensitive tasks. To orchestrate cross-language task orchestration, we first developed a simple request-response protocol over HTTP, but it wasn't sustainable as the Escape codebase grew rapidly. We evaluated several technologies to replace our homegrown protocol, and two emerged as the most promising options: Connect and Temporal. The title gives it away, but the reason is far from obvious
- Connect RPC – A Better gRPC
-
Building a modern gRPC-powered microservice using Node.js, Typescript, and Connect
protobuf messages we’ll configure (@bufbuild/connect-es)
-
TypeScript type safety with GO
try https://github.com/bufbuild/connect-web
-
Ask HN: Why isn't JSON-RPC more widely adopted?
As for better gRPC-web, you might want to look into connect-web https://github.com/bufbuild/connect-web
- When to use gRPC vs GraphQL
-
Protobuf-ES: The Protocol Buffers TypeScript/JavaScript runtime we all deserve
They already have! Connect (https://github.com/bufbuild/connect-web) is what you're looking for, as it's grpc-web compatible.
-
Connect-Web: It's time for Protobuf/gRPC to be your first choice in the browser
Ye, fwiw there is an example code size comparison here:
https://github.com/bufbuild/connect-web/blob/main/packages/c...
I'm sure someone will chime in on the implementation details, but hopefully others can give it a try with their projects!
What are some alternatives?
protobuf - Protocol Buffers for JavaScript (& TypeScript).
ts-proto - An idiomatic protobuf generator for TypeScript
sia - Sia - Binary serialisation and deserialisation
grpc-web - gRPC for Web Clients
deno-pbf - Deno pbf port of https://github.com/mapbox/pbf
protobuf-es - Protocol Buffers for ECMAScript. The only JavaScript Protobuf library that is fully-compliant with Protobuf conformance tests.
osm - Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
buf - The best way of working with Protocol Buffers.
fast-encoding - Fast, cross-platform, small and easy-to-use base64 and hex encoding.
fastify-autoroutes - fastest way to map directories to URLs in fastify
img-encode - Encode an image to sound and view it as a spectrogram - turn your images into music
protoc-gen-validate - Protocol Buffer Validation - Being replaced by github.com/bufbuild/protovalidate