https://github.com/thegenius/hera
A brave new RPC framework
https://github.com/thegenius/hera
rpc
Last synced: about 1 year ago
JSON representation
A brave new RPC framework
- Host: GitHub
- URL: https://github.com/thegenius/hera
- Owner: thegenius
- License: other
- Created: 2017-08-07T10:48:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-14T07:24:43.000Z (over 8 years ago)
- Last Synced: 2025-01-29T22:18:15.620Z (about 1 year ago)
- Topics: rpc
- Language: Java
- Size: 149 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hera
[](https://travis-ci.org/thegenius/hera)
[](https://codecov.io/gh/thegenius/hera)
[](http://search.maven.org/#search%7Cga%7C1%7Chera)
[](https://www.apache.org/licenses/LICENSE-2.0)
This is a brave new java rpc framework.
## Support:
[1] asm generated proxy, faster than jdk dynamic proxy.
[2] function overload without annotations and configures.
[3] future based async call.
[3] server and client in the same node with same thread pool.
[4] clean exception message, when you have trouble then you will have useful tip.
## Hello World
```java
package com.lvonce;
import com.lvonce.hera.logger.RpcLogger;
import com.lvonce.hera.HeraNode;
public class App {
public static interface Service {
public String hello(String name);
}
public static class Provider implements Service {
public String hello(String name) {
return "Hello " + name;
}
}
public static void main(String[] args) {
if (args[0].equals("a")) {
HeraNode.exports(new Provider(), Service.class);
HeraNode.start(3721);
}
if (args[0].equals("b")) {
Service service = HeraNode.imports(Service.class, "127.0.0.1", 3721);
String result = service.hello("World!");
RpcLogger.info(App.class, result);
}
}
}
```
You can run the example within the example directory by following command:
```
cd example/helloworld
mvn clean package
java -jar target/example-1.0-SNAPSHOT-jar-with-dependencies.jar a &
java -jar target/example-1.0-SNAPSHOT-jar-with-dependencies.jar b
```
## QUICK START
Now you can use maven to integrate hera with your own project:
```
com.lvonce
hera
0.0.2
```
## DESIGN

## ROADMAP
This framework will follow the following versiont strategy:
major.minor.fixOrUpdate
minor with odd number: new futures and new interface
minor with even number: performance and stablity