Your SlideShare is downloading. ×
0
Parallel Computing Scenarios
and the new challenges for the Software Architect




Fabrizio Giudici        Emmanuele Sordi...
2




Goals of this presentation
> Parallel/distributed computing has been around for decades
  – Mainly in some niches (s...
3




AGENDA
>   MOTIVATIONS
>   CASE STUDY
>   ARCHITECTURE
>   CONCLUSION
4




Motivations
> User's need grow
  – Demand for increased
     computing power
  – Multimedia processing
  – Also on t...
5




Jini, Rio, Sun Grid
> Jini
  – A Java technology for creating “federations of services“
  – Spontaneous networking, ...
6




Parallel computing: easy or hard?
> Harder than single-thread computing
> Largely depends on the context
  – Course ...
7




An important point: ROI
> In the past distributed computing required ad-hoc hardware
  – Highly expensive
  – High s...
8




AGENDA
>   MOTIVATIONS
>   CASE STUDY
>   ARCHITECTURE
>   CONCLUSION
9




Case study
> Concrete problem and potential community
  – To be addressed with state-of-the art design
  – Focused o...
10




Hires imaging of solar system bodies
> For decades only with pro equipment
> Since 90s within the reach of amateurs...
11




Algorithm
12




Parallel decomposition
13




AGENDA
>   MOTIVATIONS
>   CASE STUDY
>   ARCHITECTURE
>   CONCLUSION
14




Mistral
> Abstract Imaging layer
  – Wraps Java2D, JAI, ImageJ, others
> Flexible
  – Operations and/or engines can...
15




Mistral ImageProcessor
> Master / Worker pattern
> Polymorphic implementation
  – Local (multi core)
  – Rio
  – Su...
16




Phase controller
reference = createReference();

for each image
  {
    schedule new RegisterTask(image, reference)...
17




Best practices
> Fallacies #2, #3 of distributed computing
  – “Latency is zero”
  – “Bandwidth is infinite”
> In o...
18




Adapt to scenarios
> Consume results as soon as possible
  – Avoid accumulation of idle results in queues
  – Post ...
19




EditableImage serialization
> Opaque holder of the real image
> Each instance has its own unique UUID
  – Serializa...
20




Optimized routing
> Optimize scheduling to minimize data motion
  – Multi-phase: the operands come from a previous ...
21




AGENDA
>   MOTIVATIONS
>   CASE STUDY
>   ARCHITECTURE
>   CONCLUSION
22




Conclusion
> Parallel computing is coming among us
  – Hard, but in reach
  – It's an opportunity, not a scary thin...
23




Desktop too – and demo
> Mistral and Pleiades
  integrated in blueMarine, a
  desktop photo application
> Demos at ...
24




Q&A
> Question time
Fabrizio Giudici    www.tidalwave.it
Tidalwave s.a.s     fabrizio.giudici@tidalwave.it


Emmanuele Sordini   www.bloomings...
Upcoming SlideShare
Loading in...5
×

Parallel Computing Scenarios and the new challenges for the Software Architect

1,127

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,127
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Parallel Computing Scenarios and the new challenges for the Software Architect"

  1. 1. Parallel Computing Scenarios and the new challenges for the Software Architect Fabrizio Giudici Emmanuele Sordini Tidalwave s.a.s. BloomingStars.com 880
  2. 2. 2 Goals of this presentation > Parallel/distributed computing has been around for decades – Mainly in some niches (science, military, finance) – Seti@Home, BOINC, ... paved the way for the rest of the world > It's going to become important for “general” software architects – Because of recent technology evolution – From (maybe) scared customers to new business opportunities > Learn how to design WORA parallel applications – Exploiting parallelism in different scenarios – Good design, patterns, technologies
  3. 3. 3 AGENDA > MOTIVATIONS > CASE STUDY > ARCHITECTURE > CONCLUSION
  4. 4. 4 Motivations > User's need grow – Demand for increased computing power – Multimedia processing – Also on the desktop > Technological challenges – Multi-core computers (10s of cores from Computer Architecture, in a few years, clock stable or a Quantitative approach: Patterson & Hennessy, 2006 decreasing) > New opportunities – Easy “local mini grids“ (e.g Jini, Rio) – Massive grid computing as a service (e.g. Sun Grid)
  5. 5. 5 Jini, Rio, Sun Grid > Jini – A Java technology for creating “federations of services“ – Spontaneous networking, discovery, mobile code – http://www.jini.org > Rio – Based on Jini – Adds container / component paradigm, Quality of Service, etc... – http://rio.dev.java.net > Sun Grid – A massive (1.000s nodes) grid platform accessible as a service – $1 / CPU / hour – Since May 2007 available in 24 countries outside USA – http://www.network.com
  6. 6. 6 Parallel computing: easy or hard? > Harder than single-thread computing > Largely depends on the context – Course grain – Fine grain > Future language enhancements? – Java syntax extensions – New languages – Virtual Machine optimizations (transparent to code?) > Let's focus on what we have now – Design – Architecture – Patterns
  7. 7. 7 An important point: ROI > In the past distributed computing required ad-hoc hardware – Highly expensive – High start-up costs – Strive for high parallelism exploitation to justify costs  50% efficiency with 100.000€ expense means 50.000€ wasted > Today is different – Local “mini grids” can be easily set up with standard hardware – Large facilities available as a service on a “pay-per-hour” basis > A different ROI policy – No or negligible start-up costs – Probably you can live with medium efficiency in parallelism exploitation  50% efficiency on the Sun Grid means $1 per hour wasted
  8. 8. 8 AGENDA > MOTIVATIONS > CASE STUDY > ARCHITECTURE > CONCLUSION
  9. 9. 9 Case study > Concrete problem and potential community – To be addressed with state-of-the art design – Focused on image processing, but many things are general purpose > Different scenarios considered – Single core, multi-core – “Local mini grids” made with Jini and Rio – Sun Grid > Mistral – the imaging framework – http://mistral.tidalwave.it > Pleiades – the application – http://pleiades.bloomingstars.com
  10. 10. 10 Hires imaging of solar system bodies > For decades only with pro equipment > Since 90s within the reach of amateurs – availability of decent quality optics – good cameras at reasonable prices > Key concept – take multiple exposures – stack and align them – improve S/N ratio by averaging > Bottom line: consumer's perspective fit with the scenario – Recall previous slide about users and computing power
  11. 11. 11 Algorithm
  12. 12. 12 Parallel decomposition
  13. 13. 13 AGENDA > MOTIVATIONS > CASE STUDY > ARCHITECTURE > CONCLUSION
  14. 14. 14 Mistral > Abstract Imaging layer – Wraps Java2D, JAI, ImageJ, others > Flexible – Operations and/or engines can be plugged in > Versatile Imaging Processor – Based on the Master/Worker pattern > Built-in support for profiling – Benchmarking is a must
  15. 15. 15 Mistral ImageProcessor > Master / Worker pattern > Polymorphic implementation – Local (multi core) – Rio – Sun Grid > Images wrapped in an opaque container (EditableImage)
  16. 16. 16 Phase controller reference = createReference(); for each image { schedule new RegisterTask(image, reference); } when (at least 2 RegisterTasks completed) { image1 = registerTask1.getResult(); image2 = registerTask2.getResult(); schedule new AddTask(image1, image2); } when (at least 2 AddTasks completed) { image1 = addTask1.getResult(); image2 = addTask2.getResult(); schedule new AddTask(image1, image2); } // Detects last phase when (no more pending tasks && only 1 completed AddTask has not been processed) { sumImage = addTask.getResult(); normalize(sumImage); return; }
  17. 17. 17 Best practices > Fallacies #2, #3 of distributed computing – “Latency is zero” – “Bandwidth is infinite” > In other words – Don't pretend the network is not there – Serialization overhead is an issue > Memory is also a problem – Memory is not infinite – Typical of imaging or large-datasets problems – Was not an issue with sequential processing  Queuing intermediate results vs process one by one
  18. 18. 18 Adapt to scenarios > Consume results as soon as possible – Avoid accumulation of idle results in queues – Post tasks with priority > Adapt the most to the environment capabilities – Synthetic images are re-computed at each node – Filesystem-based exchange is used when NFS is available (e.g. Sun Grid) – Distributed image cache otherwise – Optimized routing
  19. 19. 19 EditableImage serialization > Opaque holder of the real image > Each instance has its own unique UUID – Serializable – but only moves UUID around > NFS implementation – Each serialized image gets stored on the disk – Upon use on a remote node, it is loaded from the disk > Otherwise – Images are pulled from a distributed cache – Pull vs push approach for cache
  20. 20. 20 Optimized routing > Optimize scheduling to minimize data motion – Multi-phase: the operands come from a previous phase – For instance, while adding two images > The scheduler – Queries the pending Task about the needed images – Looks up the distributed image cache – Finds the node where most of needed images are – Schedule the task to that node
  21. 21. 21 AGENDA > MOTIVATIONS > CASE STUDY > ARCHITECTURE > CONCLUSION
  22. 22. 22 Conclusion > Parallel computing is coming among us – Hard, but in reach – It's an opportunity, not a scary thing > In different fashions – Multi core – Local mini grids (Jini, Rio) – Massive grids as a facility (Sun Grid) > Can be dealt with more patterns in our catalog > You don't need always the “optimal” solution – Just pull most out of the CPUs with trade-off design
  23. 23. 23 Desktop too – and demo > Mistral and Pleiades integrated in blueMarine, a desktop photo application > Demos at Jazoon: – “blueMarine - a desktop app for the open source photographic workflow“ – Tuesday, 2007-06-26, 12:00 - 12:50, Arena 2 – Thursday, 2007-06-28, 14:00 - 14:50, Arena 1
  24. 24. 24 Q&A > Question time
  25. 25. Fabrizio Giudici www.tidalwave.it Tidalwave s.a.s fabrizio.giudici@tidalwave.it Emmanuele Sordini www.bloomingstars.com emmanuele@sordini.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×