Giter Club home page Giter Club logo

hera's Introduction

Hera

travis-ci codecov maven-central apache-license

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

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:

<dependency>
    <groupId>com.lvonce</groupId>
    <artifactId>hera</artifactId>
    <version>0.0.2</version>
</dependency>

DESIGN

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

hera's People

Contributors

thegenius avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.