{"id":18793984,"url":"https://github.com/houkx/nettythrift","last_synced_at":"2025-04-13T14:32:28.232Z","repository":{"id":53798190,"uuid":"54313786","full_name":"houkx/nettythrift","owner":"houkx","description":"Thrift on Netty, support TCP/HTTP/WebSocket at same port. support multiple Protocols at same time.  multil Simple Clients with Connection Pool.","archived":false,"fork":false,"pushed_at":"2021-03-12T21:56:27.000Z","size":396,"stargazers_count":66,"open_issues_count":3,"forks_count":29,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-03-27T06:03:47.208Z","etag":null,"topics":["netty","netty-rpc","rpc","thrift"],"latest_commit_sha":null,"homepage":"","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/houkx.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}},"created_at":"2016-03-20T11:23:13.000Z","updated_at":"2024-11-09T17:42:49.000Z","dependencies_parsed_at":"2022-08-24T14:52:14.972Z","dependency_job_id":null,"html_url":"https://github.com/houkx/nettythrift","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/houkx%2Fnettythrift","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houkx%2Fnettythrift/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houkx%2Fnettythrift/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houkx%2Fnettythrift/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houkx","download_url":"https://codeload.github.com/houkx/nettythrift/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248728181,"owners_count":21152175,"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","thrift"],"created_at":"2024-11-07T21:27:42.289Z","updated_at":"2025-04-13T14:32:27.967Z","avatar_url":"https://github.com/houkx.png","language":"Java","funding_links":[],"categories":["开发框架"],"sub_categories":["RPC框架"],"readme":"# nettythrift\nen: \nA Java Server IO framework use netty and thrift.\nYou could send thrift json protol Http-GET request with Broswer line google Chrome,\nor send compactProtocol thrift data with thrift client.\n\nzh-CN:\n  一个 netty 服务端框架, 基于 thrift协议.\n  你可以通过chrome浏览器发送thrift json 协议的Http-GET 请求, 同时也可以使用thrift原生的的客户端发送压缩协议的数据.\n  \n  # 项目经过了线上高并发的考验.\n\n# Server Example\n\n     public void startServer() {\n      // different from nify, This Server:\n      // support TCP/HTTP/WebSocket At Same time.\n      // support sync/async (notFrame or Frame) At Same time.\n      // support TBinaryProtocol/TCompactProtocol/TJSONProtocol/TSimpleJSONProtocol At Same time.\n      \n      int port = 8081; // The port to bind.\n      ExecutorService threadPoolExecutor = ... // business Executor\n      \n      // Create the handler, the interface impl\n      MyService.Iface serviceInterface = new MyServiceHandler();\n\n      //en: Create the processor, you no need give a TProtocolFactory here,the protocol is dynamic, same as the client.\n      //zh-CN: 创建处理器, 你不需要指定一个TProtocolFactory, 协议是动态适应客户端的协议.\n      // you could sen\n      TBaseProcessor processor = new MyService.Processor\u003c\u003e(serviceInterface);\n    \n      ThriftServerDef serverDef = ThriftServerDef.newBuilder().listen(port)//\n\t\t\t\t.withProcessor(processor)//\n\t\t\t\t.using(threadPoolExecutor)//\n\t\t\t\t.clientIdleTimeout(TimeUnit.SECONDS.toMillis(60))//\n\t\t\t\t.build();\n       ServerBootstrap server = new ServerBootstrap(serverDef);\n       server.start();// Start Server\n    }\n \n\n# The Client\n  zh-CN:\n  你可以使用thrift原生客户端, 也可以使用这里的 client.* 项目,客户端项目主要适用于像app端这种追求依赖库尽可能小的场景.\n  \n  en:\n  you can use the orig thrift client, or this client.* project,  the clients is used in android App\n  Client Example:\n    see the TestCase in project: io.nettythrift\n    or the project client.* ;\n    \n  the project \"client.json\" is A Client use Http and TSimpleJSONProtocol.  \n  \n  there is a also a Simple Connection Pool in project: client.framedCommpact\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoukx%2Fnettythrift","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoukx%2Fnettythrift","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoukx%2Fnettythrift/lists"}