Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: MegaJogos scales up with NIO

Introducing MegaJogos The MegaJogos site, is a successful multi-user game site, with a number of multi-player games available. Our interest in this site is not in the Portuguese language (it is a Brazilian site), nor even in the games; instead, we were

Tutorial Details:

NIO select
When Marcos sought advice on the Java Games forum for how to overcome his thread limitation, the initial response was that because most of the threads were there to service the end users, he would be better off simply creating fewer threads. The obvious solution was to reduce the number of threads required by migrating the communications component of his game to use the NIO facility. This would not solve the thread limitation problem, but because he would no longer need so many threads, it would help solve the real problem -- the need for one thread per connection. Several respondents also pointed out that each thread requires memory for two stacks (the Java runtime stack and the C-stack), which may have added up to cause the memory problem


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
MegaJogos scales up with NIO

View Tutorial:
MegaJogos scales up with NIO

Related Tutorials:

Which Java VM scales best? - JavaWorld - August 1998
Which Java VM scales best? - JavaWorld - August 1998
 
Messaging helps move Java into the enterprise - JavaWorld January 1999
Messaging helps move Java into the enterprise - JavaWorld January 1999
 
JMS: An infrastructure for XML-based business-to-business communication - JavaWorld February 2000
JMS: An infrastructure for XML-based business-to-business communication - JavaWorld February 2000
 
Make room for JavaSpaces, Part 5 - JavaWorld June 2000
Make room for JavaSpaces, Part 5 - JavaWorld June 2000
 
Java threads may not use all your CPUs - JavaWorld August 2000
Java threads may not use all your CPUs - JavaWorld August 2000
 
The Lucene search engine: Powerful, flexible, and free - JavaWorld September 2000
The Lucene search engine: Powerful, flexible, and free - JavaWorld September 2000
 
Activatable Jini services, Part 2: Patterns of use - JavaWorld October 2000
Activatable Jini services, Part 2: Patterns of use - JavaWorld October 2000
 
Think small: Java on Compaq's iPAQ
Think small: Java on Compaq's iPAQ
 
Flex your grid layout
Flex your grid layout
 
Jini's relevance emerges, Part 2
Jini's relevance emerges, Part 2
 
Should you go with JMS?
Should you go with JMS?
 
Unwrap the package statement's potential
Unwrap the package statement's potential
 
Use select for high-speed networking
Use select for high-speed networking
 
Wakeonlan
What is wakeonlan? wakeonlan is a small OS independent java program that sends 'magic packets' to wake-on-lan enabled ethernet adapters and motherboards in order to switch on the called machine.It runs on every machine with an installed 1.4 java runtime.
 
NIO Tutorials
NIO Tutorials Introduction In the words of Gregory Pierce, "NIO is one of the most important but least understood APIs that came along for the ride with JDK1.4". Couldn't have put it better myself :). The aim of this series of articles is to help you
 
JXTA Yields an Application for P2P Backups
Well, I keep saying that JXTAâ„¢ is where business needs to go to make a buck. Companies are indeed listening. 312 Inc. has just released a new JXTA product called LeanOnMe. LeanOnMe is a Peer-to-Peer off site backup tool.
 
Building Highly Scalable Servers with Java NIO
Building Highly Scalable Servers with Java NIO I/O Event Handling The I/O architecture of our router was strongly inspired by the Swing event-dispatch model. In Swing, events generated by the user interface are received by the JVM and stored in an even
 
Using SSL with Non-Blocking IO
Using SSL with Non-Blocking IO After the initial experiments with Java NIO, most developers start wondering about security; in particular, how to use SSL with Java NIO. With the traditional blocking sockets API, security is a simple issue: just set up an
 
Lucene in Action
Lucene in Action Lucene is a gem in the open-source world--a highly scalable, fast search engine. It delivers performance and is disarmingly easy to use. Lucene in Action is the authoritative guide to Lucene. It describes how to index your data, includin
 
Welcome to the MySQL Tutorials
Welcome to the MySQL Tutorials Welcome to the MySQL Tutorials Using MYSQL Database This lesson is intended to provide hands an experience with MYSQL database Backing Up and Restoring A MySQL Database In this lession you will learn how to take
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.