programming of interactive systems

30
Programming of Interactive Systems Introduction and overview Fredrik Kilander Spring 2011

Upload: gella

Post on 14-Feb-2016

41 views

Category:

Documents


4 download

DESCRIPTION

Programming of Interactive Systems. Introduction and overview Fredrik Kilander Spring 2011. Today’s lecture. Participants Practical matters Overview of the course. Participants. Fredrik Kilander (course admin, lecturer) [email protected]. Practical matters. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Programming of Interactive Systems

Programming of Interactive Systems

Introduction and overviewFredrik Kilander

Spring 2011

Page 2: Programming of Interactive Systems

Today’s lecture

• Participants• Practical matters• Overview of the course

Page 3: Programming of Interactive Systems

Participants

• Fredrik Kilander (course admin, lecturer) [email protected]

Page 4: Programming of Interactive Systems

Practical matters

• kth.se/social course: Programmering av interaktiva system

• Daisy: https://daisy.dsv.su.se/login.jspa• Web:http:/people.dsv.su.se/~fk/id2010• Student council• Not First Class at DSV

Page 5: Programming of Interactive Systems

Overview

• Lectures:– F2: Distributed systems and their properties – F3: Design of distributed systems + asg. TAG

– F4: Introduction to networking, threading and synchronization in Java

– F5: Programming tools and tricks of the trade + asg. CHAT

– F6: Agent programming techniques– F7: A review of the article collection– F8: Course wrap and Q&A

Page 6: Programming of Interactive Systems

Overview

• Examination– Assignment examination (groups of two)– Closed literature examination (tenta)

Page 7: Programming of Interactive Systems

Overview

• Assignment CHAT– Extend a chat system written in Java/Jini– Choose from a menu of tasks

• Assignment TAG– Implement the game of Tag for mobile agents– Review, design and extend code samples into a

working demonstration

Page 8: Programming of Interactive Systems

Overview

• Assignment 2 (advanced): TAG viewer– Implement the game of Tag for mobile agents– Implement a viewer that visually portrays the

agents and their game state

Page 9: Programming of Interactive Systems

Game of tag for mobile agents

Bailiff Bailiff

JVM JVM

AgentAgent

Agent

Bailiffs and agents are Java classes running in their own threads.Each Bailiff is a service, offering object execution. Agents are clients.

Page 10: Programming of Interactive Systems

Game of tag for mobile agents

Bailiff Bailiff

JVM JVM

AgentAgent

Agent

The viewer graphically displays the presence and state of the agents in the Bailiff.Possible states: ’it’, happy, afraid, bored, sleeping, fleeing, thinking

ViewerViewer

Page 11: Programming of Interactive Systems

Overview

• Labs are executed in groups of two• Choose your own groups in Daisy• At other times use kth.se/social or email

Page 12: Programming of Interactive Systems

Examination

• Each assignment is presented with:– An oral presentation– A written report (2-3 pages)– A working demonstration

• Written closed exam on the literature

Page 13: Programming of Interactive Systems

Overview

• Literature and articles:– D. Reilly, M. Reilly (2002): “Java network programming

and distributed computing”– Waldo et al (1994): “A note on distributed computing”– Jennings (1999): “On agent-based software engineering”– Jennings (2001): “An agent-based approach for building

complex software systems”– Muir (2004): “The seven deadly sins of distributed systems”– …

Page 14: Programming of Interactive Systems

Java network programming...

• Chapter 1 - Networking theory– The layered network view– Internet architecture– Internet application protocols– Firewalls and proxies

Page 15: Programming of Interactive Systems

Java network programming...

• Chapter 2 - Java overview– Java networking considerations– Applications of Java network programming– Exceptions

Page 16: Programming of Interactive Systems

Java network programming...

• Chapter 3 - Internet addressing– Local area network addresses (MAC)– Internet protocol (IP) addresses– The domain name system

Page 17: Programming of Interactive Systems

Java network programming...

• Chapter 4 - Data streams– The java.io class– Object persistence– Object serialization

Page 18: Programming of Interactive Systems

Java network programming...

• Chapter 5 - User datagram protocol– java.net.DatagramPacket– java.net.DatagramSocket– Building a UDP Client/Server

Page 19: Programming of Interactive Systems

Java network programming...

• Chapter 6 - Transmission control protocol– Advantages of TCP over UDP– TCP and the client/server paradigm– java.net.Socket– java.net.ServerSocket– Creating a TCP client– Creating a TCP server– Exception handling

Page 20: Programming of Interactive Systems

Java network programming...

• Chapter 7 - Multi-threaded applications– Multi-threading in Java– Synchronization– Interthread communication– Thread priorities

Page 21: Programming of Interactive Systems

Java network programming...

• Chapter 8 - Implementing application protocols– Application protocol specifications– Application protocol implementation– SMTP– POP3– HTTP

Page 22: Programming of Interactive Systems

Java network programming...

• Chapter 9 - Hypertext transfer protocol– What is HTTP?– How does HTTP work?– Web clients– Web servers– Common gateway interface (CGI)

Page 23: Programming of Interactive Systems

Java network programming...

• Chapter 10 - Java servlets

Page 24: Programming of Interactive Systems

Java network programming...• Chapter 11 - Remote Method Invocation

– How does RMI work?– Defining an RMI service interface– Implementing an RMI service interface– Creating stub and skeleton classes– Creating an RMI server– Creating an RMI client– Running the RMI system– RMI packages and classes– RMI deployment issues– RMI for callbacks

Page 25: Programming of Interactive Systems

Java network programming...

• Chapter 12 - Java IDL and Corba– Architectural view of Corba– Interface definition language– From IDL to Java

Page 26: Programming of Interactive Systems

Java network programming...

• Chapter 13 - JavaMail

Page 27: Programming of Interactive Systems

A note on distributed computing

• Waldo, Wyant, Wollrath and Kendall– Programming a distributed system is not the

same as a single-host system– State is distributed– Failure is partial– How to compensate?

Page 28: Programming of Interactive Systems

On agent-based software engineeing

• Nick Jennings– Distributed systems should be built with

cooperating components– Agents are bounded wrt their environment– Agents can be robust, proactive, self-aware– Agents can be mobile– Unexpected (emerging) group behaviours

Page 29: Programming of Interactive Systems

The seven deadly sins of distributed systems

• Steve Muir• 1. Networks are unreliable in the worst possible way• 2. DNS does not make for a good naming system• 3. Local clocks are inaccurate and unreliable• 4. Large-scale systems always have inconsistencies• 5. Improbable events occur frequently in large systems• 6. Overutilisation is the steady-state condition• 7. Limited system transparency hampers debugging

Page 30: Programming of Interactive Systems

The end