发布于 2017-02-27 06:53:28 | 126 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的精品教程,程序狗速度看过来!

Firefly 分布式游戏服务器端框架

Firefly是免费、开源、稳定、快速扩展、能 “热更新”的分布式游戏服务器端框架,采用Python编写,基于Twisted框架开发。它包括了开发框架和数据库缓存服务等各种游戏服务器基础服务,节省大量游戏开发的工作时间,真正做到让使用者把精力放在游戏玩法逻辑上。用它可以搭建自定义的分布式架构,只需要修改相应的配置文件即可。


Firefly 4.0.21 发布了。Firefly 4.0.21 提供了全新的函数风格的API来构建web应用,并删除大量的弃用代码。Firefly 4.0.21 仅支持Java 8。

用函数风格编写web应用的例子:

public class HelloHTTPServerAndClient {      public static void main(String[] args) {          Phaser phaser = new Phaser(2);            HTTP2ServerBuilder httpServer = $.httpServer();          httpServer.router().get("/").handler(ctx -> ctx.write("hello world! ").next())                    .router().get("/").handler(ctx -> ctx.end("end message"))                    .listen("localhost", 8080);            $.httpClient().get("http://localhost:8080/").submit()           .thenAccept(res -> System.out.println(res.getStringBody()))           .thenAccept(res -> phaser.arrive());            phaser.arriveAndAwaitAdvance();          httpServer.stop();          $.httpClient().stop();      }  }

更多的例子可以参考 Firefly 文档

更新日志:

  • HTTP tunnel请求支持

  • 为HTTP服务器/客户端,TCP服务器/客户端,全新设计的函数风格的API

  • 增加了强大的HTTP路由功能

  • 使用Boring SSL引擎替换了JDK SSL引擎

  • Mustache模板引擎支持

  • 日志增加单个文件最大长度设置

  • 修复了一些bug



历史版本 :
Firefly 4.7.0 正式版发布,增加新的 WebSocket APIs
Firefly 4.6.0 正式版发布,新增OpenSSL引擎支持
Firefly 4.5.0 正式版发布
Firefly 4.0.21 发布,Java 的 Web 框架
最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务