All Projects → zijan → Tatala Rpc

zijan / Tatala Rpc

Licence: apache-2.0
An easy-to-use RPC middleware, cross language and platform. Right now, there are Java and C# client available.

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Tatala Rpc

Twjitm
项目基于idea工作环境搭建的框架,添加mybatis3,spring4,springmvc4,以及redis。主要实现通过注解和反射自定义netty私有协议栈,实现在一条socket通道上传递不同的消息,采用支持tcp,udp和http协议
Stars: ✭ 26 (-52.73%)
Mutual labels:  rpc
Fusio
Open source API management platform
Stars: ✭ 946 (+1620%)
Mutual labels:  rpc
Sniper
轻量级 go 业务框架。
Stars: ✭ 1,010 (+1736.36%)
Mutual labels:  rpc
Go Zero
go-zero is a web and rpc framework written in Go. It's born to ensure the stability of the busy sites with resilient design. Builtin goctl greatly improves the development productivity.
Stars: ✭ 13,156 (+23820%)
Mutual labels:  rpc
Deepstream.io
deepstream.io server
Stars: ✭ 6,947 (+12530.91%)
Mutual labels:  rpc
Hmcon
Homematic Interface and Configuration
Stars: ✭ 30 (-45.45%)
Mutual labels:  rpc
Bgpmon
CSU's BGP Observatory code (bgpmon/pheme)
Stars: ✭ 25 (-54.55%)
Mutual labels:  rpc
Finagle
A fault tolerant, protocol-agnostic RPC system
Stars: ✭ 8,126 (+14674.55%)
Mutual labels:  rpc
Cli Chat
Cli-chat. Try it out ~
Stars: ✭ 15 (-72.73%)
Mutual labels:  rpc
Rpclib
rpclib is a modern C++ msgpack-RPC server and client library
Stars: ✭ 996 (+1710.91%)
Mutual labels:  rpc
Grpc
An Elixir implementation of gRPC
Stars: ✭ 858 (+1460%)
Mutual labels:  rpc
Takinrpc
RPC框架,基于netty,实现了远程调用、服务治理等功能
Stars: ✭ 13 (-76.36%)
Mutual labels:  rpc
Spyne
A transport agnostic sync/async RPC library that focuses on exposing services with a well-defined API using popular protocols.
Stars: ✭ 992 (+1703.64%)
Mutual labels:  rpc
Xdrpp
Stars: ✭ 7 (-87.27%)
Mutual labels:  rpc
Wiro
Wiro is a lightweight Scala library for writing HTTP routes
Stars: ✭ 44 (-20%)
Mutual labels:  rpc
Lnd Grpc Client
A python grpc client/async client for LND ⚡⚡⚡
Stars: ✭ 26 (-52.73%)
Mutual labels:  rpc
Goridge
High-performance PHP-to-Golang IPC bridge
Stars: ✭ 950 (+1627.27%)
Mutual labels:  rpc
Retc
An application used to convert razer effects to multiple output sdks.
Stars: ✭ 54 (-1.82%)
Mutual labels:  rpc
Wheel
关于net nio os cache db rpc json web http udp tcp mq 等多个小工具的自定义实现
Stars: ✭ 45 (-18.18%)
Mutual labels:  rpc
Simplerpc
A simple and fast contractless RPC library for .NET and .NET Core
Stars: ✭ 39 (-29.09%)
Mutual labels:  rpc

Tatala RPC

Version 0.3.0
Release Note: https://github.com/zijan/Tatala-RPC/wiki

Overview

Tatala is an easy-to-use RPC middleware, cross language and cross platform, that convert method signature (include callee class name, target method name, the number of its arguments and server return) into byte array, communicate with client and server base on socket.

Right now, there are Tatala-Java (client & server) and Tatala-client-csharp available.

https://github.com/zijan/Tatala/wiki/Tatala-中文教程

Download

https://repo1.maven.org/maven2/com/github/zijan/tatala/

Maven

<dependency>
	<groupId>com.github.zijan</groupId>
	<artifactId>tatala</artifactId>
	<version>0.3.0</version>
</dependency>

Features

  • Easy-to-use quickly develop and setup a network communication component
  • Cross language and platform
  • High performance and distributed
  • Binary communication protocol
  • Long lived persistent connection
  • Multi thread on both client and server side
  • Support synchronous or asynchronous method call
  • Compression for big content
  • Support clinet one-way call and server push call
  • Server return runtime exception to clien side, so client be able to rollback transaction
  • Google Protocol Buffers as object serializing solution
  • Filter control, we can add filters on server side, preprocess input byte array before call server code
  • Use zookeeper as a service registry, load balance and failover
  • Can use for cross-language RPC, high performance cache server, distributed message service, MMO game server……

Get Started

Download tatala.jar from repository. If you're using ant, change your build.xml to include tatala.jar. If you're using eclipse, add the jar to your project build path.

As you known, easy-to-use is the first consideration among Tatala features. It can make developer create RPC just like local method call. They don’t have to care about socket or thread all kind stuff.

For example, we have server logic ExampleManager.class and ExampleManagerImpl.class.

ExampleManager.java

public interface ExampleManager {
    public String sayHello(int Id, String name);
}

ExampleManagerImpl.java

public class ExampleManagerImpl implements ExampleManager{
	public String sayHello(int Id, String name) {
		return "["+Id+"]"+"Hello "+name+" !";
	}
}

We need to create a socket server class, in order to deploy our server logic on server side. In this sample, socket server listener port is 10001.

ExampleServer.java

public class ExampleServer {
	public static void main(String args[]) {
		int listenPort = 10001;
		int poolSize = 10;
		AioSocketServer server = new AioSocketServer(listenPort, poolSize);
		server.start();
	}
}

Then client side code is something like:

EasyClient.java

public class EasyClient {
	private static TransferObjectFactory transferObjectFactory;
	private static ExampleManager manager;
	
	public static void main(String[] args) {
		transferObjectFactory = new TransferObjectFactory("127.0.0.1", 10001, 5000);
		transferObjectFactory.setImplClass(ExampleManagerImpl.class);
		manager = (ExampleManager)ClientProxyFactory.create(ExampleManager.class, transferObjectFactory);
		
		String result = manager.sayHello(18, "JimT");
		System.out.println("result: "+result);
	}
}

Create TransferObjectFactory object with server ip, port ant timeout, and set implement class. Create a proxy, make method call. Of cause, client side need have that interface class (ExampleManager.class) in classpath.

That is everything from server to client. Don't have any configuration files. It is so simple, right?

There are more examples on tutorial section.

https://github.com/zijan/Tatala/wiki/Tatala-Tutorial#tutorial

https://github.com/zijan/Tatala/wiki/Tatala-中文教程

Support Type

Supported parameter and return type table

Type Java C#
bool Y Y
byte Y Y
short Y Y
chat Y Y
int Y Y
long Y Y
float Y Y
double Y Y
Date Y Y
String Y Y
byte[] Y Y
int[] Y Y
long[] Y Y
float[] Y Y
double[] Y Y
String[] Y Y
Serializable Y N
Protobuf Y Y
WrapperClass Y Y

Other Notes

Require JDK1.7, because using Java AIO.

Third part libs include Protobuf and Log4j.

License

This library is distributed under Apache License Version 2.0

Contact

QQ: 37287685

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