OCEAN Demo - PowerPoint PPT Presentation

About This Presentation
Title:

OCEAN Demo

Description:

OCEAN Demo Nachiket Acharya – PowerPoint PPT presentation

Number of Views:88
Avg rating:3.0/5.0
Slides: 20
Provided by: nach153
Category:

less

Transcript and Presenter's Notes

Title: OCEAN Demo


1
OCEAN Demo
  • Nachiket Acharya

2
OCEAN Demo
  • Demo Implementation of OCEAN
  • Component Implementation
  • Communication
  • TSM
  • Auction
  • No Security, Negotiation and Accounting

3
How to Start ?
  • Java RunOCEAN
  • It starts the application and listens for
    broadcasts and requests
  • you can buy, sell and stopsell
  • exit gracefully

4
When it is Started
OCEANNode
Command Line Interpreter
Listen on Network for Communication From Other
nodes
Listen for Broadcasts
Port 21117
Threads
Multicast IP 228.5.6.7 Port 6789
Network
5
sell
  • Asks for Sell Rate per second and responds to
    broadcasts from buyers
  • Multi-Threaded can accept multiple buyers
  • If selled again, asks for new Sell Rate per
    second

6
sell (continued)
  • respond to broadcasts

OCEANNode set RATE_PER_SECOND
Network
7
buy
  • Sends out a broadcast for the advertisement of
    requirement of resources
  • Waits for 5 seconds for all the sellers to
    respond
  • Displays a list of sellers responded along with
    their IP addresses and Rate Information
  • Prompts for seller IP address

8
buy (continued)
  • Transfers OCEANJob object to selected buyer
  • Waits for the response from the buyer in a thread
    non-blocking remote execution
  • Displays the Output to the user.

9
buy (continued)
OCEANNode
3. Ask for seller IP
4. Migrate Job to selected seller
5. Intiate a thread to Wait for response
1. Send Broadcast
2. Initiate a thread to wait for responses From
other OCEANnodes
Network
10
stopsell
  • Zeros the Sell Rate per Second
  • Stops responding to any more broadcasts from
    buyers
  • Doesnt affect current tasks execution

11
stopsell (continued)
OCEANNode set RATE_PER_SECOND to zero
Stop responding to broadcasts
Network
12
exit
  • On the seller side, checks if the seller is
    active in executing buyers task
  • YES gives a message and doesnt exit
  • NO Exits gracefully
  • Exits on the buyer side.

13
Architecture of the System
  • class OCEANObject to communicate between any two
    OCEAN Nodes
  • Encapsulates
  • code (integer) to distinguish at the receiver
    side
  • value (float) to respond float values
  • job (OCEANJob) to migrate tasks
  • Methods to operate on these data objects

14
Architecture (continued)
  • class OCEANJob to migrate taks
  • Implements interface Xinterface
  • public void remote()
  • public void local(OCEANObject)
  • Encapsulates
  • Two methods
  • remote() executes at the seller side
  • local() utilize the results set by the
    execution of remote()
  • Executes at the buyer side
  • Implementation forced by Implementation of
    Xinterface
  • Data members on demand

15
Architecture (continued)
OCEANObject int code float value OCEANJob job
OCEANJob Data members according to
need remote() local()
16
Architecture (continued)
  • class Sender and Receiver to encapsulate the
    function of sending and receiving
  • Threaded classes
  • class OCEANAuction to contain static value of
    RATE_PER_SECOND
  • class OCEANSeller to represent various instance
    of Seller
  • Executes the remote method of OCEANJob object

17
Architecture (continued)
  • class CommandLineInterpreter interprets the
    command and initiates the appropriate execution
  • Multithreaded architecture does not block
    waiting for something
  • Broadcasting to the group for cheapest rates
    offered

18
Programming Effort
  • Atleast three threads running in the system at
    any time
  • A separate thread for each execution of a remote
    task
  • 1100 lines of Java Code distributed over 8
    classes and 1 Interface
  • 2 Weeks part-time effort

19
  • Thank you
Write a Comment
User Comments (0)
About PowerShow.com