{"id":13526345,"url":"https://github.com/zfoo-project/zfoo","last_synced_at":"2025-05-14T05:10:26.191Z","repository":{"id":38318856,"uuid":"368807271","full_name":"zfoo-project/zfoo","owner":"zfoo-project","description":"💡Extremely fast enterprise server framework, can be used in RPC,  game server,  web server.","archived":false,"fork":false,"pushed_at":"2025-05-01T06:27:53.000Z","size":15962,"stargazers_count":1874,"open_issues_count":20,"forks_count":407,"subscribers_count":44,"default_branch":"main","last_synced_at":"2025-05-01T07:29:10.740Z","etag":null,"topics":["byte-buddy","cocos","cpp","game-framework","game-server","godot","godot-engine","hotswap","javassist","mongodb","netty","network","orm","rpc","serialization","spring","unity","unreal-engine","websocket"],"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/zfoo-project.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,"zenodo":null}},"created_at":"2021-05-19T09:04:28.000Z","updated_at":"2025-05-01T06:27:57.000Z","dependencies_parsed_at":"2023-12-24T07:01:34.206Z","dependency_job_id":"5c9db001-5733-416b-8ce7-7c9a0f66a36c","html_url":"https://github.com/zfoo-project/zfoo","commit_stats":{"total_commits":1870,"total_committers":45,"mean_commits":41.55555555555556,"dds":0.3165775401069518,"last_synced_commit":"da8e2f6b424f428138afe2575020ce39e0883be7"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfoo-project%2Fzfoo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfoo-project%2Fzfoo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfoo-project%2Fzfoo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zfoo-project%2Fzfoo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zfoo-project","download_url":"https://codeload.github.com/zfoo-project/zfoo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254076849,"owners_count":22010611,"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":["byte-buddy","cocos","cpp","game-framework","game-server","godot","godot-engine","hotswap","javassist","mongodb","netty","network","orm","rpc","serialization","spring","unity","unreal-engine","websocket"],"created_at":"2024-08-01T06:01:28.291Z","updated_at":"2025-05-14T05:10:26.162Z","avatar_url":"https://github.com/zfoo-project.png","language":"Java","readme":"English | [简体中文](./README_CN.md)\n\u003ca href=\"https://github.com/zfoo-project/zfoo\"\u003e\u003cimg src=\"/doc/image/logo.jpg\" width=\"30%\"\u003e\u003c/a\u003e\n\n## Ⅰ. Introduction of zfoo🚩\n\n- **Extremely fast, asynchronous, actor design, lock free, universal RPC framework, native GraalVM support**\n- High scalability, Single server deployment, microservice deployment, cluster deployment, gateway deployment\n- Can be used as a game server framework or website server framework\n- **[zfoo protocol](protocol/README.md) supports C++ Rust Java/Kotlin/Scala JavaScript/TypeScript/ES C# Go Php Ruby Lua GDScript Python Dart Swift**\n\nPerfect work development process, complete online solution\n\n- Spring projects, distributed projects, container projects, **hot update code without\n  downtime** [hotswap](hotswap/src/test/java/com/zfoo/hotswap/ApplicationTest.java)\n- Excel json csv configuration is automatically mapped and parsed, **Online hotswap\n  configuration** [storage](storage/src/test/java/com/zfoo/storage/ApplicationTest.java)\n- Automapping framework for MongoDB [orm](orm/README.md)\n- Event bus [event](event/src/test/java/com/zfoo/event/ApplicationTest.java)\n- Time task scheduling [scheduler](scheduler/README.md)\n- **Cpu, memory, hard disk, network monitoring built into the program** no code and extra tools\n  required [monitor](monitor/src/test/java/com/zfoo/monitor/ApplicationTest.java)\n\n## Ⅱ. Who uses this project\n\n\n- Projects with extremely high-performance requirements, such as website and game server frameworks, single server, global server, live chat, IM system, real-time push\n- Projects such as saving, development, deployment, operation and maintenance costs\n- As a backend infrastructure for **Godot, Unity, Cocos，Webgl, H5**, Network protocol supports tcp udp websocket http\n- [Keep it Simple and Stupid](https://baike.baidu.com/item/KISS原则/3242383), simple configuration, lightweight code\n\n## Ⅲ. Maven dependency✨\n\n\n- Environment requirement **JDK 17+**, support **OpenJDK**, **Oracle JDK** and **native GraalVM**\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.zfoo\u003c/groupId\u003e\n    \u003cartifactId\u003eboot\u003c/artifactId\u003e\n    \u003cversion\u003e4.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n- If you don't want to depend on all zfoo modules, you only need to choose to depend on one of them\n\n```\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.zfoo\u003c/groupId\u003e\n    \u003cartifactId\u003eprotocol\u003c/artifactId\u003e\n    \u003cversion\u003e4.1.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Ⅳ. Tutorials\n\n\n- [zfoo sdk of csharp and lua for unity and godot](https://github.com/zfoo-project/zfoo-sdk-csharp-lua-unity-godot)\n- [zfoo sdk typescript javascript cocos web h5](https://github.com/zfoo-project/zfoo-sdk-typescript-javascript-cocos-web-h5)\n- [zfoo sdk gdscript for godot](https://github.com/zfoo-project/zfoo-sdk-gdscript-godot)\n- [jc-site](https://github.com/zfoo-project/jc-site) AI website\n- [tank-game-server](https://github.com/zfoo-project/tank-game-server)\n- [godot-bird](https://github.com/zfoo-project/godot-bird) bird and bird，powered by godot\n- [FAQ](./doc/FAQ.md)，There are standard demo display and instructions in the test folder of each project directory,\n  which can be run directly\n\n## Ⅴ. Usage⭐\n\n\n#### 1. [protocol](protocol/README.md) ultimate performance serialization and deserialization\n\n```\n// protocol registration\nProtocolManager.initProtocol(Set.of(ComplexObject.class, ObjectA.class, ObjectB.class));\n\n// serialization\nProtocolManager.write(byteBuf, complexObject);\n\n// deserialization\nvar packet = ProtocolManager.read(byteBuf);\n```\n\n#### 2. [net](net/README.md) ultimate performance RPC framework, supports tcp udp websocket http\n\n```\n// Service provider, only need to add an annotation to the method, the interface will be automatically registered\n@PacketReceiver\npublic void atUserInfoAsk(Session session, UserInfoAsk ask) {\n}\n\n// Consumers, synchronously requesting remote service, will block the current thread\nvar userInfoAsk = UserInfoAsk.valueOf(userId);\nvar answer = NetContext.getCosumer().syncAsk(userInfoAsk, UserInfoAnswer.class, userId).packet();\n\n// Consumers, asynchronously requesting remote service, and will still execute logic in the current thread after the asynchronous\nNetContext.getCosumer().asyncAsk(userInfoAsk, UserInfoAnswer.class, userId)\n          .whenComplete(sm -\u003e {\n              // do something\n          );\n```\n\n#### 3. [hotswap](hotswap/src/test/java/com/zfoo/hotswap/ApplicationTest.java) hot update code, no need to stop the server, no additional configuration, just one line of code to start hot update\n\n```\n// Pass in the class file that needs to be updated\nHotSwapUtils.hotswapClass(bytes);\n```\n\n#### 4. [orm](orm/README.md) automatic mapping framework based on mongodb\n\n```\n// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions\n@EntityCache\npublic class UserEntity implements IEntity\u003cLong\u003e {\n    @Id\n    private long id;\n    private String name;\n}\n\n// update database data\nentityCaches.update(userEntity);\n```\n\n#### 5. [event](event/src/test/java/com/zfoo/event/ApplicationTest.java) use the observer design pattern, decouples different modules and improves the quality of the code\n\n```\n// To receive an event, you only need to add an annotation to the method and the method will be automatically listen for the event\n@EventReceiver\npublic void onMyNoticeEvent(MyNoticeEvent event) {\n    // do something\n}\n\n// fire an event\nEventBus.post(MyNoticeEvent.valueOf(\"My event\"));\n```\n\n#### 6. [scheduler](scheduler/README.md) scheduling Framework Based on Cron Expression\n\n````\n@Scheduler(cron = \"0/1 * * * * ?\")\npublic void cronSchedulerPerSecond() {\n    // do something\n}\n````\n\n#### 7. [storage](storage/src/test/java/com/zfoo/storage/ApplicationTest.java) Excel to class automatic mapping framework, you only need to define a class corresponding to Excel, and directly parse Excel\n\n```\n@Storage\npublic class StudentResource {\n    @Id\n    private int id;\n    @Index\n    private String name;\n    private int age;\n}\n```\n\n## Ⅵ. Commit specification👏\n\n- People who like this project are welcome to maintain this project together, and pay attention to the following\n  specifications when submitting code\n- The code formats use the default formatting of IntelliJ Idea\n- [conventional-changelog-metahub](https://github.com/pvdlg/conventional-changelog-metahub#commit-types)\n\n## Ⅶ. License\n\nzfoo use [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)\n\n![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)\n","funding_links":[],"categories":["Game-Server-framework","Other","Java","网络编程"],"sub_categories":["3D"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfoo-project%2Fzfoo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzfoo-project%2Fzfoo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzfoo-project%2Fzfoo/lists"}