microrpc

A simple and efficient RPC library.

License

License

GroupId

GroupId

eu.toolchain.microrpc
ArtifactId

ArtifactId

microrpc
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

microrpc
A simple and efficient RPC library.
Project URL

Project URL

https://github.com/udoprog/microrpc-java
Source Code Management

Source Code Management

https://github.com/udoprog/microrpc-java

Download microrpc

How to add to project

<!-- https://jarcasting.com/artifacts/eu.toolchain.microrpc/microrpc/ -->
<dependency>
    <groupId>eu.toolchain.microrpc</groupId>
    <artifactId>microrpc</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/eu.toolchain.microrpc/microrpc/
implementation 'eu.toolchain.microrpc:microrpc:1.0.1'
// https://jarcasting.com/artifacts/eu.toolchain.microrpc/microrpc/
implementation ("eu.toolchain.microrpc:microrpc:1.0.1")
'eu.toolchain.microrpc:microrpc:jar:1.0.1'
<dependency org="eu.toolchain.microrpc" name="microrpc" rev="1.0.1">
  <artifact name="microrpc" type="jar" />
</dependency>
@Grapes(
@Grab(group='eu.toolchain.microrpc', module='microrpc', version='1.0.1')
)
libraryDependencies += "eu.toolchain.microrpc" % "microrpc" % "1.0.1"
[eu.toolchain.microrpc/microrpc "1.0.1"]

Dependencies

compile (5)

Group / Artifact Type Version
org.slf4j : slf4j-api jar 1.7.7
eu.toolchain.serializer : tiny-serializer-core jar 1.0.0
eu.toolchain.async : tiny-async-core jar 1.0.1
io.netty : netty-all jar 4.1.0.Beta3
com.google.guava : guava jar 18.0

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.12.6

test (2)

Group / Artifact Type Version
junit : junit jar 4.11
org.mockito : mockito-core jar 1.9.5

Project Modules

There are no modules declared in this project.

MicroRPC

An efficient RPC framework built on top of Netty.

  • Supports connection pooling and retrying of requests.
  • Uses TinySerializer for efficient serialization completely under your control
  • Uses TinyAsync for expressive asynchronous operations, which adds transparency from the client to the server.

#Setup

Add microrpc as a dependency to your project.

<dependency>
  <groupId>eu.toolchain.microrpc</groupId>
  <artifactId>microrpc</artifactId>
  <version>CHANGEME</version>
</dependency>

Usage

MicroRPC uses an instance of MicroServer to maintain both outgoing connections, and a local server.

Connections are established by calling MicroServer#connect(URI), which returns a MicroConnection instance.

This instance will be usable until you call MicroConnection#close().

Requests are sent using AsyncFuture<T> MicroConnection#request(String, Serializer<T>, ...) methods, which expect you to provide a serializer for the request body, and the result body.

The returned AsyncFuture will be resolved, failed, or cancelled at the frameworks discretion and you should take appropriate action to handle these situations.

For a complete example on how to use this framework, see Server and client example

Versions

Version
1.0.1
1.0.0