{"id":17955733,"url":"https://github.com/smallnest/rpcx-agent","last_synced_at":"2026-04-04T06:40:29.673Z","repository":{"id":144973321,"uuid":"85180536","full_name":"smallnest/rpcx-agent","owner":"smallnest","description":"Agent to invoke rpcx services in C++, Java, Python, C#, Ruby, etc. for rpcx 2.x","archived":false,"fork":false,"pushed_at":"2017-03-17T04:57:52.000Z","size":19,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-19T06:43:05.725Z","etag":null,"topics":["cross-platform","golang","java","rpc","rpcx"],"latest_commit_sha":null,"homepage":"","language":"Go","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/smallnest.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":"2017-03-16T09:58:42.000Z","updated_at":"2024-07-09T09:49:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"9551c62a-ee51-475c-864b-4d25f7207550","html_url":"https://github.com/smallnest/rpcx-agent","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smallnest%2Frpcx-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smallnest","download_url":"https://codeload.github.com/smallnest/rpcx-agent/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245385307,"owners_count":20606643,"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":["cross-platform","golang","java","rpc","rpcx"],"created_at":"2024-10-29T10:31:56.733Z","updated_at":"2026-04-04T06:40:29.614Z","avatar_url":"https://github.com/smallnest.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpcx-agent\n\n项目已经移至 [rpcx-ecosystem/rpcx-agent](https://github.com/rpcx-ecosystem/rpcx-agent)\n\n因为 rpcx 主要目的是为 Go 生态圈提供一个服务发现和服务治理的RPC框架，所以它并不直接支持其它编程语言的调用。但是实际情况是国内很多公司主要是用Java、PHP、C++、Python等编程语言作为主力语言，如何让使用这些语言的开发者调用rpcx的服务，是一个让人头疼的问题。\n\n国内互联网企业中使用比较多的是Dubbo和Motan，它们的用户主要使用Java和PHP开发。如果你想提供一个Go语言编写的服务，不太可能要求用户换成Go语言来调用。一个解决方案是使用跨语言的RPC框架，比如gRPC，但是它缺乏服务治理的能力，服务发现和负载均衡也需要自己实现。\n\n为了让rpcx更广泛的应用在企业的产品中，我尝试采用一种曲折而略有hack的方式来提供对rpcx的跨语言调用，这也是本项目创建的初衷。\n\n\n最基本的想法提供一个Agent, 客户通过gRPC和Agent通信，Agent将请求翻译成rpcx的格式，可以利用rpcx的服务治理的能力，在集群中选择服务进行调用，它会把服务结果返回给客户。\n\n因为客户通过gRPC和Agent进行通信，所以可以利用gRPC的跨语言的能力。只要gRPC支持的语言，都可以和rpcx进行通信。\n\n建议将Agent部署在客户机上，这样客户和Agent进行本地通信，性能损耗可以减少懂啊最少。\n\n\n目前仅支持protobuf编码的格式。\n\n客户需要知道服务的proto的定义，它会使用这个proto准备输入参数，也会根据这个proto解出返回结果。\n\n\n你可以参考 agent_test.go 看看客户是如何进行调用的。\n\n目前这个项目还是试验性的，只是进行概念性的验证，暂时不要应用在项目中。\n\n欢迎提出您的宝贵的意见和建议，也非常欢迎讨论rpcx的跨平台的解决方案。","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Frpcx-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmallnest%2Frpcx-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmallnest%2Frpcx-agent/lists"}