ogcs / okra Goto Github PK
View Code? Open in Web Editor NEWHigh performance game server framework by netty and disruptor
License: Apache License 2.0
High performance game server framework by netty and disruptor
License: Apache License 2.0
增加范例:引导快速构建网络游戏服务器
增加对配置表的支持
游戏服务器通常需要配置一些配置表内容。
一般就以下两种方式:
作者这里推荐的方式是第一种。本地文件相对来说对策划更友好(不需要额外掌握数据库相关东西)。
initialize code
增加ExecutorFactory用于创建新的Executor. 避免实现DisruptorAdapterHandler#newExecutor()方法
使代码更容易被读懂.
使用Spring boot整合无法启动TCPServer
`@SpringBootApplication
public class ServerApplication implements CommandLineRunner {
@Autowired
TcpServer tcpServer;
public static void main(String[] args) {
SpringApplication.run(ServerApplication.class, args);
}
@Override
public void run(String... strings) throws Exception {
tcpServer.start();
}
}
`
demo示例工程增加通信加密
数据通信的安全一直都是服务器关注的焦点。魔与道的交锋。
增加demo通信加密相关的实现
我的项目不怎么需要protobuf数据传输,主要是项目不怎么大;比较小,作者,能有考虑这点?
这个是不是大部分地方都需要自己写代码保证并发安全,比如玩家数据会有不同线程去修改和读取
感觉这样写业务逻辑的时候难度会增加呢
placement - 增加放置类服务器的实现。
兼容2.x的同时创建分支支持3.x版本。和Okra-Ax一起升级
精简结构,不至于被大量的Command铺满。取代[#24]的方式。在2.x版本实现
Missing two classes:
import org.ogcs.app.DefaultSession;
import org.ogcs.app.ProxySession;
Used in demo project
Demo增加排行榜系统实现.
在src/main/java/org/ogcs/netty/handler/DisruptorAdapterBy41xHandler.java源码中:
private static final ThreadLocal<Disruptor> THREAD_LOCAL = new ThreadLocal<Disruptor>() {
@OverRide
protected Disruptor initialValue() {
Disruptor disruptor = new Disruptor<>(
ConcurrentEventFactory.DEFAULT, DEFAULT_RING_BUFFER_SIZE, CACHED_THREAD_POOL, ProducerType.SINGLE, new BlockingWaitStrategy());
disruptor.handleEventsWith(new ConcurrentHandler());
// disruptor.handleExceptionsWith();
disruptor.start();
return disruptor;
}
};
这一段代码中,因为每个WorkerGroup线程访问都会创建一个Disruptor,所以会造成大量的线程不释放的问题,这个问题会伴随着客户端的增加而增加,所以在线求解。。。
等发布稳定版本之后,服务器性能基准测试
网络游戏中往往需求定时执行或按期执行某些特定的任务逻辑。
例如:
等等需求。
private volatile Channel channel;
private volatile Connector connector;
请问这个volatile是什么意思?
是为了并发的时候,这些channel或者connector会改变吗?
The demo looks very simple and your blogs seem too brief ,can you accomplish some intruction in detail?
虽然自己创建也不费劲,但提供一下的话,会更好,作者有时间的话,是否可以整理下版本?
增加对flex(flash)通信编解码支持
目前项目中的实例比较简单,且大多不完善,希望能提供一个比较详细的运行例子,以及项目整体的架构思路和演进思路,方便大家一起学习和交流!
我使用导入方式创建了工程,但core始终无法编译、打包,能给一份文档吗?
增加2D游戏中常用的A*寻路算法工具
通过扩展Spring扫描器。实现自动注册Command或者Service的功能
demo示例的代码迁移到example包下
客户端刚创建并尝试连接服务器时,调用channel方法获取连接,
并使用channel尝试写入数据时,报错.
demo和example的代码没更新,与最新的2.0 core包不符,报错,作者更新下呗,谢谢
服务器需要同时具备http/tcp 两种连接方式,如何实现呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.