Quick question before they shut down google groups

34 views
Skip to first unread message

goodnews...@gmail.com

unread,
Mar 21, 2019, 6:02:49 PM3/21/19
to Netty discussions
Is this server good for high traffic loads of thousands of users?
Should I be concerned about my lock condition dropping packets?

EventLoopGroup bossGroup = new NioEventLoopGroup(1); // (1)
//EventLoopGroup.shutdownGracefully();
EventLoopGroup workerGroup = new NioEventLoopGroup(2);
try {
ServerBootstrap b = new ServerBootstrap(); // (2)
b.group(bossGroup, workerGroup)
.channel(NioServerSocketChannel.class) // (3)
.childHandler(new ChannelInitializer<SocketChannel>() { // (4)
@Override

public void initChannel(SocketChannel ch) throws Exception {

lock.lock();
dshstoreToBeCompiled.add(new DiscardServerHandler(t1));
ch.pipeline().addLast(dshstoreToBeCompiled.get(dshstoreToBeCompiled.size()-1));
if(lock.isHeldByCurrentThread())
lock.unlock();

}
})
.option(ChannelOption.SO_BACKLOG, 128) // (5)
.childOption(ChannelOption.SO_KEEPALIVE, true); // (6)

ChannelFuture f = b.bind(port).sync(); // (7)



while(true)
{
prewild();
wildloop();
System.out.println("Safe Exception");
}
}
Reply all
Reply to author
Forward
0 new messages