Top Banner
GRIDBUS Alchemi Sample Application Conclusion Alchemi: A .NET Grid Application Framework Michael R. Head Grid Computing Research Laboratory Binghamton University [email protected] April 20, 2007 Michael R. Head Alchemi: A .NET Grid Application Framework
23

Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

Aug 18, 2018

Download

Documents

trankhanh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Alchemi: A .NET Grid Application Framework

Michael R. Head

Grid Computing Research LaboratoryBinghamton University

[email protected]

April 20, 2007

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 2: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Outline

1 GRIDBUS

2 Alchemi

3 Sample Application

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 3: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

GRIDS

GRId computing and Distributed Systems (GRIDS)LaboratoryThe University of Melbourne, Australia

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 4: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

GRIDBUS

“The project name GRIDBUS is derived from its researchtheme: to create next-generation GRID computing andBUSiness technologies that power the emerging eScienceand eBusiness applications.”– http://www.gridbus.org/intro.html

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 5: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

GRIDS Projects

Grid Economy and SchedulingData Grid Brokering and SchedulingCooperative Coupling of ClustersGrid Simulation (GridSim)Gridscape II: A Customisable and Pluggable GridMonitoring Portal and its Integration with Google Maps

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 6: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Alchemi - Plug & Play Desktop Grid Computing

.NET-basedOpen Source frameworkfor Building Grid Applications

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 7: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Basic Architecture

Internet

User uses API’s and toolsto create and run gridapplications.

Central controllerallocates units ofcomputation to workersand stores results.

Workers execute units ofcomputation and return results tocentral controller.

Internet

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 8: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Block Diagram

Alchemi Manager

e-Science Application

e-Business Application

e-Engineering Application

Windows-based machines with .NET Framework

Precompiled executables

e-Commerce Application

AlchemiExecutor

AlchemiExecutor

AlchemiExecutor

Alchemi Jobs(XML representation)

Grid Threads (.NET objects)

Alchemi .NET API(Object-Oriented

Grid Programming)Alchemi Console

InterfaceAlchemi Cross-

Platform Manager

Alchemi Manager

e-Science Application

e-Business Application

e-Engineering Application

Windows-based machines with .NET Framework

Precompiled executables

e-Commerce Application

AlchemiExecutor

AlchemiExecutor

AlchemiExecutor

Alchemi Jobs(XML representation)

Grid Threads (.NET objects)

Alchemi .NET API(Object-Oriented

Grid Programming)Alchemi Console

InterfaceAlchemi Cross-

Platform Manager

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 9: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Interface with “Legacy” Grids

E

M

E EE

X

E

U

Custom GridMiddleware

M

X

E

U User Node

Manager Node

Executor Node

Cross PlatformManager Node

Legend

E

M

E EE

X

E

U

Custom GridMiddleware

M

X

E

U

M

X

E

U User Node

Manager Node

Executor Node

Cross PlatformManager Node

Legend

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 10: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Intra-Application Communication

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 11: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 12: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Performance vs. Number of Nodes with a SimpleApplications

0

50

100

150

200

250

300

350

400

450

1000 1200 1400 1600 1800 2000 2200

Thread Size (no. of digits of Pi)

Exe

cuti

on

Tim

e(s

eco

nd

s)

1 Executor

2 Executors

3 Executors

4 Executors

5 Executors

6 Executors

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 13: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Limitations

SecurityAuthorization framework in placeAuthentication is weak (password only)Passwords stored plaintext in a databaseApplication left to handle malicious Executors

Windows-onlyCrossPlatformManager is there, but may not be usefulMight run with Mono on Unix and OS/X

Releases aren’t dependable1.0.6 didn’t work for me,1.0.5 Executor doesn’t shut down

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 14: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

CG Animation Rendering “for SOA”

DeveloperWorks tutorialUsing POV-Ray ray tracerRender frames in an animation scene into multiple PNGfiles

Uses one executor per frame

SOAP interface

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 15: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Hello.pov

#declare Font = "C:\\WINDOWS\\Fonts\\arial.ttf"camera {location<0,0,-10> look_at<0,0,0> }text {ttf Font "Welcome", 0.25,<0,0,0>

pigment {rgbf<0,1,0,0.5>}translate <0.66,0,0>rotate <clock*720,clock*360,0>}

text {ttf Font "To POV-Ray", 0.25,0translate <0,-1,0>pigment {rgbf<1,0,0,0.5>}rotate <clock*-720,clock*360>}

sphere {<2.5-clock*5,0.5,-5>, 0.25pigment{ rgbf<0,0,1,0.25>} }

light_source { <0,2,10>, rgb<0,0,1> }light_source { <0,-2,-10>, rgb<1,1,0> }

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 16: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Frame One of “Hello” Scene

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 17: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Frame One of “Hello” Scene

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 18: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Application setup code

GApplication GridApp = new GApplication();GridApp.ApplicationName = "POVRay Render Grid Application";GConnection gc = new GConnection(hostname,

port, username, password);GridApp.Connection = gc;GridApp.Manifest.Add(new ModuleDependency(

typeof(SceneRenderer).Module));GridApp.ThreadFinish +=

new GThreadFinish(GridApp_ThreadFinish);GridApp.ApplicationFinish +=

new GApplicationFinish(GridApp_ApplicationFinish);

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 19: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

GridThread

[Serializable]public class RenderThread : GThread{// Serializable properties// ...public override void Start(){string povFileName = Path.GetTempFileName();File.WriteAllBytes(povFileName, sceneBytes);string pngFileName = Path.ChangeExtension(

povFileName, ".png");// Render input file into output file// ...outputImage = File.ReadAllBytes(pngFileName);File.Delete(povFileName);File.Delete(pngFileName);

}

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 20: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Application Launch

byte[] sceneBytes = File.ReadAllBytes(sceneFileName);// Create a RenderThread for each frame and dispatch themfor (int i = 0; i <= nFrames; i++){GridApp.Threads.Add(

new RenderThread(sceneBytes, i, nFrames,xResolution, yResolution,megapovLocation));

}GridApp.Start();// Will wait here until application is completewhile (GridApp.Running){System.Threading.Thread.Sleep(2000);

}

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 21: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Delegates

void GridApp_ApplicationFinish() { }

void GridApp_ThreadFinish(GThread thread){RenderThread rt = (RenderThread)thread;string filename = String.Format("output{0:D4}.png",

rt.FrameNumber);DirectoryInfo info = new DirectoryInfo(OutputDirectory);if (!info.Exists){info.Create();

}File.WriteAllBytes(Path.Combine(OutputDirectory, filename),

rt.OutputImageBytes);}

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 22: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

Web Service

[WebMethod]public string RenderSceneToFolder(

string sceneFilenameOnServer,int numberOfFrames,int xResolution, int yResolution)

{SceneRenderer renderer = new SceneRenderer();// Process parameters// ...renderer.RenderScene(/* .. Parameters ...*/);string baseUrl = Context.Request.Url.GetLeftPart(

UriPartial.Authority);Uri result = new Uri(new Uri(baseUrl),

((WebContext)config.EvaluationContext.HostingContext).ApplicationPath + "/Images");

return result.ToString();}

Michael R. Head Alchemi: A .NET Grid Application Framework

Page 23: Alchemi: A .NET Grid Application Frameworkmike/presentations/alchemi.pdf · Grid Simulation (GridSim) ... DeveloperWorks tutorial Using POV-Ray ray tracer ... Michael R. Head Alchemi:

GRIDBUSAlchemi

Sample ApplicationConclusion

GridbusAlchemiSample Application

Michael R. Head Alchemi: A .NET Grid Application Framework