All Projects → zrlio → darpc

zrlio / darpc

Licence: Apache-2.0 license
DaRPC: Data Center Remote Procedure Call

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to darpc

Jupiter
Jupiter是一款性能非常不错的, 轻量级的分布式服务框架
Stars: ✭ 1,372 (+2700%)
Mutual labels:  high-performance, rpc-framework
Tars
Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.
Stars: ✭ 9,277 (+18832.65%)
Mutual labels:  high-performance, rpc-framework
Rsf
已作为 Hasor 的子项目,迁移到:http://git.oschina.net/zycgit/hasor
Stars: ✭ 77 (+57.14%)
Mutual labels:  high-performance, rpc-framework
Fpnn
Fast Programmable Nexus Network
Stars: ✭ 220 (+348.98%)
Mutual labels:  high-performance, rpc-framework
netifi-quickstart-java
Project to assist you in getting started using Netifi.
Stars: ✭ 23 (-53.06%)
Mutual labels:  rpc-framework
integrated-manager-for-lustre
Integrated Manager for Lustre
Stars: ✭ 64 (+30.61%)
Mutual labels:  high-performance
Coyote
Framework providing operating system abstractions and a range of shared networking (RDMA, TCP/IP) and memory services to common modern heterogeneous platforms.
Stars: ✭ 80 (+63.27%)
Mutual labels:  rdma
intelli-swift-core
Distributed, Column-oriented storage, Realtime analysis, High performance Database
Stars: ✭ 17 (-65.31%)
Mutual labels:  high-performance
k8s-rdma-sriov-dev-plugin
Kubernetes Rdma SRIOV device plugin
Stars: ✭ 92 (+87.76%)
Mutual labels:  rdma
gotsrpc
Go TypeScript RPC - expose Go code over http JSON RPC to TypeScript clients, oh and gorpc is much easier with this too
Stars: ✭ 22 (-55.1%)
Mutual labels:  rpc-framework
clue
a extremely high performance log library for android. 高性能的Android日志库
Stars: ✭ 27 (-44.9%)
Mutual labels:  high-performance
ksmbd
ksmbd kernel server(SMB/CIFS server)
Stars: ✭ 181 (+269.39%)
Mutual labels:  rdma
pDPM
Passive Disaggregated Persistent Memory at USENIX ATC 2020.
Stars: ✭ 38 (-22.45%)
Mutual labels:  rdma
edap
No description or website provided.
Stars: ✭ 22 (-55.1%)
Mutual labels:  rpc-framework
django-modern-rpc
Simple XML-RPC and JSON-RPC server for modern Django
Stars: ✭ 83 (+69.39%)
Mutual labels:  rpc-framework
yastack
YAStack: User-space network-stack based on DPDK, FreeBSD TCP/IP Stack, EnvoyProxy
Stars: ✭ 90 (+83.67%)
Mutual labels:  high-performance
pykafarr
A high-performance Python Kafka client. Efficiently from Kafka to Pandas and back.
Stars: ✭ 32 (-34.69%)
Mutual labels:  high-performance
SSCTaglistView
Customizable iOS tag list view, in Swift.
Stars: ✭ 54 (+10.2%)
Mutual labels:  high-performance
LruClockCache
A low-latency LRU approximation cache in C++ using CLOCK second-chance algorithm. Multi level cache too. Up to 2.5 billion lookups per second.
Stars: ✭ 35 (-28.57%)
Mutual labels:  high-performance
DimensionChain
Main source code of Dimensionchain
Stars: ✭ 20 (-59.18%)
Mutual labels:  high-performance

DaRPC: Data Center Remote Procedure Call

DaRPC is a Java library that provides ultra-low latency RPC for RDMA capable network interfaces. The unique features of DaRPC include:

  • Ultra-low RPC latencies close to the raw hardware roundtrip latencies. (Depending on the networking hardware and the CPU intensity of the RPC call, RPC latencies of 5-6 microseconds are possible)
  • Efficient asynchronous and non-blocking RPC interfaces
  • Fine grained control over network trade-offs (interrupts, polling, CPU affinities, etc.)

Building DaRPC

DaRPC is built using Apache Maven and requires Java version 8 or higher. To build DaRPC and its example programs, execute the following steps:

  1. Obtain a copy of DaRPC from Github
  2. Make sure your local maven repo contains DiSNI, if not build DiSNI from Github
  3. Compile and package the source using: mvn -DskipTests install

How to Run a Simple Example

  1. After building DaRPC, make sure DaRPC and its dependencies are in the classpath (e.g., darpc-1.9-jar-with-dependencies.jar). Also add the DaRPC test jar (darpc-1.0-tests.jar) which includes the examples.
  2. Make sure libdisni is part of the LD_LIBRARY_PATH
  3. Make sure the RDMA network interface is configured and up on the test machines (run ibv_devices to see the list of RDMA NICs). If your machine does not have RDMA hardware, you can also use SoftiWARP from Github.
  4. Run the server: java com.ibm.darpc.examples.server.DaRPCServer -a <server IP>
  5. Run the client: java com.ibm.darpc.examples.client.DaRPCClient -a <server IP>

Maven Integration

To use DaRPC in your maven application use the following snippet in your pom.xml file:

<dependency>
  <groupId>com.ibm.darpc</groupId>
  <artifactId>darpc</artifactId>
  <version>1.9</version>
</dependency>

Basic Steps Required to Implement your own RPC Service

Define the RPC request and response messages

	public class RdmaRpcRequest implements RdmaRpcMessage {
		public static int SERIALIZED_SIZE = 16;
		
		private int cmd;
		private int param;
		private long time;
		
		public RdmaRpcRequest(){
		}

		@Override
		public void update(ByteBuffer buffer) {
			cmd = buffer.getInt();
			param = buffer.getInt();
			time = buffer.getLong();
		}

		@Override
		public int write(ByteBuffer buffer) {
			buffer.putInt(cmd);
			buffer.putInt(param);
			buffer.putLong(time);
			
			return SERIALIZED_SIZE;
		}
	}

Define the protocol

	public class RdmaRpcProtocol extends RdmaRpcService<RdmaRpcRequest, RdmaRpcResponse> {
		@Override
		public RdmaRpcRequest createRequest() {
			return new RdmaRpcRequest();
		}

		@Override
		public RdmaRpcResponse createResponse() {
			return new RdmaRpcResponse();
		}
	}

Define the actual RPC service

	public class RdmaRpcService extends RdmaRpcProtocol {
		public void processServerEvent(RpcServerEvent<RdmaRpcRequest, RdmaRpcResponse> event) throws IOException {
			RdmaRpcProtocol.RdmaRpcRequest request = event.getRequest();
			RdmaRpcProtocol.RdmaRpcResponse response = event.getResponse();
			response.setName(request.getParam() + 1);
			event.triggerResponse();
		}
	}

Start the server

	RdmaRpcService rpcService = new RdmaRpcService();
	RpcActiveEndpointGroup<RdmaRpcRequest, RdmaRpcResponse> rpcGroup = RpcActiveEndpointGroup.createDefault(rpcService);
	RdmaServerEndpoint<RpcClientEndpoint<RdmaRpcRequest, RdmaRpcResponse>> rpcEndpoint = rpcGroup.createServerEndpoint();
	rpcEndpoint.bind(addr);
	while(true){
		serverEp.accept();
	}

Call the RPC service from a client

	RpcEndpointGroup rpcGroup = RpcPassiveEndpointGroup.createDefault();
	RpcEndpoint rpcEndpoint = rpcGroup.createEndpoint();
	rpcEndpoint.connect(address);
	RpcStream<RdmaRpcRequest, RdmaRpcResponse> stream = rpcEndpoint.createStream();
	RdmaRpcRequest request = new RdmaRpcRequest();
	request.setParam(77);
	RdmaRpcResponse response = new RdmaRpcResponse();
	RpcFuture<RdmaRpcRequest, RdmaRpcResponse> future = stream.request(request, response);
	...
	response = future.get();
	System.out.println("RPC completed, return value " + response.getReturnValue()); //should print 78

Choosing the RpcEndpointGroup

RpcEndpointGroups are containers and factories for RPC connections (RpcEndpoint). There are two types of groups available and which type works best depends on the application. The RpcActiveEndpointGroup actively processes network events caused by RDMA messages being transmitted or received. The RpcPassiveEndpointGroup processes network events directly in the process context of the application. As such, the passive mode has typically lower latency but may suffer from contention to per-connection hardware resources in case of large numbers of threads. The active mode, on the other hand, is more robust under large numbers of threads, but has higher latencies. Applications can control the cores and the NUMA affinities that are used for event processing. For server-side RPC processing the active mode is always used. The DaRPC paper discusses the trade-offs between active and passive RPC processing in more detail.

Contributions

PRs are always welcome. Please fork, and make necessary modifications you propose, and let us know.

Contact

If you have questions or suggestions, feel free to post at:

https://groups.google.com/forum/#!forum/zrlio-users

or email: [email protected]

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