{"id":15103655,"url":"https://github.com/furiouspws002/mini-rpc","last_synced_at":"2026-02-07T21:31:11.332Z","repository":{"id":238516137,"uuid":"796723757","full_name":"FuriousPws002/mini-rpc","owner":"FuriousPws002","description":"简化版RPC，使用netty实现远程调用与响应","archived":false,"fork":false,"pushed_at":"2024-05-06T14:37:58.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-10T23:51:12.383Z","etag":null,"topics":["netty","netty-rpc","rpc","rpc-client","rpc-server"],"latest_commit_sha":null,"homepage":"https://github.com/FuriousPws002/mini-rpc","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuriousPws002.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-06T14:05:10.000Z","updated_at":"2024-05-06T14:40:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"dfc72eed-f664-4365-b10b-99bd9d58c8b7","html_url":"https://github.com/FuriousPws002/mini-rpc","commit_stats":{"total_commits":3,"total_committers":1,"mean_commits":3.0,"dds":0.0,"last_synced_commit":"c5fcd04f4d1fb10e23da56f7c9a4a266c0e26c77"},"previous_names":["furiouspws002/mini-rpc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuriousPws002%2Fmini-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuriousPws002%2Fmini-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuriousPws002%2Fmini-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuriousPws002%2Fmini-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuriousPws002","download_url":"https://codeload.github.com/FuriousPws002/mini-rpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247335614,"owners_count":20922466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["netty","netty-rpc","rpc","rpc-client","rpc-server"],"created_at":"2024-09-25T19:41:16.733Z","updated_at":"2026-02-07T21:31:11.299Z","avatar_url":"https://github.com/FuriousPws002.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mini-rpc\n简化版RPC，使用netty实现远程调用与响应，包含如下功能\n\n1. 自定义协议\n2. 编码/解码实现\n3. 同步方式调用\n\n单元测试\n```java\npublic class ProviderConsumerTest {\n\n    @Test\n    @SneakyThrows\n    public void test() {\n        int threadNum = 20;\n        CountDownLatch latch = new CountDownLatch(threadNum);\n\n        //server\n        ProviderServiceRegistry.INSTANCE.register(HelloService.class, new HelloServiceImpl());\n        Provider provider = new Provider();\n        provider.start();\n\n        //client\n        ConsumerServiceDiscovery discovery = new ConsumerServiceDiscovery(\"localhost\", 8888);\n        HelloService helloService = discovery.get(HelloService.class);\n        final AtomicInteger atomic = new AtomicInteger();\n        for (int i = 0; i \u003c threadNum; i++) {\n            new Thread(() -\u003e {\n                String req = \"hhh_\" + atomic.incrementAndGet();\n                String resp = helloService.sayHello(req);\n                System.err.println(\"req:\" + req + \" resp:\" + resp);\n                latch.countDown();\n            }).start();\n        }\n        latch.await();\n        provider.close();\n        discovery.close();\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuriouspws002%2Fmini-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffuriouspws002%2Fmini-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffuriouspws002%2Fmini-rpc/lists"}