130 likes | 253 Views
Project „Neinerln". Thomas Gaech Martin Oehm 29.06.2009. Agenda. What is Neinerln? Demonstration How does it work ?. What is Neinerln?. A traditional Bavarian card game Similar to the UNO card game The aim is to get rid of your cards. Neinerln – The Cards.
E N D
Project „Neinerln" Thomas Gaech Martin Oehm 29.06.2009
Agenda • Whatis Neinerln? • Demonstration • Howdoesitwork? Thomas Gaech, Martin Oehm
WhatisNeinerln? • A traditional Bavariancardgame • Similartothe UNO cardgame • The aimistogetridofyourcards Thomas Gaech, Martin Oehm
Neinerln – The Cards • Four different colours: Thomas Gaech, Martin Oehm
Neinerln – The Cards • Andeight different values: Thomas Gaech, Martin Oehm
WhatWeHaveDone • Developed a client/serverapplicationfortwoplayers • Weused Java / Java RMI • Server: 1128 Linesofcode • Client: 856 Linesofcode Thomas Gaech, Martin Oehm
Demonstration Thomas Gaech, Martin Oehm
Howdoesitwork? • It is essential that the participating client is notified by the object server when a certain event occurs • The client needs to be informed of the updated state of the game, for example when the server has won the game. • Since remote method calls are unidirectional (from the client to the server), it is necessary to use advanced RMI features. Thomas Gaech, Martin Oehm
Polling vs. Callback Server Server … Client Client Thomas Gaech, Martin Oehm
Polling • The client polls the object server by repeatedly invoking a remote method, say hasServerWon(), until the method returns true. • It is a very costly technique in terms of system resources, as each remote method invocation takes up a separate thread on the server host, along with the system resources that its execution entails. Thomas Gaech, Martin Oehm
Callback • In RMI, client callback is a feature that allows an object client to register itself with a remote object server . • The server may then issue a remote method invocation to the client when an awaited event occurs. • With client callbacks, remote method invocations are two-way, or duplex – from the client to the server, and vice versa. Thomas Gaech, Martin Oehm
Thankyouforyourattention. Thomas Gaech, Martin Oehm