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");
            }
        } 

-- 
You received this message because you are subscribed to the Google Groups 
"Netty discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/netty/bd5b3af7-b2e1-446b-aae3-97b9d885f7ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to