400 likes | 533 Views
Reliable Service Scheduler in a Distributed Web Service Environment. John Bouchard Brad Tiffany Ethan Towne Daniel Richard. Are We Done Yet?!?!?!. Recap of Project. Service scheduler in a web service environment. Application Server. Applications. Two Applications QB Rating Calculator
E N D
Reliable Service Scheduler in a Distributed Web Service Environment John Bouchard Brad Tiffany Ethan Towne Daniel Richard
Recap of Project • Service scheduler in a web service environment Application Server
Applications • Two Applications • QB Rating Calculator • Base Conversion Tool • Two Versions • Windows Application • PDA Application
Application Design • Create Windows Application • Redesigned UI for PDA • Client-Server Model PDA Applications use Client – Server Model
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Client Side Server Side XML Writer XML Reader Server Side Processing XML Writer XML Reader
Demo Time! QB Rating Calculator Application VS. primecomputing.com QB rating calculator ------------------------------------------------------- Comparison of PDA Base Conversion Tool Vs. Windows Calculator Application
Flagship Application • Application Choice: • Avatar Chat Environment-2D • Combines Game, Chat, Utility • Game: Interactive, Fun • Chat: Real-time communication • Utility: Navigate services • Parallels previous team’s Flagship
Flagship Application textmap.push("##.#.#.#...#O#O#O..######.#.##"); textmap.push("##.###.#...O....#..#......#.##"); textmap.push("##.#.#.#...#.,*.O..#.######.##"); textmap.push("##.........O.*,.#..#......#.##"); textmap.push("##..###....#....O..######.#.##"); textmap.push("##.#...#...O#..O#.........#.##"); textmap.push("##.#...#....O..#...########.##");
Flagship Application • Work remaining: • Port to PocketPC • Share info with C# host (on same system) • Add functionality
Service Manager Overview and Important Design Decisions Ethan Towne
Service Manager Design Service Manager Accepts Client Connections Alters Agent Queue in Scheduler Spawns Service Agent Spawns Service Agent Agent 3 To Client Agent 2 To Client
Service Agents • Each service has own thread called an “agent” • Each agent only runs when their turn has come
Design Decisions • Asynchronous vs. Synchronous data reception. • Using polymorphism to launch client applications • SQL queries used to pull data for server implementation • Data Transfer Protocol
Synchronous • Listening to a socket blocks the thread until data arrives.
Asynchronous • Listening to a socket creates a new thread and blocks that thread.
Polymorphism • Clients implement a common interface (Base Class). • Server creates a pointer of type interface (Base Class). • Pointer can then dynamically be set to point to the needed client application.
Database Backend tblUser Fields: Key: usrUD Name Pass Info etc. relServices FK: usrID FK: srvcID tblServices Fields: Key: srvcID Service Name Usage Info etc.
SQL Statements • Used to query database for unique data sets. A simple query: "Select * from testTable WHERE Name='"+name+ "' AND Pass='"+pass+"'"
Relational Statements • Used to select datasets from 2 or more tables. For example: “Select * FROM testTable, testTable2 WHERE testTable.userId = 5 AND testTable.userID = testTable2.userID;
Data Transfer Protocol XML used to transfer data. ToXML() and FromXML() Wraps/Unwraps data transferred into packets containing important data for the server.
Service Scheduler Daniel Richard
Abstract • Service Scheduler Design • Handling Input • What needs to be completed • Final Product • Recap
Scheduler Soft Real- Time Queue Priority Queue Dispatcher (service activator) .Net Runtime S1 S3 S2 S4
Input Buffer Queue • All Input is passed into an Input Buffer Queue. • The packets are scheduled according to their priority or deadline. • The service agent will be given control of CPU when their packet is dispatched.
What’s Next? • Implementation of the Service Scheduler • Complete Implementation of the Client-Server Model • Integration of Client and Server
Finished Product • Server executable • Requires .Net Framework • Client executable • Runs on PDA or Emulator • Fully Documented Code
Future Semesters • Expand on Database backend • Add PC version of the Client program • Add more Client programs and services • Expand on Flagship Application • Possibilities are endless
Recap • Demo of PDA Applications • Flagship Application • Service Manager • Service Scheduler • Finished Product