300 likes | 713 Views
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) fki@kth.se. Practical matters.
E N D
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) fki@kth.se
Practical matters • kth.se/socialcourse: 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
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
Overview • Examination • Assignment examination (groups of two) • Closed literature examination (tenta)
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
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
Bailiff Bailiff JVM JVM Game of tag for mobile agents Agent Agent Agent Bailiffs and agents are Java classes running in their own threads. Each Bailiff is a service, offering object execution. Agents are clients.
Bailiff Bailiff JVM JVM Game of tag for mobile agents Agent Agent Agent Viewer Viewer The viewer graphically displays the presence and state of the agents in the Bailiff. Possible states: ’it’, happy, afraid, bored, sleeping, fleeing, thinking
Overview • Labs are executed in groups of two • Choose your own groups in Daisy • At other times use kth.se/social or email
Examination • Each assignment is presented with: • An oral presentation • A written report (2-3 pages) • A working demonstration • Written closed exam on the literature
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” • …
Java network programming... • Chapter 1 - Networking theory • The layered network view • Internet architecture • Internet application protocols • Firewalls and proxies
Java network programming... • Chapter 2 - Java overview • Java networking considerations • Applications of Java network programming • Exceptions
Java network programming... • Chapter 3 - Internet addressing • Local area network addresses (MAC) • Internet protocol (IP) addresses • The domain name system
Java network programming... • Chapter 4 - Data streams • The java.io class • Object persistence • Object serialization
Java network programming... • Chapter 5 - User datagram protocol • java.net.DatagramPacket • java.net.DatagramSocket • Building a UDP Client/Server
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
Java network programming... • Chapter 7 - Multi-threaded applications • Multi-threading in Java • Synchronization • Interthread communication • Thread priorities
Java network programming... • Chapter 8 - Implementing application protocols • Application protocol specifications • Application protocol implementation • SMTP • POP3 • HTTP
Java network programming... • Chapter 9 - Hypertext transfer protocol • What is HTTP? • How does HTTP work? • Web clients • Web servers • Common gateway interface (CGI)
Java network programming... • Chapter 10 - Java servlets
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
Java network programming... • Chapter 12 - Java IDL and Corba • Architectural view of Corba • Interface definition language • From IDL to Java
Java network programming... • Chapter 13 - JavaMail
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?
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
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