F2F Computing An Introduction Ulrich Norbisrath Teooriapevad Plvas - - PowerPoint PPT Presentation

f2f computing an introduction
SMART_READER_LITE
LIVE PREVIEW

F2F Computing An Introduction Ulrich Norbisrath Teooriapevad Plvas - - PowerPoint PPT Presentation

F2F Computing An Introduction Ulrich Norbisrath Teooriapevad Plvas 2008/01/26 Ulrich Norbisrath (http://ulno.net) F2F Computing An Introduction 2008/01/24 University of Tartu http://f2f.ulno.net 1/15 Outline Anecdote


slide-1
SLIDE 1

2008/01/24 1/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

F2F Computing – An Introduction

Ulrich Norbisrath Teooriapäevad Põlvas 2008/01/26

slide-2
SLIDE 2

2008/01/24 2/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Outline

  • Anecdote – final computations
  • The Grid yesterday – small history
  • The Grid today – some new approaches
  • The Grid tomorrow – F2F Computing
  • Demo – how you should not compute Pi
  • F2F Computing 2.0 (F2F2) – the future of F2F
slide-3
SLIDE 3

2008/01/24 3/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Final Computations

  • Student must do final computations for

deadline

– (of course to late, evening before)

  • Big computational task (needs about 100

hours computation time, i.e. rendering)

  • What to do now?
slide-4
SLIDE 4

2008/01/24 4/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

The Grid Yesterday A Small History

  • One computer -> Supercomputer
  • Supercomputer -> Cluster Computer
  • Cluster computer -> Grid

– Networked clusters and single computers – Managed – Sophisticated security model

  • However:

Administrative effort enormous for users and system administrators

slide-5
SLIDE 5

2008/01/24 5/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

The Grid Today

  • Moving to webservices

– Ease for users: better documentation, debugging – Ease for administrators: better compatibility

  • Desktop Grids

BOINC (SETI@home at.al.), MiG

– Ease for users: very much (no effort at all)

(MiG: zero size install, just web-browser)

– Ease for administrators: nearly no ease

slide-6
SLIDE 6

2008/01/24 6/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

The Grid Tomorrow – The Frid

  • How can we set up a Grid spontaneously

without effort?

– no effort for administrators – no effort for users

  • How can it be as easy as making a

conference chat in Skype or other Instant messaging (IM) programs?

  • Answer: combine social networks from IM

with peer-to-peer (P2P)

  • > Friend to Friend -> Frid
slide-7
SLIDE 7

2008/01/24 7/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

The structure, we find today

F2F Client Ulrich F2F Client Jenn F2F Client Ilja F2F Client Eero WLAN MSN, Jabber (Googletalk), Yahoo, ICQ, AOL, [Skype] NAT NAT STUN

192.168.2.99 192.168.4.11 192.168.4.10 1.2.3.45 192.168.4.1 192.168.2.1 1.2.1.34 1.2.2.56 Jabber MSN Jabber Jabber MSN

slide-8
SLIDE 8

2008/01/24 8/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

F2F Computing Architecture

Application layer Computation layer Communication layer F2FComputing GUI SIP Communicator GUI plugin (multi-protocol chat) F2F applications SIP Communicator Instant Messaging

MSN ICQ Jabber YAHOO AOL (Skype)

TCP IPv4 UDP IPv4

Stun

(JXTA) (Skype)

F2FCore

Peer Job Task F2FComputing API (IPv6)

slide-9
SLIDE 9

2008/01/24 9/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

F2F Application Development Concepts

Pe e r

is frie nd

Job T a sk

is cre a te d by knows runs in consists of * * * * * * * 1 1 1

slide-10
SLIDE 10

2008/01/24 10/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Monte Carlo Pi (don't try this at home)

1 1

  • depicted area is
  • choose uniformly

distributed random points

  • compute average

and multiply with 4 8/10 * 4 = 3.2

  • do this >>10 times
  • 3.1415926...

 4

slide-11
SLIDE 11

2008/01/24 11/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Demo

slide-12
SLIDE 12

2008/01/24 12/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Master (1/2)

public class PiMasterTask extends Task { public void runTask() { this.getJob().submitTasks( "ee.ut.f2f.examples.pi.PiSlaveTask", this.getJob().getPeers().size(), this.getJob().getPeers()); Collection<String> taskIDs = this.getJob().getTaskIDs(); // TaskIDs // Get Proxies Collection<TaskProxy> slaveProxies = new ArrayList<TaskProxy>(); for (String taskID: taskIDs) { if (taskID == this.getTaskID()) continue; // not mastertask TaskProxy proxy = this.getTaskProxy(taskID); if (proxy != null) slaveProxies.add(proxy); }

slide-13
SLIDE 13

2008/01/24 13/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Master (2/2)

long intervalms = 2000L; // compute interval long maxpoints = 1000000000L; // total points to compute AtomicLongVector received = new AtomicLongVector( 0, 0 ); for (TaskProxy proxy: slaveProxies) { // Send intervaltime proxy.sendMessage(new Long(intervalms)); } while (received.getUnSyncTotal() < maxpoints) { Thread.sleep(100); for (TaskProxy proxy: slaveProxies) { // check proxies while (proxy.hasMessage()) { AtomicLongVector receivedvector = (AtomicLongVector) proxy.receiveMessage(); received.add( receivedvector ); } } } F2FDebug.println("The computed Pi is : " + received.getUnSyncPositive() * 4.0 / received.getUnSyncTotal()); } }

slide-14
SLIDE 14

2008/01/24 14/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

Slave

public class PiSlaveTask extends Task { AtomicLongVector computedPoints = new AtomicLongVector (0,0); MersenneTwisterRNG random = new MersenneTwisterRNG(); public void runTask() { TaskProxy masterProxy = this.getTaskProxy(this.getJob().getMasterTaskID()); long intervalms = ( (Long)masterProxy.receiveMessage() ).longValue(); // Start a thread which computes the points ComputePoints compTask = new ComputePoints (); compTask.start(); while (true) { // Send the computed points back to the master Long stopcondition = (Long) masterProxy.receiveMessage( intervalms ); if ( stopcondition != null ) if ( stopcondition.longValue() == 0 ) break; masterProxy.sendMessage( computedPoints ); computedPoints.set(0, 0); } //reset } private class ComputePoints extends Thread { public void run() { double x = random.nextDouble(); double y = random.nextDouble(); if( x*x + y*y < 1.0 ) // check if in circle computedPoints.positiveHit(); else computedPoints.negativeHit(); } } }

slide-15
SLIDE 15

2008/01/24 15/15 Ulrich Norbisrath (http://ulno.net) University of Tartu F2F Computing – An Introduction http://f2f.ulno.net

F2F Computing 2.0 (F2F2)

  • In communication layer

– UDP hole punching – Skype adapter

  • Real P2P applications

(not only embarassingly parallel)

– MPI layer – Network topology – F2F2F – Correspoding security/trust concept

  • Adapters to classic Grids