Docstoc

sorcersoft.orgprojectsmc-04rai.ppt

Document Sample
sorcersoft.orgprojectsmc-04rai.ppt Powered By Docstoc
					Mobile Computing
  MIDP – Network Game




      Abhijit
Objectives


 • Create a game application that allows users to
   participate over the network
 • TicTacToe – modes
   – Single player (Vs Computer), standalone
   – Two Players, Over Network
 • Porting Proth Application for Mobile devices
Implementation - Requirements

 • Midlet Registration to Device (?Dynamic or Static)
    – Push Registry
 • Midlet Publishing to Servlet (? Identity of midlet on
   servlet)
    – Http request to servlet
 • Listening For Connections
    – Sockets
    – PushRegistry.listConnections
 • Traffic
    – Lesser the data volume the lesser the air traffic
    – Minimize the size of each Message
    – Minimize the number of Messages
Traffic Management
 • Maintain system state information at the
   servlet and midlet levels
   – System state (3X3) matrix, not sent over the
     network
   – Checking for winners done at the midlet level
     as well as servlet level
 • One message sent or received per chance
   played
 • Total traffic is obviously dependent on how
   many chances the game goes on for
Messaging Protocol

 • ACK:
   A protocol sent back and forth between
   midlets and server to allow effective
   communication
 SERVER_PUBLISH=0
 CLIENT_PLAY =1
 CLIENT_QUIT =2
 CLIENT_START_CROSS=3
 GAME_START_CIRCLE=4

 • Row
 • Column
Basic Implementation
MIDlet Side
• Register the midlet
• Publish with server
• Start listening for connections in a separate thread
• Connect to server via http
• Handle received messages

Server Side
• Store the midlet as a player
• Get messages from one MIDlet
• Handle these messages (to synchronize the system state)
• Forward the messages to the other midlet
                   Demo
              TicTacToe – Network Game




                   Abhijit


Next – Proth using MIDP
Proth application using MIDP
                 Desktops                                  Servers


         W2K                    W2K                 neem Linux            yucca - Win2003


                     W2K
        Caller                  Caller                Caller                   Caller

        W2K                     W2K
                     Caller                                    yew - Solaris

                     W2K

        Caller                  Jobber
         W2K                    W2K                          Lookup Service
                                                               JavaSpaces
                     Caller                               Transaction Manager
                                                           File Store Provider
                                                             SORCER Portal
    Proth Provider       Jini Service Browser                FileStore Portal
                             Web Browser


                                         SORCER.net

          blue – SORCER infrastructure, red – domain specific, green –off the shelf
What is Proth – Brief Recap
• Proth is an application to find specific prime
  numbers
• Proth provider: Provides Proth interface to
  consolidate context for Caller
• Jobber: Creates Caller Context, Breaks them into
  jobs and sends to Callers
• Callers: Make system calls, run the application and
  return the results
   – Independent of operating systems
   – Can download and compile source code
Mobile – SORCER Proth
• Provides a UI to provide Proth input
• Creates XML using these parameters and others such as
   –   Provide name (Proth HPCC)
   –   Provider Interface (sorcer.provider.ProthRemote)
   –   Method to Invoke (computePrime)
   –   Advantages of XML
        • The provider can be written in and language, still we will be
          able to service the necessary parameters, since they are in
          form of a XML files
• The servlet is generic and can service any SORCER
  provider
• The implementation is an example of interaction of
  mobile devices with Jini and SORCER services
    Demo
Mobile – SORCER Proth




    Abhijit
Acknoledgements
I would like convey my thanks to:
  Dr. Michael Sobolewski
  Ravi
  Sekhar
  Who took interest in my TicTacToe
  standalone game and motivated me
SORCER Lab
sorcer@cs.ttu.edu

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:7/16/2013
language:simple
pages:13