Pillar
Pillar 负责处理你服务器之间的通信,这样你的插件就不必再为此操心了。
Pillar 的存在是为了让服务器间的通信变得更加简单:快速且可靠地发送信息并获取响应。在服务器网络中,最大的挑战之一是确保数据交换完整无误,并能得到同样可靠的回复。Pillar 将服务器状态感知、任务分发、消息传递和分布式锁整合为一套工具集。
它的实用性取决于你的需求。你不需要一个拥有数百台服务器的庞大网络才觉得它值得使用:无论是解决某个单一的具体问题,还是成为整个网络的支柱,Pillar 都能胜任。
一个 jar 文件即可同时运行在网络两端的 Paper 服务器和 Velocity 代理上。它们通过 Redis 进行协调,因此无需部署中央协调器,也无需维护额外的服务进程。
解决的问题
你的网络运行着多个 Skyblock(天空岛)服务器。两名玩家同时请求加载岛屿 123,但请求落在了不同的服务器上。由于缺乏协调,两台服务器都加载了该岛屿,都接受了编辑操作,而在世界保存时,其中一个副本会无声无息地覆盖另一个。这会导致物品重复、建筑被回滚,以及产生无法复现的支持工单。
有了 Pillar,服务器会在任何人对世界进行操作之前确定所有权:恰好有一台服务器获得该岛屿的所有权,网络中的其余服务器都知道谁拥有它,并且如果那台服务器宕机,所有权声明会自动释放。
功能特性
- 状态感知 (Presence)。 服务器会广播自身存在。崩溃的服务器会自动退出,无需手动清理。
- 消息传递 (Messaging)。 支持单向发送、全网广播以及请求/响应模式,且不会阻塞主线程。
- 分布式锁 (Distributed locks)。 同一时间只有一台服务器拥有某项资源;如果该服务器宕机,锁会自动过期。
- 健康感知路由 (Health-aware routing)。 服务器会报告 TPS、内存使用和玩家数量,从而让玩家进入有空位的服务器。
- 玩家转移 (Player transfers)。 可以将玩家发送到特定服务器,或让 Pillar 自动选择。无论哪种方式,你都能得知操作是否成功。
- 降级模式 (Degraded mode)。 当 Redis 出现中断时,Pillar 会进入降级运行状态,而不会导致服务器崩溃。恢复过程是自动的。
- 实时诊断 (Live diagnostics)。
/pillar fleet、status、ping、doctor 和 reload 命令在 Paper 和 Velocity 上完全一致。
面向开发者
API 作为独立构件发布在 Maven Central 上:
br.com.markineo.pillar:pillar-api:0.6.2
纯 Java 实现,公共签名中不包含 Redis 或平台相关的类型。PillarSon 是一个小型开源插件,展示了其实际用法。
要求
- Redis
- 代理端:Velocity 3.4+
- 游戏服务器端:Paper 26.1.x
- 所有节点:Java 25
Pillar 是一个平台库。它不包含任何游戏逻辑、世界管理或经济系统——这些属于你的插件范畴,Pillar 的作用仅在于协调它们。
文档
安装、配置和开发者指南位于 pillar.markineo.com.br。
支持
疑问与帮助:Discord
Bug 反馈与功能请求:GitHub issues
隐私
Pillar 不收集任何数据。没有遥测、没有分析,也没有任何形式的“电话回家”行为。关于你网络的一切信息都不会离开你的基础设施。
贡献
Pillar 是基于 Apache 2.0 许可的开源项目,欢迎在 GitHub 上进行贡献。贡献指南涵盖了编码规范、环境设置以及 PR 流程。
Pillar
Pillar handles the communication between your servers, so your plugins don't have to.
Pillar exists to make communication between your servers easier: send information and get a response back, fast and reliably. One of the biggest challenges in a server network is making sure that exchange arrives intact, with an equally solid response coming back. Pillar brings server presence, task dispatch, messaging, and distributed locks together in a single set of tools.
It's practical in proportion to what you need. You don't need a network with hundreds of servers for it to be worth it: it solves anything from a single specific problem to becoming the pillar of an entire network.
A single jar runs on both sides of your network, on your Paper servers and on your Velocity proxy. They coordinate through Redis, so there is no central coordinator to deploy and no extra service to keep alive.
A problem it solves
Your network runs several Skyblock servers. Two players ask to load island 123 at the same moment, and the requests land on different servers. With no coordination between them, both servers load the island, both accept edits, and one copy silently wins when the world saves. Duplicated items, reverted builds, a support ticket nobody can reproduce.
With Pillar, the servers settle ownership before anyone touches the world: exactly one server gets the island, the rest of the network knows who has it, and the claim releases on its own if that server goes down.
Features
- Presence. Servers announce themselves. A crashed one drops out on its own, with nothing to clean up.
- Messaging. One-way sends, network-wide broadcast, and request/response, without blocking the main thread.
- Distributed locks. Exactly one server owns a resource at a time, and the claim expires by itself if that server dies.
- Health-aware routing. Servers report tick time, memory, and player count, so players land where there is room.
- Player transfers. Send a player to a specific server, or let Pillar pick one. Either way you learn whether it worked.
- Degraded mode. A Redis outage degrades Pillar instead of taking your server down. Recovery is automatic.
- Live diagnostics.
/pillar fleet, status, ping, doctor, and reload, identical on Paper and Velocity.
For developers
The API ships as a separate artifact on Maven Central:
br.com.markineo.pillar:pillar-api:0.6.2
Plain Java, no Redis or platform types in any public signature. PillarSon is a small open-source plugin showing it in use.
Requirements
- Redis
- Velocity 3.4+ on the proxy
- Paper 26.1.x on game servers
- Java 25 on every node
Pillar is a platform library. It contains no game logic, no world management, and no economy — those belong to your plugins, and Pillar exists to coordinate them.
Documentation
Installation, configuration, and developer guides live at pillar.markineo.com.br.
Support
Questions and help: Discord
Bugs and feature requests: GitHub issues
Privacy
Pillar collects nothing. There is no telemetry, no analytics, and no phone-home of any kind. Nothing about your network leaves your infrastructure.
Contributing
Pillar is open source under the Apache 2.0 license, and contributions are welcome on GitHub. The contribution guide covers coding standards, environment setup, and the PR flow.
评论 0
登录后参与评分
还没有评论,来抢沙发吧