All Projects → apex → Rpc

apex / Rpc

Licence: mit
Simple RPC style APIs with generated clients & servers.

Programming Languages

go
31211 projects - #10 most used programming language
typescript
32286 projects
golang
3204 projects

Projects that are alternatives of or similar to Rpc

Getty
a netty like asynchronous network I/O library based on tcp/udp/websocket; a bidirectional RPC framework based on JSON/Protobuf; a microservice framework based on zookeeper/etcd
Stars: ✭ 532 (+177.08%)
Mutual labels:  rpc, json-api, rpc-framework, json-rpc
Jsonrpcserver
Process JSON-RPC requests in Python
Stars: ✭ 126 (-34.37%)
Mutual labels:  api, rpc, json-rpc
Jrpc
JSON-RPC implementation in C++17
Stars: ✭ 113 (-41.15%)
Mutual labels:  rpc, rpc-framework, json-rpc
Hprose Golang
Hprose is a cross-language RPC. This project is Hprose for Golang.
Stars: ✭ 1,143 (+495.31%)
Mutual labels:  api, rpc, rpc-framework
Hprose Java
Hprose is a cross-language RPC. This project is Hprose 2.0 for Java
Stars: ✭ 542 (+182.29%)
Mutual labels:  api, rpc, rpc-framework
Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (+416.67%)
Mutual labels:  api, rpc, rpc-framework
Jsonrpc
The jsonrpc package helps implement of JSON-RPC 2.0
Stars: ✭ 143 (-25.52%)
Mutual labels:  api, rpc, json-rpc
Autoserver
Create a full-featured REST/GraphQL API from a configuration file
Stars: ✭ 188 (-2.08%)
Mutual labels:  api, json-rpc
Jsonapi.rb
Lightweight, simple and maintained JSON:API support for your next Ruby HTTP API.
Stars: ✭ 116 (-39.58%)
Mutual labels:  api, json-api
Purerpc
Asynchronous pure Python gRPC client and server implementation supporting asyncio, uvloop, curio and trio
Stars: ✭ 125 (-34.9%)
Mutual labels:  rpc, rpc-framework
Ice
Comprehensive RPC framework with support for C++, C#, Java, JavaScript, Python and more.
Stars: ✭ 1,772 (+822.92%)
Mutual labels:  rpc, rpc-framework
Coronavirus Tracker Api
🦠 A simple and fast (< 200ms) API for tracking the global coronavirus (COVID-19, SARS-CoV-2) outbreak. It's written in python using the 🔥 FastAPI framework. Supports multiple sources!
Stars: ✭ 1,577 (+721.35%)
Mutual labels:  api, json-api
Symfony Jsonapi
JSON API Transformer Bundle for Symfony 2 and Symfony 3
Stars: ✭ 114 (-40.62%)
Mutual labels:  api, json-api
Laravel Api Boilerplate
A Boilerplate Project For Laravel API's (NOT MAINTAINED)
Stars: ✭ 113 (-41.15%)
Mutual labels:  api, json-api
Jstp
Fast RPC for browser and Node.js based on TCP, WebSocket, and MDSF
Stars: ✭ 132 (-31.25%)
Mutual labels:  api, rpc
Jsonapi Utils
Build JSON API-compliant APIs on Rails with no (or less) learning curve.
Stars: ✭ 191 (-0.52%)
Mutual labels:  api, json-api
Hprose Js
Hprose is a cross-language RPC. This project is Hprose 2.0 RPC for JavaScript
Stars: ✭ 133 (-30.73%)
Mutual labels:  rpc, rpc-framework
Kitsu Server
🚂 Rails API server for Kitsu
Stars: ✭ 145 (-24.48%)
Mutual labels:  api, json-api
Doge
Doge is a high-performance, Python based, open source RPC framework
Stars: ✭ 144 (-25%)
Mutual labels:  rpc, rpc-framework
Co
Art of C++. Flag, logging, unit-test, json, go-style coroutine and more.
Stars: ✭ 2,264 (+1079.17%)
Mutual labels:  rpc, json-rpc

RPC

Simple RPC style APIs with generated clients & servers.

About

All RPC methods are invoked with the POST method, and the RPC method name is placed in the URL path. Input is passed as a JSON object in the body, following a JSON response for the output as shown here:

$ curl -d '{ "project_id": "ping_production" }' https://api.example.com/get_alerts
{
  "alerts": [...]
}

All inputs are objects, all outputs are objects, this improves future-proofing as additional fields can be added without breaking existing clients. This is similar to the approach AWS takes with their APIs.

Commands

There are several commands provided for generating clients, servers, and documentation. Each of these commands accept a -schema flag defaulting to schema.json, see the -h help output for additional usage details.

Clients

  • rpc-dotnet-client generates .NET clients
  • rpc-ruby-client generates Ruby clients
  • rpc-php-client generates PHP clients
  • rpc-elm-client generates Elm clients
  • rpc-go-client generates Go clients
  • rpc-go-types generates Go type definitions
  • rpc-ts-client generates TypeScript clients

Servers

  • rpc-go-server generates Go servers

Documentation

  • rpc-md-docs generates markdown documentation

Schemas

Currently the schemas are loosely a superset of JSON Schema, however, this is a work in progress. See the example schema.

FAQ

Why did you create this project? There are many great options when it comes to building APIs, but to me the most important aspect is simplicity, for myself and for the end user. Simple JSON in, and JSON out is appropriate for 99% of my API work, there's no need for the additional performance provided by alternative encoding schemes, and rarely a need for more complex features such as bi-directional streaming provided by gRPC.
Should I use this in production? Only if you're confident that it supports everything you need, or you're comfortable with forking. I created this project for my work at Apex Software, it may not suit your needs.
Why JSON schemas? I think concise schemas using a DSL are great, until they're a limiting factor. Personally I have no problem with JSON, and it's easy to expand upon when you introduce a new feature, such as inline examples for documentation.
Why doesn't it follow the JSON-RPC spec? I would argue this spec is outdated, there is little reason to support batching at the request level, as HTTP/2 handles this for you.
What does the client output look like? See the Apex Logs Go client for an example, client code is designed to be concise and idiomatic.

GoDoc

Sponsored by my GitHub sponsors:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].