{"id":49815458,"url":"https://github.com/wosyingjun/HRPC","last_synced_at":"2026-05-29T21:00:50.050Z","repository":{"id":139173442,"uuid":"67019736","full_name":"wosyingjun/HRPC","owner":"wosyingjun","description":"A light-weight high performance RPC framework base on Netty and Zookeeper","archived":false,"fork":false,"pushed_at":"2016-09-03T11:08:03.000Z","size":30,"stargazers_count":144,"open_issues_count":2,"forks_count":73,"subscribers_count":32,"default_branch":"master","last_synced_at":"2023-10-20T23:50:06.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wosyingjun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-08-31T08:42:21.000Z","updated_at":"2023-10-20T23:50:11.946Z","dependencies_parsed_at":null,"dependency_job_id":"4131e94b-7f74-47f2-b690-80ffe688ee27","html_url":"https://github.com/wosyingjun/HRPC","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/wosyingjun/HRPC","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wosyingjun%2FHRPC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wosyingjun%2FHRPC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wosyingjun%2FHRPC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wosyingjun%2FHRPC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wosyingjun","download_url":"https://codeload.github.com/wosyingjun/HRPC/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wosyingjun%2FHRPC/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33670211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-05-13T06:00:43.974Z","updated_at":"2026-05-29T21:00:50.035Z","avatar_url":"https://github.com/wosyingjun.png","language":"Java","funding_links":[],"categories":["开发框架"],"sub_categories":["RPC框架"],"readme":"##HRPC\n\u003eHRPC is a light-weight high performance RPC framework base on Netty and Zookeeper.\n\n##Features\n* Serialize by protostuff\n* High performance, load balance and failover\n* Service registration and subscription base on zookeeper\n* Support asynchronous or synchronous invoking\n* Keep-Alived connection, reconnect to server automatically\n* Dynamic proxy by cglib\n* Write less do more\n* Spring support\n\n\n##HRPC Structure\n![](http://i.imgur.com/gnoKl5b.png)\n\n##Service Registry\n![](http://i.imgur.com/ckd00L8.png)\n\n##Server Tutorial\n\n#####1. Spring configuration\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003cbeans xmlns=\"http://www.springframework.org/schema/beans\"\n           xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n           xmlns:context=\"http://www.springframework.org/schema/context\"\n           xmlns:util=\"http://www.springframework.org/schema/util\"\n           xsi:schemaLocation=\"http://www.springframework.org/schema/beans\n           http://www.springframework.org/schema/beans/spring-beans.xsd\n           http://www.springframework.org/schema/context\n           http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd\"\u003e\n\n    \n        \u003c!--扫描需求发布的服务所在的包--\u003e\n        \u003ccontext:component-scan base-package=\"com.yingjun.rpc.service.impl\"/\u003e\n        \u003ccontext:property-placeholder location=\"classpath:system.properties\"/\u003e\n    \n        \u003c!--服务端配置--\u003e\n        \u003cbean id=\"rpcServer\" class=\"com.yingjun.rpc.server.RPCServer\"\u003e\n            \u003cconstructor-arg name=\"zookeeper\" value=\"${zookeeper.address}\"/\u003e\n            \u003cconstructor-arg name=\"serverAddress\" value=\"${server.address}\"/\u003e\n        \u003c/bean\u003e\n    \u003c/beans\u003e\n\n#####2. Service interfacne\n    public interface UserService {\n        public User getUser(String phone);\n        public User updateUser(User user);\n    }\n\n#####3. Provide rpc service\n    @HRPCService(UserService.class)\n    public class UserServiceImpl implements UserService {\n    \n        @Override\n        public User getUser(String phone) {\n            User user =new User(111,\"yingjun\",phone);\n            return user;\n        }\n    \n        @Override\n        public User updateUser(User user) {\n            user.setName(\"yingjun@update\");\n            return user;\n        }\n    }\n\n\n##Client Tutorial\n#####1. Spring configuration\n    \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n    \u003cbeans xmlns=\"http://www.springframework.org/schema/beans\"\n           xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n           xmlns:context=\"http://www.springframework.org/schema/context\"\n           xmlns:util=\"http://www.springframework.org/schema/util\"\n           xsi:schemaLocation=\"http://www.springframework.org/schema/beans\n           http://www.springframework.org/schema/beans/spring-beans.xsd\n           http://www.springframework.org/schema/context\n           http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd\"\u003e\n\n    \n        \u003ccontext:annotation-config/\u003e\n        \u003ccontext:property-placeholder location=\"classpath:system.properties\"/\u003e\n        \u003c!--客户端配置--\u003e\n        \u003cbean id=\"rpcClient\" class=\"com.yingjun.rpc.client.RPCClient\"\u003e\n            \u003cconstructor-arg name=\"zookeeper\" value=\"${zookeeper.address}\"/\u003e\n            \u003c!--订阅需要用到的接口--\u003e\n            \u003cconstructor-arg name=\"interfaces\"\u003e\n                \u003clist\u003e\n                    \u003cvalue\u003ecom.yingjun.rpc.service.OrderService\u003c/value\u003e\n                    \u003cvalue\u003ecom.yingjun.rpc.service.UserService\u003c/value\u003e\n                    \u003cvalue\u003ecom.yingjun.rpc.service.GoodsService\u003c/value\u003e\n                \u003c/list\u003e\n            \u003c/constructor-arg\u003e\n        \u003c/bean\u003e\n    \n    \u003c/beans\u003e\n\n#####2. Synchronous invoking\n    UserService userService = rpcClient.createProxy(UserService.class);\n    User user1 = userService.getUser(\"188888888\");\n    logger.info(\"result:\" + user1.toString());\n\n\n#####3. Asynchronous invoking\n    AsyncRPCProxy asyncProxy = rpcClient.createAsyncProxy(UserService.class);\n    asyncProxy.call(\"getUser\", new AsyncRPCCallback() {\n         @Override\n         public void success(Object result) {\n             logger.info(\"result:\" + result.toString());\n         }\n    \n         @Override\n         public void fail(Exception e) {\n             logger.error(\"result:\" + e.getMessage());\n         }\n     }, \"188888888\");\n     \n##Why choose protostuff ?\n![](http://s5.51cto.com/wyfs02/M01/81/13/wKioL1dFyJfgnbJ1AABqzuFWzhw689.jpg-s_1893809398.jpg)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwosyingjun%2FHRPC","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwosyingjun%2FHRPC","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwosyingjun%2FHRPC/lists"}