且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

更改游戏服务器平台

更新时间:2023-02-02 20:01:48

最简单的可能是使用类似 Nancy 的东西(使用起来超级简单)来处理 REST 命令.您可以将 Nancy webhost 项目添加到您的解决方案中,并与您的服务器一起运行,重复使用您的发布/订阅架构.此外,您还可以将 Nancy 用于某些在服务器上可能无法正常工作的客户端服务.

Easiest would probably be to use something like Nancy (which is super simple to use) to process REST commands. You can add a Nancy webhost project to your solution and run it alongside your server, reusing your pub/sub architecture. Bonus, you can then use Nancy for certain client services that may not work as well on the server.

这实际上类似于我们在没有 XNA 游戏时所做的事情,除了 Nancy 还与服务器一起直接与客户端对话,以提供某些对性能不重要的 CPU 或数据库绑定数据.我们使用 redis 来处理 Nancy 主机和服务器实例之间的 pub/sub 通信.

This is in fact similar to what we're doing with out XNA game, except Nancy also talks directly to clients, alongside the server, to serve up certain cpu or database bound data that isn't performance critical. We use redis to handle the pub/sub communication between the Nancy hosts and server instances.