All Projects → k8w → tsrpc

k8w / tsrpc

Licence: MIT License
A TypeScript RPC framework, with runtime type checking and serialization, support both HTTP and WebSocket. It is very suitable for website / APP / games, and absolutely comfortable to full-stack TypeScript developers.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to tsrpc

Ts Proto
An idiomatic protobuf generator for TypeScript
Stars: ✭ 340 (-60.74%)
Mutual labels:  protobuf, grpc, nestjs
Yarpc Go
A message passing platform for Go
Stars: ✭ 285 (-67.09%)
Mutual labels:  protobuf, grpc, rpc
Flatbuffers
FlatBuffers: Memory Efficient Serialization Library
Stars: ✭ 17,180 (+1883.83%)
Mutual labels:  protobuf, grpc, rpc
Brpc Java
Java implementation for Baidu RPC, multi-protocol & high performance RPC.
Stars: ✭ 647 (-25.29%)
Mutual labels:  protobuf, grpc, rpc
Rpc Thunderdome
A comparison between Proteus RPC and other commonly used RPC frameworks
Stars: ✭ 22 (-97.46%)
Mutual labels:  protobuf, grpc, rpc
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-83.03%)
Mutual labels:  protobuf, grpc, rpc
Grpc
An Elixir implementation of gRPC
Stars: ✭ 858 (-0.92%)
Mutual labels:  protobuf, grpc, rpc
Go Grpc Examples
This repo contains examples and implementations of different types of GRPC services and APIs using Golang.
Stars: ✭ 180 (-79.21%)
Mutual labels:  protobuf, grpc, rpc
sisyphus
Sisyphus is the way how we provide backend services.
Stars: ✭ 59 (-93.19%)
Mutual labels:  protobuf, grpc
vue-methods-promise
Let Vue methods support return Promise
Stars: ✭ 35 (-95.96%)
Mutual labels:  ajax, axios
modern-api-management
A modern approach to manage APIs effectively using Protobuf
Stars: ✭ 36 (-95.84%)
Mutual labels:  protobuf, grpc
twjitm-core
采用Netty信息加载实现长连接实时通讯系统,客户端可以值任何场景,支持实时http通讯、webSocket通讯、tcp协议通讯、和udp协议通讯、广播协议等 通过http协议,rpc协议。 采用自定义网络数据包结构, 实现自定义网络栈。
Stars: ✭ 98 (-88.68%)
Mutual labels:  protobuf, rpc
grpc-jwt-spring-boot-starter
Spring boot starter for gRPC framework with JWT authorization
Stars: ✭ 24 (-97.23%)
Mutual labels:  protobuf, grpc
drpc
drpc is a lightweight, drop-in replacement for gRPC
Stars: ✭ 1,014 (+17.09%)
Mutual labels:  grpc, rpc
grphp
PHP gRPC Framework
Stars: ✭ 19 (-97.81%)
Mutual labels:  protobuf, grpc
agentgo
Hi! Agentgo is a tool for making remote command executions from server to client with golang, protocol buffers (protobuf) and grpc.
Stars: ✭ 15 (-98.27%)
Mutual labels:  protobuf, grpc
grpc-chat
Simple Chat Server/Client implemented with gRPC
Stars: ✭ 107 (-87.64%)
Mutual labels:  protobuf, grpc
protoactor-go
Proto Actor - Ultra fast distributed actors for Go, C# and Java/Kotlin
Stars: ✭ 4,138 (+377.83%)
Mutual labels:  protobuf, grpc
axios
Axios module for Nest framework (node.js) 🗂
Stars: ✭ 95 (-89.03%)
Mutual labels:  axios, nestjs
ocaml-grpc-envoy
Using OCaml + gRPC via Envoy
Stars: ✭ 41 (-95.27%)
Mutual labels:  protobuf, grpc

TSRPC

EN / 中文

A TypeScript RPC framework with runtime type checking and binary serialization.

Official site: https://tsrpc.cn (English version is on the way)

Features

  • Runtime type checking
  • Binary serialization
  • Pure TypeScript, without any decorater or other language
  • HTTP / WebSocket / and more protocols...
  • Optional backward-compatibility to JSON
  • High performance and reliable, verified by services over 100,000,000 users

Create Full-stack Project

npx create-tsrpc-app@latest

Usage

Define Protocol (Shared)

export interface ReqHello {
  name: string;
}

export interface ResHello {
  reply: string;
}

Implement API (Server)

import { ApiCall } from "tsrpc";

export async function ApiHello(call: ApiCall<ReqHello, ResHello>) {
  call.succ({
    reply: 'Hello, ' + call.req.name
  });
}

Call API (Client)

let ret = await client.callApi('Hello', {
    name: 'World'
});

Examples

https://github.com/k8w/tsrpc-examples

Serialization Algorithm

The best TypeScript serialization algorithm ever. Without any 3rd-party IDL language (like protobuf), it is fully based on TypeScript source file. Define the protocols directly by your code.

This is powered by TSBuffer, which is going to be open-source.

TypeScript has the best type system, with some unique advanced features like union type, intersection type, mapped type, etc.

TSBuffer may be the only serialization algorithm that support them all.

API Reference

See API Reference.

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].