[DiscordArchive] why not use ECS to implement the world engine?
[DiscordArchive] why not use ECS to implement the world engine?
Archived author: JORGIE • Posted: 2021-02-26T19:24:34.495000+00:00
Original source
why not use ECS to implement the world engine?
Archived author: MaxHayman • Posted: 2021-02-26T19:25:23.549000+00:00
Original source
because you dont want to rewrite the whole of trinitycore
Archived author: MaxHayman • Posted: 2021-02-26T19:26:05.908000+00:00
Original source
although using C# for a mmo server (not wow) we were using 30% cpu doing encryption/decryption. Doing that via C interop reduced it to <1% /w ~4k ccu
Archived author: MaxtorCoder • Posted: 2021-02-26T19:28:37.669000+00:00
Original source
Then ur definitelty doing crypt wrong of it takes 30% cpu
Archived author: MaxHayman • Posted: 2021-02-26T19:29:37.557000+00:00
Original source
Same code in C# and C
Archived author: JORGIE • Posted: 2021-02-26T19:29:41.502000+00:00
Original source
java use the reactive to implement the IO
Archived author: MaxHayman • Posted: 2021-02-26T19:29:57.412000+00:00
Original source
700mb/s of throughput
Archived author: JORGIE • Posted: 2021-02-26T19:31:17.586000+00:00
Original source
```java
public WorldServer worldServer(ApplicationContext ctx) {
return WorldServer.create()
.runOn(LoopResources.create("ws-io-worker", 1, 2, true), true)
.option(ChannelOption.SO_REUSEADDR, Boolean.TRUE)
.option(ChannelOption.SO_RCVBUF, 1024 * 16)
.option(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
.option(ChannelOption.RCVBUF_ALLOCATOR, new AdaptiveRecvByteBufAllocator(255, 2048, 65535))
.childOption(ChannelOption.SO_KEEPALIVE, Boolean.TRUE)
.childOption(ChannelOption.SO_RCVBUF, 1024 * 16)
.childOption(ChannelOption.SO_SNDBUF, 1024 * 16)
.childOption(ChannelOption.TCP_NODELAY, Boolean.TRUE)
.childOption(ChannelOption.ALLOCATOR, PooledByteBufAllocator.DEFAULT)
.doOnChannelInit((observer, channel, address) -> {
channel.pipeline().addLast(new WorldPacketFrameDecoder());
channel.pipeline().addLast(new WorldPacketProtoDecoder());
}).route(routes -> {
routes.route((request) -> request.getSession().getState() == SessionState.CONNECTED, ctx.getBean(AuthorizationHandler.class)::onConnection);
routes.route(RecvPacketOpcode.CMSG_AUTH_SESSION, ctx.getBean(AuthorizationHandler.class)::authSession);
configRoute(routes, ctx);
});
}
```
Archived author: JORGIE • Posted: 2021-02-26T19:32:56.937000+00:00
Original source
the 2 threads can handle 1000+ concurrency?
Archived author: JORGIE • Posted: 2021-02-26T19:35:57.653000+00:00
Original source
all reactive.