130 likes | 270 Vues
Neinerln is a classic Bavarian card game similar to UNO, where players aim to discard all their cards. This project, developed by Thomas Gaech and Martin Oehm, features a client/server application allowing two players to engage with the game online. The server manages the game state, while the client requires real-time updates on events, like game outcomes. Utilizing Java and Java RMI, the project implements advanced features such as client callbacks for effective communication between the server and client. Join us to discover the intricacies of Neinerln!
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