Enviar búsqueda
Cargar
GPars in Saga Groovy Study
•
1 recomendación
•
827 vistas
Naoki Rin
Seguir
佐賀Groovy勉強会のGParsの資料です。
Leer menos
Leer más
Tecnología
Economía y finanzas
Denunciar
Compartir
Denunciar
Compartir
1 de 55
Descargar ahora
Descargar para leer sin conexión
Recomendados
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
Henry Schreiner
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19
GoDataDriven
DPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for Analysis
Henry Schreiner
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
Hansol Kang
2019 IRIS-HEP AS workshop: Boost-histogram and hist
2019 IRIS-HEP AS workshop: Boost-histogram and hist
Henry Schreiner
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
Hyunjung Park
IRIS-HEP: Boost-histogram and Hist
IRIS-HEP: Boost-histogram and Hist
Henry Schreiner
DIANA: Recent developments in GooFit
DIANA: Recent developments in GooFit
Henry Schreiner
Recomendados
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
CHEP 2018: A Python upgrade to the GooFit package for parallel fitting
Henry Schreiner
Sea Amsterdam 2014 November 19
Sea Amsterdam 2014 November 19
GoDataDriven
DPF 2017: GPUs in LHCb for Analysis
DPF 2017: GPUs in LHCb for Analysis
Henry Schreiner
PyTorch 튜토리얼 (Touch to PyTorch)
PyTorch 튜토리얼 (Touch to PyTorch)
Hansol Kang
2019 IRIS-HEP AS workshop: Boost-histogram and hist
2019 IRIS-HEP AS workshop: Boost-histogram and hist
Henry Schreiner
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
RAMP: A System for Capturing and Tracing Provenance in MapReduce Workflows
Hyunjung Park
IRIS-HEP: Boost-histogram and Hist
IRIS-HEP: Boost-histogram and Hist
Henry Schreiner
DIANA: Recent developments in GooFit
DIANA: Recent developments in GooFit
Henry Schreiner
Pyspark
Pyspark
Ajay Ohri
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
Grant McAlister
CMake best practices
CMake best practices
Henry Schreiner
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
ACAT 2017: GooFit 2.0
ACAT 2017: GooFit 2.0
Henry Schreiner
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
Andres Mendez-Vazquez
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Azhar Satti
TriHUG November Pig Talk by Alan Gates
TriHUG November Pig Talk by Alan Gates
trihug
An Overview of Hadoop
An Overview of Hadoop
Asif Ali
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
Jaehyeuk Oh
Extending Python, what is the best option for me?
Extending Python, what is the best option for me?
Codemotion
RDM 2020: Python, Numpy, and Pandas
RDM 2020: Python, Numpy, and Pandas
Henry Schreiner
Heaps
Heaps
IIUM
PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
Henry Schreiner
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
Henry Schreiner
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
Tom Croucher
ROOT 2018: iminuit and MINUIT2 Standalone
ROOT 2018: iminuit and MINUIT2 Standalone
Henry Schreiner
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
Henry Schreiner
mruby-rr: Time Traveling Debugger For mruby Using rr
mruby-rr: Time Traveling Debugger For mruby Using rr
鈺翔 林
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
Yuta Kashino
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
Samy Fodil
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
CzechDreamin
Más contenido relacionado
La actualidad más candente
Pyspark
Pyspark
Ajay Ohri
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
Grant McAlister
CMake best practices
CMake best practices
Henry Schreiner
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
Henry Schreiner
ACAT 2017: GooFit 2.0
ACAT 2017: GooFit 2.0
Henry Schreiner
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
Andres Mendez-Vazquez
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
Azhar Satti
TriHUG November Pig Talk by Alan Gates
TriHUG November Pig Talk by Alan Gates
trihug
An Overview of Hadoop
An Overview of Hadoop
Asif Ali
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
Jaehyeuk Oh
Extending Python, what is the best option for me?
Extending Python, what is the best option for me?
Codemotion
RDM 2020: Python, Numpy, and Pandas
RDM 2020: Python, Numpy, and Pandas
Henry Schreiner
Heaps
Heaps
IIUM
PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
Henry Schreiner
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
Henry Schreiner
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
Tom Croucher
ROOT 2018: iminuit and MINUIT2 Standalone
ROOT 2018: iminuit and MINUIT2 Standalone
Henry Schreiner
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
Henry Schreiner
mruby-rr: Time Traveling Debugger For mruby Using rr
mruby-rr: Time Traveling Debugger For mruby Using rr
鈺翔 林
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
Yuta Kashino
La actualidad más candente
(20)
Pyspark
Pyspark
Tuning PostgreSQL for High Write Throughput
Tuning PostgreSQL for High Write Throughput
CMake best practices
CMake best practices
Digital RSE: automated code quality checks - RSE group meeting
Digital RSE: automated code quality checks - RSE group meeting
ACAT 2017: GooFit 2.0
ACAT 2017: GooFit 2.0
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
05 Analysis of Algorithms: Heap and Quick Sort - Corrected
Qtp Training Deepti 4 Of 4493
Qtp Training Deepti 4 Of 4493
TriHUG November Pig Talk by Alan Gates
TriHUG November Pig Talk by Alan Gates
An Overview of Hadoop
An Overview of Hadoop
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
하이퍼커넥트 데이터 팀이 데이터 증가에 대처해온 기록
Extending Python, what is the best option for me?
Extending Python, what is the best option for me?
RDM 2020: Python, Numpy, and Pandas
RDM 2020: Python, Numpy, and Pandas
Heaps
Heaps
PEARC17: Modernizing GooFit: A Case Study
PEARC17: Modernizing GooFit: A Case Study
PyHEP 2019: Python Histogramming Packages
PyHEP 2019: Python Histogramming Packages
Upgrading To The New Map Reduce API
Upgrading To The New Map Reduce API
ROOT 2018: iminuit and MINUIT2 Standalone
ROOT 2018: iminuit and MINUIT2 Standalone
PyHEP 2019: Python 3.8
PyHEP 2019: Python 3.8
mruby-rr: Time Traveling Debugger For mruby Using rr
mruby-rr: Time Traveling Debugger For mruby Using rr
確率的プログラミングライブラリEdward
確率的プログラミングライブラリEdward
Último
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
Samy Fodil
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
CzechDreamin
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
CzechDreamin
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
FIDO Alliance
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
reely ones
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
CzechDreamin
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
Stephanie Beckett
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
FIDO Alliance
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
EasyPrinterHelp
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
confluent
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
UXDXConf
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
David Michel
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
ChristopherTHyatt
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
Patrick Viafore
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge
The Metaverse: Are We There Yet?
The Metaverse: Are We There Yet?
Mark Billinghurst
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
FIDO Alliance
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
Stefano
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
CzechDreamin
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
ScyllaDB
Último
(20)
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
THE BEST IPTV in GERMANY for 2024: IPTVreel
THE BEST IPTV in GERMANY for 2024: IPTVreel
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
SOQL 201 for Admins & Developers: Slice & Dice Your Org’s Data With Aggregate...
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Buy Epson EcoTank L3210 Colour Printer Online.pptx
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Agentic RAG What it is its types applications and implementation.pdf
Agentic RAG What it is its types applications and implementation.pdf
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
The Metaverse: Are We There Yet?
The Metaverse: Are We There Yet?
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
GPars in Saga Groovy Study
1.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Groovy Map/Reduce Fork/Join with Agent DataflowVariable Dataflows DataflowQueue @Naoki Rin
2.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Twitter @Naoki Rin Map/Reduce Fork/Join Hatena id:naokirin Groovy 1 Java Agent Groovy Groovy DataflowVariable Dataflows DataflowQueue
3.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . .1 GPars 2 Map/Reduce Fork/Join . .3 4 Agent . .5 DataflowVariable Dataflows 6 DataflowQueue ..
4.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
5.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent DataflowVariable Dataflows DataflowQueue
6.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
7.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
8.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Groovy DSL Groovy1.8 Agent Groovy DataflowVariable Dataflows DataflowQueue
9.
GPars Groovy
with GPars @Naoki Rin GPars Groovy 1.8 GPars 0.11 GPars GPars 6 Groovy Map/Reduce Fork/Join Groovy 1.8.2 GPars 0.12 GPars 0.12 Groovy gpars-0.11.jar Agent gpars-0.12.jar OK Groovy 1.8 @Grab OK DataflowVariable Dataflows DataflowQueue GPars 0.12
10.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
11.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows DataflowQueue
12.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows DataflowQueue
13.
GPars 6 Groovy
with GPars @Naoki Rin GPars GPars GPars 6 GPars Map/Reduce Fork/Join Stm Agent Groovy CSP DataflowVariable Dataflows 4 DataflowQueue
14.
Groovy
with GPars @Naoki Rin GPars (Data Parallelism) GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
15.
Groovy
with GPars @Naoki Rin GPars (Data Parallelism) GPars GPars 6 Go! Map/Reduce Fork/Join ( ) Go! Map/Reduce Go! Agent Map/Reduce Fork/Join Go! DataflowVariable Dataflows Fork/Join DataflowQueue
16.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Groovy Map/Reduce Fork/Join GParsPool - JSR-166y(ParallelArray) DSL Agent GParsExecutorsPool - DataflowVariable Java Executor Dataflows DataflowQueue
17.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 import groovyx.gpars.GParsPool Map/Reduce Fork/Join . GParsPool.withPool { assert ([2, 3, 4, 5]== [1, 2, 3, 4].collectParallel {it + 1}) } . Agent withPool collectParallel() collect DataflowVariable Dataflows DataflowQueue .. .
18.
xxxParallel Groovy
with GPars @Naoki Rin GPars withPool xxxParallel() GPars GPars 6 Map/Reduce Fork/Join withPool xxx findAll() findAllParallel() import groovyx.gpars.GParsPool Agent GParsPool.withPool { assert ([1, 2, 3, 4 ].findAll{it % 2 == 0} DataflowVariable Dataflows == [1, 2, 3, 4 ].findAllParallel{it % 2 == 0}) DataflowQueue } .
19.
xxxParallel Groovy
with GPars @Naoki Rin GPars GPars GParsPool.withPool GPars 6 Map/Reduce Fork/Join anyParallel() findParallel() collectParallel() foldParallel() countParallel() grepParallel() eachParallel() groupByParallel() eachWithIndexParallel() maxParallel() Agent everyParallel() minParallel() findAllParallel() splitParallel() DataflowVariable Dataflows DataflowQueue findAnyParallel() sumParallel()
20.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 withPool Map/Reduce Fork/Join import groovyx.gpars.GParsPool . GParsPool.withPool(10) { // } Agent withPool . +1 DataflowVariable Dataflows DataflowQueue .. .
21.
Groovy
with GPars @Naoki Rin GPars GPars withPool GPars 6 . import groovyx.gpars.ParallelEnhancer Map/Reduce def list = [4, 1, 5, 3, 2 ] Fork/Join ParallelEnhancer.enhanceInstance(list) assert (list.findParallel {it == 3} == 3) . Parallel import groovyx.gpars.GParsPool Agent .GParsPool.withPool{ . . def data = (1..3).makeConcurrent() DataflowVariable Dataflows assert( data.collect {it ** 2} == [1, 4, 9] ) DataflowQueue } .
22.
(
) Groovy with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join GParsPool.withPool() { Future result = {it * 2}.callAsync(3) assert 6 == result.get() .} Agent withPool callAsync() . Future get() DataflowVariable Dataflows DataflowQueue .. .
23.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Map/Reduce Fork/Join GPars map / Agent reduce map ( DataflowVariable Dataflows ) DataflowQueue
24.
GPars
Map/Reduce Groovy with GPars @Naoki Rin GPars GPars GPars Map/Reduce Parallel Array GPars 6 Map/Reduce Parallel Array Fork/Join parallel Parallel Array getParallel() Parallel Agent Array DataflowVariable Parallel Array Map Dataflows DataflowQueue collection
25.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join map() Parallel Array(AbstractPAWrapper) reduce() T filter() Parallel Array(AbstractPAWrapper) size() int sum() T Agent min() T max() T DataflowVariable sort() Parallel Array(AbstractPAWrapper) Dataflows DataflowQueue groupBy() Map combine() Map
26.
Map/Reduce Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map . GParsPool.withPool { Map/Reduce println (”Hello World”.parallel Fork/Join .map{[it, 1]} .combine(0) { sum, value -> sum + value} .getParallel() .sort{-it.value} .collection) } Agent . DataflowVariable Dataflows [l=3, o=2, H=1, e=1, W=1, =1, d=1, r=1] DataflowQueue
27.
Fork/Join Groovy
with GPars @Naoki Rin GPars fork GPars GPars 6 Map/Reduce Fork/Join join fork Agent DataflowVariable Dataflows DataflowQueue
28.
Fork/Join Groovy
with GPars @Naoki Rin GPars GPars GPars 6 forkOffChild() - Map/Reduce Fork/Join runChildDirectly() - GPars 0.12 Agent getChildrenResults() - fork DataflowVariable runForkJoin() - Dataflows DataflowQueue withPool Fork/Join
29.
Fork/Join Groovy
with GPars @Naoki Rin GPars GPars fibonacci GPars 6 . import groovyx.gpars.GParsPool Map/Reduce Closure fib = {number -> if (number <= 2) { Fork/Join return 1 } forkOffChild(number - 1) final def result = runChildDirectly(number - 2) return (Integer) getChildrenResults().sum() + result } Agent GParsPool.withPool { DataflowVariable assert 55 == GParsPool.runForkJoin(10, fib) Dataflows DataflowQueue } .
30.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
31.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
32.
GPars Groovy
with GPars @Naoki Rin GPars GPars . GPars 6 import static groovyx.gpars.actor.Actors.* def console = actor { // Map/Reduce Fork/Join loop { react {msg -> println msg } } } Agent . console.send ’Hello World!’ // DataflowVariable Dataflows DataflowQueue Hello World
33.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 1 import static groovyx.gpars.actor.Actors.* Map/Reduce Fork/Join . def console = actor { react {msg -> println msg } } Agent react . react DataflowVariable Dataflows DataflowQueue
34.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join console.send ’Hello World!’ // console ’Hello World!’ // . console << ’Hello World!’ // console.call ’Hello World!’ // Agent . DataflowVariable Dataflows DataflowQueue .. .
35.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import static groovyx.gpars.actor.Actors.* Map/Reduce Fork/Join def console = actor { loop{ react {msg -> println msg } } Agent } . loop react DataflowVariable Dataflows DataflowQueue
36.
reactor Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce reactor Fork/Join import static groovyx.gpars.actor.Actors.* def console = reactor { // } . actor{loop{react{ }}} reactor{} Agent . DataflowVariable Dataflows DataflowQueue .. .
37.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join console.send ’Hello!’ console.send ’Hello!!’ . console.stop() console.join() join() . Agent DataflowVariable Dataflows DataflowQueue .. .
38.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce def console = reactor {reply it.reverse()} Fork/Join assert ’Hello!’ == console.sendAndWait(’ !olleH’) . reply sendAndWait() . Agent .. . DataflowVariable Dataflows DataflowQueue
39.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 def parrot = reactor { . Map/Reduce println ’Parrot: ’ + it Fork/Join sender.send it } def mary = actor { println ’Mary: Hello!’ parrot.send ’Hello!’ Agent react{println ’Mary: Good!’} } . DataflowVariable Dataflows sender DataflowQueue
40.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
41.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 ( ) Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
42.
GPars Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import groovyx.gpars.GParsPool import groovyx.gpars.agent.Agent Map/Reduce Fork/Join def agent = new Agent(1) GParsPool.withPool { (1..10).eachParallel {value -> agent {updateValue(it * value)} } } Agent println agent.val . DataflowVariable Dataflows DataflowQueue 3628800
43.
Agent Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Agent import groovyx.gpars.agent.Agent Map/Reduce . Fork/Join def intAgent = new Agent(0) def stringAgent = new Agent<String>() assert 0 == intAgent.val . Agent Agent Groovy DataflowVariable Dataflows .val DataflowQueue .. .
44.
Groovy
with GPars @Naoki Rin GPars GPars . GPars 6 import groovyx.gpars.agent.Agent def jvmLangList = new Agent<List<String>>() Map/Reduce Fork/Join jvmLangList {updateValue([’Java’])} jvmLangList.send {it << ’Scala’} jvmLangList.call {it.add ’Clojure’} jvmLangList jvmLangList.val + ’Groovy’ assert [’Java’, ’Scala’, ’Clojure’, ’Groovy’] . == jvmLangList.val Agent updateValue() DataflowVariable Dataflows DataflowQueue
45.
Groovy
with GPars @Naoki Rin . GPars GPars def members = new Agent([’Jones’]) GPars 6 final Thread t1 = Thread.start { members {it.add ’Bob’} Map/Reduce members {it.add ’Davis’} Fork/Join } final Thread t2 = Thread.start { members {it.add ’Alice’} members {it.remove(0)} } Agent // [Jones, Bob, Davis, Alice] . members.valAsync {println it} DataflowVariable .val Dataflows DataflowQueue valAsync() valAsync()
46.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
47.
(
) Groovy with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
48.
GPars
Dataflow Groovy with GPars @Naoki Rin GPars . GPars GPars 6 import groovyx.gpars.dataflow.Dataflow import groovyx.gpars.dataflow.DataflowVariable Map/Reduce final def x = new DataflowVariable() Fork/Join final def y = new DataflowVariable() final def z = new DataflowVariable() Dataflow.task { z << x.val + y.val } Dataflow.task { x << 5 } Dataflow.task { y << 10 } Agent . println z.val DataflowVariable Dataflows DataflowQueue 15
49.
DataflowVariable Groovy
with GPars @Naoki Rin GPars GPars . DataflowVariable GPars 6 import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.DataflowVariable Map/Reduce Fork/Join final def x = new DataflowVariable() final def y = new DataflowVariable() task{y << x.val + 1} task{x << 1} . Agent assert 2 == y.val DataflowVariable DataflowVariable Dataflows DataflowQueue Dataflow.task task
50.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 . import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.DataflowVariable Map/Reduce Fork/Join def x = new DataflowVariable() def y = new DataflowVariable() task {x << y.val} task {y << x.val} Agent println x.val // ! . DataflowVariable Dataflows DataflowQueue
51.
Dataflows Groovy
with GPars @Naoki Rin GPars GPars Dataflows GPars 6 . import static groovyx.gpars.dataflow.Dataflow.task import groovyx.gpars.dataflow.Dataflows Map/Reduce Fork/Join final def dfs = new Dataflows() task {dfs[0] = dfs.x + ” ” + dfs.y} task {dfs.y = ”Groovy!”} task {dfs.x = ”Hello”} assert ”Hello Groovy!” == dfs[0] . Agent Dataflows DataflowVariable DataflowVariable Dataflows DataflowQueue
52.
DataflowQueue Groovy
with GPars @Naoki Rin GPars GPars GPars 6 DatafowQueue . import groovyx.gpars.dataflow.DataflowQueue Map/Reduce Fork/Join final def queue = new DataflowQueue() queue << ’a’ queue << ’b’ queue << ’c’ assert ’a’ == queue.val Agent assert ’b’ == queue.val assert ’c’ == queue.val . DataflowVariable DataflowQueue Dataflows DataflowQueue .val
53.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join GPars Groovy Agent DataflowVariable Dataflows DataflowQueue
54.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Groovy http://gihyo.jp/book/2011/978-4-7741-4727-7 GPars Users Guide http://gpars.org/0.12/guide/index.html Agent GPars Javadoc DataflowVariable http://gpars.org/0.12/javadoc Dataflows DataflowQueue
55.
Groovy
with GPars @Naoki Rin GPars GPars GPars 6 Map/Reduce Fork/Join Agent DataflowVariable Dataflows DataflowQueue
Descargar ahora