Patent ID: 7899017

Claim:
A method for a mobile node to perform dynamically switching between infrastructure and peer to peer communication-modes to optimize and balance network resources, the method comprising steps of: in a wireless area network wherein a plurality of mobile nodes participate in a session by accessing the wireless area network through an access point to communicate with an application server to access at least one network application: providing to the plurality of mobile nodes, in the infrastructure communication mode, by the application server, the at least one network application; determining that the access point is overloaded; using an application agent module to start a location apparatus determining that the plurality of mobile nodes are running the same network application; using the application agent module to ask the location apparatus to determine which of the plurality of mobile nodes are neighboring nodes by accessing location information of each of said mobile nodes, wherein the neighboring nodes are mobile nodes that communicate with each other directly in a peer to peer communication mode; sending an inquiry to the neighboring nodes by said application server inquiring whether the neighboring nodes want to switch to the peer to peer communication mode to run said network application; selecting one of the neighboring nodes as host node in the peer to peer communication mode by: obtaining host configuration requirements for the peer to peer communication mode from the network application of the application server; selecting the host node from the neighboring nodes, wherein the step of selecting comprises using a method selected from a group consisting of: checking a configuration of each neighboring node to judge whether said neighboring node can be used as the host node in the peer to peer communication mode; selecting the neighboring node with a best configuration as the host node of the peer to peer communication mode, wherein the best configuration comprises: a fastest CPU; and selecting the neighboring node as the host node if it has host software installed on it; downloading and installing the network application from said application server to the host node when all the neighboring nodes agree to switch to the peer to peer communication mode; downloading the session between the mobile nodes and the application server to the host node; configuring each neighboring node with communication parameters under the peer to peer communication mode; and switching all the neighboring nodes to the peer to peer communication mode and continuing to run the downloaded and installed network application in said peer to peer communication mode, such that the neighboring nodes can communicate with each other directly peer-to-peer, thereby bypassing the overloaded access point, wherein when the mobile nodes switch from the infrastructure to the peer to peer mode to optimize network resources, the application being accessed by the mobile node remains unaffected.