This document discusses concurrency features in Groovy and GPars. It highlights useful Groovy features for concurrency like closures, immutable collections, and annotation support. It also discusses common concurrency libraries and tools that can be used with Groovy like GPars, Google Collections, and Actors. The document provides examples of how Groovy improves on Java for concurrency tasks through features like closures, immutable types, and domain specific languages.
This document discusses various approaches for handling concurrency in Groovy and Java programs, including using GPars. It describes how GPars provides features for data parallelism, asynchronous functions, actors, safe agents, and dataflow concurrency. It also provides examples of using GPars parallel collections and dataflows to introduce concurrency into sequential algorithms in a transparent way.
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Paul King
This document provides an overview of tools for testing, mocking, dependency injection, code quality, and duplication detection for Groovy developers. It discusses popular testing frameworks like JUnit, TestNG, Spock and EasyB and mocking libraries like MockFor, GMock and EasyMock. It also covers dependency injection with Spring and Guice, code coverage with Cobertura, code style checking with CodeNarc, and duplication detection with Simian.
Working with Databases and Groovy
This document discusses how to work with databases using Groovy. It covers:
- Connecting to databases and using groovy.sql.Sql to execute queries and statements
- Performing reads and writes like inserting, updating, deleting rows
- Calling stored procedures
- Advanced techniques like transactions, batching, pagination
- Using groovy.sql.DataSet to treat tables as collections
It also briefly introduces using MongoDB and Neo4j with Groovy.
This document discusses leveraging Groovy for capturing business rules through domain-specific languages (DSLs). It begins with introductions to DSLs and Groovy, explaining their goals and advantages. Examples are provided of using Groovy to remove boilerplate code from Java programs and create internal DSLs. The document demonstrates how Groovy features like closures and meta-programming enable the creation of DSLs for expressing business rules in a natural, domain-focused way.
Explores how to write a tic-tac-toe API that meets some interesting static typing constraints. Specifically, programs using the API may fail to compile, depending on the state of play in the game, such as trying to call move() with an already completed game board. The real theme of the presentation is not so much solving the tic-tac-toe problem but, rather, pushing static typing to its limits (and some might argue beyond its useful limits—you will have to judge for yourself).
This document discusses concurrency features in Groovy and GPars. It highlights useful Groovy features for concurrency like closures, immutable collections, and annotation support. It also discusses common concurrency libraries and tools that can be used with Groovy like GPars, Google Collections, and Actors. The document provides examples of how Groovy improves on Java for concurrency tasks through features like closures, immutable types, and domain specific languages.
This document discusses various approaches for handling concurrency in Groovy and Java programs, including using GPars. It describes how GPars provides features for data parallelism, asynchronous functions, actors, safe agents, and dataflow concurrency. It also provides examples of using GPars parallel collections and dataflows to introduce concurrency into sequential algorithms in a transparent way.
Industrial Strength Groovy - Tools for the Professional Groovy Developer: Pau...Paul King
This document provides an overview of tools for testing, mocking, dependency injection, code quality, and duplication detection for Groovy developers. It discusses popular testing frameworks like JUnit, TestNG, Spock and EasyB and mocking libraries like MockFor, GMock and EasyMock. It also covers dependency injection with Spring and Guice, code coverage with Cobertura, code style checking with CodeNarc, and duplication detection with Simian.
Working with Databases and Groovy
This document discusses how to work with databases using Groovy. It covers:
- Connecting to databases and using groovy.sql.Sql to execute queries and statements
- Performing reads and writes like inserting, updating, deleting rows
- Calling stored procedures
- Advanced techniques like transactions, batching, pagination
- Using groovy.sql.DataSet to treat tables as collections
It also briefly introduces using MongoDB and Neo4j with Groovy.
This document discusses leveraging Groovy for capturing business rules through domain-specific languages (DSLs). It begins with introductions to DSLs and Groovy, explaining their goals and advantages. Examples are provided of using Groovy to remove boilerplate code from Java programs and create internal DSLs. The document demonstrates how Groovy features like closures and meta-programming enable the creation of DSLs for expressing business rules in a natural, domain-focused way.
Explores how to write a tic-tac-toe API that meets some interesting static typing constraints. Specifically, programs using the API may fail to compile, depending on the state of play in the game, such as trying to call move() with an already completed game board. The real theme of the presentation is not so much solving the tic-tac-toe problem but, rather, pushing static typing to its limits (and some might argue beyond its useful limits—you will have to judge for yourself).
This document provides an overview of Kotlin for backend development. It discusses Kotlin's advantages like Java interoperability and null safety. Coroutines are presented as an alternative to callback-based asynchronous programming. Examples are given of adopting Kotlin in different contexts like libraries, components and web applications. Strategies covered include preparing development tools and environments, evaluating current skills, and sharing experiences.
XSpect, a lightweight library to make your code reusable and maintainable.岡諭 李
XSpect is a library that makes code more reusable and maintainable through two packages - XAspect and XIntrospect. XAspect uses aspect-oriented programming techniques like method swizzling to add cross-cutting concerns. XIntrospect packages small code fragments into reusable blocks that can be composed at runtime. The document demonstrates using these techniques to add logging and validation checks to a sample method in a clean, encapsulated way. It discusses advantages like separation of concerns and reusability, as well as challenges of understanding and debugging aspect-oriented code.
This document summarizes core.logic, a relational logic programming library for Clojure. It provides examples of core.logic concepts like unification, conde, fresh, membero, distincto, everyg, lvar, finite domains, and using core.logic to solve logic puzzles like map coloring, rock paper scissors, cryptarithmetic, and sudoku. Core.logic allows defining relations and facts to constrain logic variables and find all solutions that satisfy the goals.
The document discusses several "Hadoop puzzlers" or examples of common mistakes and misconceptions in Hadoop. It begins by introducing the presenters, Aaron Myers and Daniel Templeton, and explaining that the session will walk through examples and puzzles to teach valuable lessons. Several examples are then presented, including a MapReduce job to find the maximum value for each key, and issues around asynchronous job submission and reducer key/value types. Each example shows sample data and code, discusses what may go wrong, and provides the "moral" or lesson learned.
A Domain Specific Language (DSL) is a programming language focused on a particular problem domain. DSLs provide expressive notations and abstractions for their domain through appropriate syntax and semantics. Groovy enables the creation of DSLs through features like closures, builders, open classes, and AST transformations that allow customizing and extending the language.
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design
Patterns are formalized best practices that the programmer must implement in the application.
Alternatives of JPA
Requery provide simple Object Mapping & Generate SQL to execute without reflection and session, so fast than JPA, simple and easy to learn.
Psycopg2 - Connect to PostgreSQL using Python ScriptSurvey Department
It's the presentation slides I prepared for my college workshop. This demonstrates how you can talk with PostgreSql db using python scripting.For queries, mail at dipeshsuwal@gmail.com
This document discusses using Python to connect to and interact with a PostgreSQL database. It covers:
- Popular Python database drivers for PostgreSQL, including Psycopg which is the most full-featured.
- The basics of connecting to a database, executing queries, and fetching results using the DB-API standard. This includes passing parameters, handling different data types, and error handling.
- Additional Psycopg features like server-side cursors, transaction handling, and custom connection factories to access columns by name rather than number.
In summary, it provides an overview of using Python with PostgreSQL for both basic and advanced database operations from the Python side.
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
The document discusses using Groovy to create a turtle graphics domain specific language (DSL). Key points:
- Turtle graphics is a vector-based graphics concept using a relative cursor called a "turtle" to draw.
- The author created a Turtle class in Groovy to allow drawing on a canvas via turtle commands. A Groovy shell is used to execute scripts with bindings to provide the Turtle object.
- Various techniques are discussed to customize the language, including adding imports, defining a base script class, and routing method calls through the Turtle object to enable turtle commands.
- The author demonstrates how to execute scripts securely by removing dangerous language features like loops or increment operators.
Scala is a programming language that runs on the Java Virtual Machine (JVM) and is designed to express common programming patterns in a concise, elegant, and type-safe way. Some key points about Scala include that it is functional and object-oriented, statically typed, and allows seamless integration with Java. Scala code is often more concise than equivalent Java code through features like pattern matching and immutable data structures. Functional programming principles like pure functions, recursion, and avoiding side effects are emphasized in Scala.
The Logical Burrito - pattern matching, term rewriting and unificationNorman Richards
The document summarizes key concepts related to unification, including pattern matching, term rewriting, and unification. It provides examples of these concepts in languages like ML, Mathematica, Prolog, and Clojure. Unification allows terms to be matched and variables substituted so that terms become identical. Pattern matching is used for conditional dispatch. Term rewriting uses rule-based substitutions to reduce terms. Prolog demonstrates how unification works for logic programming.
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
What can be done with Java, but should better be done with Erlang (@pavlobaron)Pavlo Baron
Erlang excels at building distributed, fault-tolerant, concurrent applications due to its lightweight process model and built-in support for distribution. However, Java is more full-featured and is generally a better choice for applications that require more traditional object-oriented capabilities or need to interface with existing Java libraries and frameworks. Both languages have their appropriate uses depending on the requirements of the specific application being developed.
Clojure is a LISP-like programming language that runs on the Java Virtual Machine. It was created in 2007 by Rich Hickey and is currently at version 1.1. Clojure is a functional, immutable, and concurrency-oriented language. It features LISP syntax, macros, immutability, functional programming, and easy interoperability with Java. Data structures in Clojure are code, allowing homoiconicity. Clojure also supports lazy sequences, STM-based concurrency without locks, and dynamic behavior via its REPL.
Wolltest du schon immer die Vorteile und Ideen von Scala in deinen Java oder Kotlin Projekten nutzen? Dann ist Vavr (ehemals Javaslang) genau die richtige Bibliothek für dich.
Anhand echter Projektbeispiele schauen wir uns den Nutzen an, den Vavr mit seinen syntaktischen Erweiterungen und Features bei der täglichen Arbeit bietet. Wir schauen uns Value Types, echte funktionale Datentypen an und werden lernen, wie wir Exceptions sinnvoller behandeln können. Alles für besser wartbaren und sauberen Code!
Vavr bietet die Möglichkeit, die Vorteile objekt-funktionaler Programmierung zu nutzen, ohne Java den Rücken kehren zu müssen.
The document discusses using GPars, a Groovy library, to perform parallel programming and concurrent operations. It covers GPars features like GParsPool for parallel collection operations, ParallelEnhancer for enhancing existing collections, callAsync for asynchronous execution, and parallel arrays for data parallelism. Examples are provided for map/reduce operations, parallel finding/filtering of collections, and parallel execution of closures.
This document provides an overview of Kotlin for backend development. It discusses Kotlin's advantages like Java interoperability and null safety. Coroutines are presented as an alternative to callback-based asynchronous programming. Examples are given of adopting Kotlin in different contexts like libraries, components and web applications. Strategies covered include preparing development tools and environments, evaluating current skills, and sharing experiences.
XSpect, a lightweight library to make your code reusable and maintainable.岡諭 李
XSpect is a library that makes code more reusable and maintainable through two packages - XAspect and XIntrospect. XAspect uses aspect-oriented programming techniques like method swizzling to add cross-cutting concerns. XIntrospect packages small code fragments into reusable blocks that can be composed at runtime. The document demonstrates using these techniques to add logging and validation checks to a sample method in a clean, encapsulated way. It discusses advantages like separation of concerns and reusability, as well as challenges of understanding and debugging aspect-oriented code.
This document summarizes core.logic, a relational logic programming library for Clojure. It provides examples of core.logic concepts like unification, conde, fresh, membero, distincto, everyg, lvar, finite domains, and using core.logic to solve logic puzzles like map coloring, rock paper scissors, cryptarithmetic, and sudoku. Core.logic allows defining relations and facts to constrain logic variables and find all solutions that satisfy the goals.
The document discusses several "Hadoop puzzlers" or examples of common mistakes and misconceptions in Hadoop. It begins by introducing the presenters, Aaron Myers and Daniel Templeton, and explaining that the session will walk through examples and puzzles to teach valuable lessons. Several examples are then presented, including a MapReduce job to find the maximum value for each key, and issues around asynchronous job submission and reducer key/value types. Each example shows sample data and code, discusses what may go wrong, and provides the "moral" or lesson learned.
A Domain Specific Language (DSL) is a programming language focused on a particular problem domain. DSLs provide expressive notations and abstractions for their domain through appropriate syntax and semantics. Groovy enables the creation of DSLs through features like closures, builders, open classes, and AST transformations that allow customizing and extending the language.
Getting started with Elasticsearch and .NETTomas Jansson
This document provides an introduction to using Elasticsearch with .NET and the NEST client library. It demonstrates how to install and configure Elasticsearch on Windows, define mappings and index documents using NEST, perform various queries including fuzzy, highlighted, faceted queries, and add filters. NEST provides a strongly typed, fluent abstraction over Elasticsearch that allows querying and filtering Elasticsearch in a similar manner to Elasticsearch JSON queries. The document encourages attendees to view the demo code on GitHub for examples of indexing, querying, highlighting, faceting, and filtering documents using NEST.
In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design
Patterns are formalized best practices that the programmer must implement in the application.
Alternatives of JPA
Requery provide simple Object Mapping & Generate SQL to execute without reflection and session, so fast than JPA, simple and easy to learn.
Psycopg2 - Connect to PostgreSQL using Python ScriptSurvey Department
It's the presentation slides I prepared for my college workshop. This demonstrates how you can talk with PostgreSql db using python scripting.For queries, mail at dipeshsuwal@gmail.com
This document discusses using Python to connect to and interact with a PostgreSQL database. It covers:
- Popular Python database drivers for PostgreSQL, including Psycopg which is the most full-featured.
- The basics of connecting to a database, executing queries, and fetching results using the DB-API standard. This includes passing parameters, handling different data types, and error handling.
- Additional Psycopg features like server-side cursors, transaction handling, and custom connection factories to access columns by name rather than number.
In summary, it provides an overview of using Python with PostgreSQL for both basic and advanced database operations from the Python side.
Examples: https://gist.github.com/aditya01933/c6a867e981110885369f06c5a4103644
1. 3 pillars of ruby.
2. Classes and objects.
3. Inheritance - diving deep
4. Meta programming and reflection - diving deep.
5. Power of method missing.
6. Mixins and ducktyping
7. Super - diving deep
8. Yield
9. Closure
10. Block, proc and lambda
11. More meta programming(examples).
12. Ruby open classes.
The document discusses using Groovy to create a turtle graphics domain specific language (DSL). Key points:
- Turtle graphics is a vector-based graphics concept using a relative cursor called a "turtle" to draw.
- The author created a Turtle class in Groovy to allow drawing on a canvas via turtle commands. A Groovy shell is used to execute scripts with bindings to provide the Turtle object.
- Various techniques are discussed to customize the language, including adding imports, defining a base script class, and routing method calls through the Turtle object to enable turtle commands.
- The author demonstrates how to execute scripts securely by removing dangerous language features like loops or increment operators.
Scala is a programming language that runs on the Java Virtual Machine (JVM) and is designed to express common programming patterns in a concise, elegant, and type-safe way. Some key points about Scala include that it is functional and object-oriented, statically typed, and allows seamless integration with Java. Scala code is often more concise than equivalent Java code through features like pattern matching and immutable data structures. Functional programming principles like pure functions, recursion, and avoiding side effects are emphasized in Scala.
The Logical Burrito - pattern matching, term rewriting and unificationNorman Richards
The document summarizes key concepts related to unification, including pattern matching, term rewriting, and unification. It provides examples of these concepts in languages like ML, Mathematica, Prolog, and Clojure. Unification allows terms to be matched and variables substituted so that terms become identical. Pattern matching is used for conditional dispatch. Term rewriting uses rule-based substitutions to reduce terms. Prolog demonstrates how unification works for logic programming.
자프링(자바 + 스프링) 외길 12년차 서버 개발자가 코프링(코틀린 + 스프링)을 만난 후 코틀린의 특징과 스프링의 코틀린 지원을 알아가며 코프링 월드에서 살아남은 이야기…
코드 저장소: https://github.com/arawn/kotlin-support-in-spring
What can be done with Java, but should better be done with Erlang (@pavlobaron)Pavlo Baron
Erlang excels at building distributed, fault-tolerant, concurrent applications due to its lightweight process model and built-in support for distribution. However, Java is more full-featured and is generally a better choice for applications that require more traditional object-oriented capabilities or need to interface with existing Java libraries and frameworks. Both languages have their appropriate uses depending on the requirements of the specific application being developed.
Clojure is a LISP-like programming language that runs on the Java Virtual Machine. It was created in 2007 by Rich Hickey and is currently at version 1.1. Clojure is a functional, immutable, and concurrency-oriented language. It features LISP syntax, macros, immutability, functional programming, and easy interoperability with Java. Data structures in Clojure are code, allowing homoiconicity. Clojure also supports lazy sequences, STM-based concurrency without locks, and dynamic behavior via its REPL.
Wolltest du schon immer die Vorteile und Ideen von Scala in deinen Java oder Kotlin Projekten nutzen? Dann ist Vavr (ehemals Javaslang) genau die richtige Bibliothek für dich.
Anhand echter Projektbeispiele schauen wir uns den Nutzen an, den Vavr mit seinen syntaktischen Erweiterungen und Features bei der täglichen Arbeit bietet. Wir schauen uns Value Types, echte funktionale Datentypen an und werden lernen, wie wir Exceptions sinnvoller behandeln können. Alles für besser wartbaren und sauberen Code!
Vavr bietet die Möglichkeit, die Vorteile objekt-funktionaler Programmierung zu nutzen, ohne Java den Rücken kehren zu müssen.
The document discusses using GPars, a Groovy library, to perform parallel programming and concurrent operations. It covers GPars features like GParsPool for parallel collection operations, ParallelEnhancer for enhancing existing collections, callAsync for asynchronous execution, and parallel arrays for data parallelism. Examples are provided for map/reduce operations, parallel finding/filtering of collections, and parallel execution of closures.
This document discusses updates to the GPars concurrency library. It introduces new remote object capabilities that allow objects to communicate across the network using Netty. It also discusses various concurrency models like actors, dataflow, data parallelism, and CSP that are supported in GPars.
Dataflow: the concurrency/parallelism architecture you needRussel Winder
This document discusses dataflow architecture. It defines dataflow as an architecture where data flows between operators through channels. Each operator executes only in response to data arriving on its input channels. The document discusses how dataflow allows for concurrency and parallelism. It provides examples of dataflow frameworks in Scala, Akka, and Java and notes their limitations. GPars is highlighted as a framework that can create true dataflow networks by using DataflowQueue. The document uses calculating mean and standard deviation as a problem to demonstrate coding in dataflow.
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataCodemotion Tel Aviv
The document discusses parallel programming and challenges with traditional threading models. It introduces several parallel programming models in Groovy including actors, data parallelism, agents, and data flow. Actors process messages asynchronously. Data parallelism uses pools of threads to parallelize operations on collections. Agents encapsulate shared state. Data flow models divide a problem into independent tasks that execute in parallel based on data dependencies. These new models in Groovy aim to address issues with threads being low-level, error-prone, and difficult to reason about for parallel programming.
GPars (Groovy Parallel Systems) is an open-source concurrency and parallelism library for Java and Groovy that gives you a number of high-level abstractions for writing concurrent and parallel code in Groovy (map/reduce, fork/join, asynchronous closures, actors, agents, dataflow concurrency and other concepts), which can make your Java and Groovy code concurrent and/or parallel with little effort.
This document discusses using reactive programming with Scala and Akka to build distributed, concurrent systems. It describes using the actor model and message passing between actors to develop scalable and resilient applications. Key points covered include using actors to build a web scraping system, handling failures through supervision strategies, and testing actor systems.
The document discusses the actor model and Akka framework for building concurrent and distributed applications. It introduces some challenges of multi-threaded programming like non-determinism and shared mutable state. The actor model addresses these issues by representing entities as isolated actors that communicate asynchronously via message passing without shared state. Akka is an implementation of the actor model on the JVM that makes building fault-tolerant distributed systems easier. Key aspects covered include defining actors, routing messages, fault tolerance, and building remote actors for distribution. A Twitter-like messaging service is presented as a case study of how to structure such an application using Akka actors.
Akka is a toolkit for building highly concurrent, distributed, and fault-tolerant applications on the JVM. It provides actors as the core abstraction for developing such applications, with actors encapsulating state and behavior and communicating asynchronously by message passing. Akka applications are built around message-driven actors that can send and receive messages, and whose state changes are confined within the actor model. This makes Akka applications inherently scalable, fault-tolerant and self-healing.
This document summarizes a presentation about scaling web applications with Akka. It discusses how Akka uses an actor model of computation with message passing between lightweight processes to enable safe concurrency. Key features of Akka that help with scaling include fault tolerance through supervision, flexible dispatch strategies to leverage multiple cores, and support for NoSQL databases through pluggable storage backends. The presentation provides code examples of implementing actors in Akka and other frameworks and concludes by taking questions about Akka.
During the talk, we will build a simple web app using Lift and then introduce Akka ( http://akkasource.org) to help scale it. Specifically, we will demonstrate Remote Actors, "Let it crash" fail over, and Dispatcher. Other Scala oriented tools we will use include sbt and ENSIME mode for emacs.
Reactive Programming in .Net - actorbased computing with Akka.NetSören Stelzer
Im Entwickler-Alltag finden wir uns oft in Situationen wieder in denen wir mit parallelen, nebenläufigen Systemen kämpfen. Hier kann Actorbased Programming helfen dieser Herr zu werden. Akka.Net, welches sich selbst als „toolkit and runtime for building highly concurrent, distributed, and fault tolerant event-driven applications“ bezeichnet erlaubt es Entwicklern dieses Paradigma für sich zu nutzen.Akka.Net ist eine Portierung des von Typesafe entwickelten Actor-Framework.In der Java/Scala Welt hat es bereits einen durchschlagenden Erfolg. Akka.Net bietet nun diese Möglichkeiten für .Net-Entwickler.Im Wesentlichen soll der Vortrag auf die Basics des Actorbased Computings eingehen, sowie Parallelen zu verwandten Thematiken wie Agentbased Computing und verwandten Design-Patterns herstellen.An kleinen abstrakten Szenarien wird das Framework und eine minimale Anwendung eines Actor-Systems vorgestellt. Zum Abschluss ist geplant nochmals auf die essentielle Kommunikationspattern eingegangen.
The document provides an introduction to Akka, a toolkit for building highly concurrent, distributed, and resilient message-driven applications using the actor model on the JVM, describing how Akka implements the actor model with additional features and modules for clustering, remoting, streams, and more.
Akka 2.0 is a toolkit for building highly concurrent, distributed, and fault-tolerant applications on the JVM. It provides actors as the core abstraction for concurrency and distribution. Actors encapsulate state and behavior and communicate asynchronously by message passing. Akka provides elasticity so that new messages can be processed while an actor is busy. It also includes features for fault tolerance using a "let it crash" model and transparent distribution through routing.
New features in Akka 2.0
Akka is a right abstraction with actors for concurrent, fault-tolerant and scalable applicationsFor Fault-Tolerance uses “let it crash” model abstraction for transparent distribution for the load.
Akka provides tools for building concurrent, scalable and fault-tolerant systems using the actor model. The key tools provided by Akka include actors for concurrency, agents for shared state, dispatchers for work distribution, and supervision hierarchies for fault handling. Akka actors simplify concurrency through message passing and isolation, and provide tools for scaling and distributing actors across nodes for increased throughput and fault tolerance.
Akka is a event driven, asynchronous, distributed framework which help in doing asyc event handling. Akka is reactive which gives him power to handle faults, become responsive, elastic.
This document discusses using Celery and RabbitMQ to handle asynchronous and distributed tasks in Python. It provides an overview of Celery and RabbitMQ and how they can be used together. Examples are given of defining and running tasks, including periodic tasks, task sets, routing, retries, and interacting with results. The benefits of using Celery for slow, memory-intensive, or externally-dependent tasks are highlighted.
The document discusses various approaches for leveraging parallelism and concurrency including multithreading, fork/join, actors, dataflow, and software transactional memory. It notes that while multithreading is challenging, other approaches like actors, dataflow, and STM can allow for writing concurrency-agnostic code. It promotes the GPars library for its implementations of various parallel and concurrent programming abstractions in Java and Groovy.
Message-based communication patterns in distributed Akka applicationsAndrii Lashchenko
The document discusses various message-based communication patterns in Akka distributed applications, including tell, ask, pipeTo, and composing futures. It provides code examples of actor implementations demonstrating these patterns and how to handle responses, failures, timeouts, and combining multiple futures. The tell pattern is fire-and-forget messaging. The ask pattern uses a future to represent a possible response. PipeTo pipes a future to the original sender. Examples show how to handle successful, failed, and delayed futures through composing and combining them.
This document provides an overview of several Android development topics, including the Simple framework for serializing XML into Java objects, the Android process and thread model, AsyncTask for asynchronous operations, the Volley networking framework, and debugging using Eclipse. It describes the core components and best practices for each topic at a high level.
The document summarizes an agenda for a GPars workshop on parallel computing concepts including threads, agents, fork/join, parallel collections, dataflow, and actors. The workshop covers thread management and asynchronous invocation using thread pools, shared mutable state using agents, solving hierarchical problems using fork/join, processing parallel collections, composing asynchronous functions using dataflow, and communicating between isolated processes using actors.
Buiilding reactive distributed systems with AkkaJohan Andrén
The document summarizes Johan Andrén's presentation on building reactive distributed systems with Akka. It provides an overview of Akka clustering and tools for distributing actors and data across a cluster, including Cluster Sharding, Distributed Data, Distributed PubSub, and Cluster Singleton. It also discusses consistency models and challenges in distributed systems.
Building Complex Data Workflows with Cascading on HadoopGagan Agrawal
In the Hadoop world, writing Map Reduce is always a painful task especially when you want to create complex workflows with multiple Map Reduce jobs and having complex dependencies between them. There are high level languages like Pig latin or Hive which make writing Map Reduce jobs easy. But if you want to write complex logic, you need to write custom functions in Java, which makes testing and debugging difficult. This is where Cascading makes a developer's life easy. Everything is written in Java with ease of writing Map Reduce in high level language, similar to Pig or Hive. Once the logic is written, it can be easily be tested by running in stand-alone mode since everything is in Java. Not only that, Cascading provides Hadoop (or any other framework) independent APIs, which means workflows written in Cascading can be executed on multiple frameworks without any code change as long as Cascading connector is available
The document provides an overview of Hadoop2 and describes its key components HDFS, YARN, and improvements over earlier versions. HDFS introduces federation and high availability to address limitations of single NameNode architecture. YARN improves on MapReduce by separating cluster resource management from application execution through a ResourceManager and per-application ApplicationMasters for better scalability and utilization.
The document discusses using graph databases for insights into connected data. It provides an overview of graph databases, comparing them to relational databases and NoSQL stores. It discusses how graph databases are better suited than other models for richly connected data due to their native support of relationships. The document also covers graph data modeling, the Cypher query language, examples of graph databases in real world domains, and aspects of graph database internals like scalability.
This document provides an overview of big data, Hadoop, and related concepts:
- Big data refers to large datasets that cannot be processed efficiently by traditional systems due to their size. Sources include social media, smartphones, machines, and log files.
- Hadoop is an open-source framework for distributed storage and processing of large datasets across clusters of commodity hardware. It implements the MapReduce programming model.
- Key Hadoop components include HDFS for storage, MapReduce for distributed processing, and related projects like Pig, Hive, HBase, Flume, Oozie, and Sqoop. Companies use Hadoop for applications involving large datasets, such as log analysis, recommendations, and business intelligence
Groovy's AST Transformation is a compile time meta-programming technique and allows developer to hook into compilation process and add new fields or methods, or modify existing methods.
The document discusses several new features and enhancements in Java 7 including the Fork/Join framework for taking advantage of multiple processors, the new NIO 2.0 file system API for asynchronous I/O and custom file systems, support for dynamic languages, try-with-resources statement for improved exception handling, and other minor improvements like underscores in literals and strings in switch statements.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Skybuffer AI: Advanced Conversational and Generative AI Solution on SAP Busin...Tatiana Kojar
Skybuffer AI, built on the robust SAP Business Technology Platform (SAP BTP), is the latest and most advanced version of our AI development, reaffirming our commitment to delivering top-tier AI solutions. Skybuffer AI harnesses all the innovative capabilities of the SAP BTP in the AI domain, from Conversational AI to cutting-edge Generative AI and Retrieval-Augmented Generation (RAG). It also helps SAP customers safeguard their investments into SAP Conversational AI and ensure a seamless, one-click transition to SAP Business AI.
With Skybuffer AI, various AI models can be integrated into a single communication channel such as Microsoft Teams. This integration empowers business users with insights drawn from SAP backend systems, enterprise documents, and the expansive knowledge of Generative AI. And the best part of it is that it is all managed through our intuitive no-code Action Server interface, requiring no extensive coding knowledge and making the advanced AI accessible to more users.
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Driving Business Innovation: Latest Generative AI Advancements & Success StorySafe Software
Are you ready to revolutionize how you handle data? Join us for a webinar where we’ll bring you up to speed with the latest advancements in Generative AI technology and discover how leveraging FME with tools from giants like Google Gemini, Amazon, and Microsoft OpenAI can supercharge your workflow efficiency.
During the hour, we’ll take you through:
Guest Speaker Segment with Hannah Barrington: Dive into the world of dynamic real estate marketing with Hannah, the Marketing Manager at Workspace Group. Hear firsthand how their team generates engaging descriptions for thousands of office units by integrating diverse data sources—from PDF floorplans to web pages—using FME transformers, like OpenAIVisionConnector and AnthropicVisionConnector. This use case will show you how GenAI can streamline content creation for marketing across the board.
Ollama Use Case: Learn how Scenario Specialist Dmitri Bagh has utilized Ollama within FME to input data, create custom models, and enhance security protocols. This segment will include demos to illustrate the full capabilities of FME in AI-driven processes.
Custom AI Models: Discover how to leverage FME to build personalized AI models using your data. Whether it’s populating a model with local data for added security or integrating public AI tools, find out how FME facilitates a versatile and secure approach to AI.
We’ll wrap up with a live Q&A session where you can engage with our experts on your specific use cases, and learn more about optimizing your data workflows with AI.
This webinar is ideal for professionals seeking to harness the power of AI within their data management systems while ensuring high levels of customization and security. Whether you're a novice or an expert, gain actionable insights and strategies to elevate your data processes. Join us to see how FME and AI can revolutionize how you work with data!
GraphRAG for Life Science to increase LLM accuracyTomaz Bratanic
GraphRAG for life science domain, where you retriever information from biomedical knowledge graphs using LLMs to increase the accuracy and performance of generated answers
5th LF Energy Power Grid Model Meet-up SlidesDanBrown980551
5th Power Grid Model Meet-up
It is with great pleasure that we extend to you an invitation to the 5th Power Grid Model Meet-up, scheduled for 6th June 2024. This event will adopt a hybrid format, allowing participants to join us either through an online Mircosoft Teams session or in person at TU/e located at Den Dolech 2, Eindhoven, Netherlands. The meet-up will be hosted by Eindhoven University of Technology (TU/e), a research university specializing in engineering science & technology.
Power Grid Model
The global energy transition is placing new and unprecedented demands on Distribution System Operators (DSOs). Alongside upgrades to grid capacity, processes such as digitization, capacity optimization, and congestion management are becoming vital for delivering reliable services.
Power Grid Model is an open source project from Linux Foundation Energy and provides a calculation engine that is increasingly essential for DSOs. It offers a standards-based foundation enabling real-time power systems analysis, simulations of electrical power grids, and sophisticated what-if analysis. In addition, it enables in-depth studies and analysis of the electrical power grid’s behavior and performance. This comprehensive model incorporates essential factors such as power generation capacity, electrical losses, voltage levels, power flows, and system stability.
Power Grid Model is currently being applied in a wide variety of use cases, including grid planning, expansion, reliability, and congestion studies. It can also help in analyzing the impact of renewable energy integration, assessing the effects of disturbances or faults, and developing strategies for grid control and optimization.
What to expect
For the upcoming meetup we are organizing, we have an exciting lineup of activities planned:
-Insightful presentations covering two practical applications of the Power Grid Model.
-An update on the latest advancements in Power Grid -Model technology during the first and second quarters of 2024.
-An interactive brainstorming session to discuss and propose new feature requests.
-An opportunity to connect with fellow Power Grid Model enthusiasts and users.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
A Comprehensive Guide to DeFi Development Services in 2024Intelisync
DeFi represents a paradigm shift in the financial industry. Instead of relying on traditional, centralized institutions like banks, DeFi leverages blockchain technology to create a decentralized network of financial services. This means that financial transactions can occur directly between parties, without intermediaries, using smart contracts on platforms like Ethereum.
In 2024, we are witnessing an explosion of new DeFi projects and protocols, each pushing the boundaries of what’s possible in finance.
In summary, DeFi in 2024 is not just a trend; it’s a revolution that democratizes finance, enhances security and transparency, and fosters continuous innovation. As we proceed through this presentation, we'll explore the various components and services of DeFi in detail, shedding light on how they are transforming the financial landscape.
At Intelisync, we specialize in providing comprehensive DeFi development services tailored to meet the unique needs of our clients. From smart contract development to dApp creation and security audits, we ensure that your DeFi project is built with innovation, security, and scalability in mind. Trust Intelisync to guide you through the intricate landscape of decentralized finance and unlock the full potential of blockchain technology.
Ready to take your DeFi project to the next level? Partner with Intelisync for expert DeFi development services today!
Your One-Stop Shop for Python Success: Top 10 US Python Development Providersakankshawande
Simplify your search for a reliable Python development partner! This list presents the top 10 trusted US providers offering comprehensive Python development services, ensuring your project's success from conception to completion.
Trusted Execution Environment for Decentralized Process MiningLucaBarbaro3
Presentation of the paper "Trusted Execution Environment for Decentralized Process Mining" given during the CAiSE 2024 Conference in Cyprus on June 7, 2024.
Have you ever been confused by the myriad of choices offered by AWS for hosting a website or an API?
Lambda, Elastic Beanstalk, Lightsail, Amplify, S3 (and more!) can each host websites + APIs. But which one should we choose?
Which one is cheapest? Which one is fastest? Which one will scale to meet our needs?
Join me in this session as we dive into each AWS hosting service to determine which one is best for your scenario and explain why!
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Letter and Document Automation for Bonterra Impact Management (fka Social Sol...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on automated letter generation for Bonterra Impact Management using Google Workspace or Microsoft 365.
Interested in deploying letter generation automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
5. Problems with Java Concurrency Model
Synchronization
Dead-Locks
Live-Locks
Race Conditions
Starvation
6. GPars GOAL
To fully utilize all available processors
7. What is GPars ?
An open-source concurrency and parallelism
library for Groovy and Java
Gives a number of high-level abstractions for
writing concurrent and parallel code
Abstractions like..
Map-Reduce
Fork-Join
Asynchronous Closures
Actors
Agents
DataFlow
9. Data Parallelism
For low level data parallelism techniques
GParsPool – Relies on JSR-166y Fork/Join
Framework and offers greater functionality and
better performance.
GParsExecutorsPool – Uses old Java executors and
so is easy to setup in a managed or restricted
environment.
10. Data Parallelism – Parallel Collections
Dealing with data frequently involves
manipulating collections
Lists, arrays, sets, maps, iterators, strings etc.
can be viewed as collections of items
Common pattern to process such collections is to
take elements sequentially, one-by-one, and
make an action for each of the items in row.
E.g min() function – Iterates over the collection
sequentially to find the minimum value
11. Parallel Collections with GParsPool
The GParsPool class enables a ParallelArray-based
(from JSR-166y) concurrency DSL for collections
and objects.
GParsPool.withPool(){ .. }
GParsPool.withPool(){ ForkJoinPool pool ->.. }
GParsPool.withPool(10){ .. }
GParsPool.withExistingPool(ForkJoinPool pool){ .. }
12. Parallel Collections with GParsPool
Some of the methods supported are -
eachParallel()
collectParallel()
findAllParallel()
findAnyParallel()
groupByParallel()
minParallel()
maxParallel()
sumParallel()
countParallel()
13. Parallel Collections with Meta-class enhancer
ParallelEnhancer
def list = [1,2,3,4,5,6,7,8]
ParallelEnhancer.enhanceInstance(list)
println list.collectParallel{it * 2}
14. Parallel Collections with Meta-class enhancer
ParallelEnhancer
def animals = ['dog','ant','cat','whale']
ParallelEnhancer.enhanceInstance(animals)
println(animals.anyParallel{it=='ant'} ? 'Found
an ant' : 'No ants found')
println(animals.everyParallel{it.contains("a")}
? 'All animals contain a' : 'Some animals can
live without a')
15. Parallel Collections – Warning
Don't do this
def thumbnails = []
images.eachParallel{
thumbnails << it.thumbnail
}
16. Parallel Collections - Memoize
Enables caching of function's return values.
Repeated calls to the memoized function will
retrieve the result value from an internal
transparent cache.
Example
17. Data Parallelism – Map Reduce
Can be used for the same purpose as the
xxxParallel() family methods and has very similar
semantics.
Can perform considerably faster if you need to
chain multiple methods to process a single
collection in multiple steps.
Example
18. Data Parallelism – Map Reduce
How it is different from Parallel Collections
The xxxParallel() methods must return a legal collection of items.
Internally they build ParallelArray, perform required operation
concurrently and destroy ParallelArray before returning
Repeats same process for every xxxParallel() method call.
With Map-Reduce Parallel Array is created just once and same is
used in all chained method calls.
To get collection, retrieve "collection" property
19. Data Parallelism – Asynchronous Invocation
async() - Creates an asynchronous variant of the
supplied closure
GParsPool.withPool{
Closure longLastingCalculation = {calculate()}
Closure fastCalculation =
longLastingCalculation.async()
Future result = fastCalculation()
//do stuff while calculation performs...
println result.get()
}
20. Data Parallelism – Asynchronous Invocation
callAsync() - Calls a closure in a separate thread
supplying the given arguments
GParsPool.withPool{
println ({it * 2}.call(3))
println ({it * 2}.callAsync(3).get())
}
22. Actors
Was originally inspired by the Actors library in
Scala
Allow for a message passing-based concurrency
model
Programs are collections of independent active
objects that exchange messages and have no
mutable shared state
Always guarantee that at most one thread
processes the actor's body
23. Actors
Helps to avoid deadlock, live-lock and starvation
A great number of actors can share a relatively
small thread pool
An actor with no work doesn't consume threads.
No shared mutable state.
Runs in daemon threads.
25. Actors - Types
Stateless Actors
DynamicDispatchActor and Reactive Actor
Keep no track of what messages have arrived previously
Stateful Actors
DefaultActor
Allows user to handle implicit state directly
After receiving a message the actor moves into a new state
with different ways to handle future messages
E.g Encrypted messages for decryption, only after it has
received the encryption keys
26. Stateful Actors
Can be created in one of two ways
By extending DefaultActor class
Static methods of Actors class
27. Actors - Usage
Performs 3 specific operations
Send Messages
Receive Messages
Create new actors
28. Actors – Sending Messages
Messages can be sent to actors using
send() method
<< operator
Implicit call() method
34. Actors – Receiving Messages
react() method within Actor's code is responsible
to consume message from actor's inbox
react{message ->
//consume message...
}
Wait's if there is no message to be processed
immediately
Supplied closure is not invoked directly
Is scheduled for processing by any thread in the
thread pool once a message is available
36. Blocking Actors
Blocking actors hold a single pooled thread for
their whole life-time
Includes the time when waiting for messages
Avoids thread management overhead
The number of blocking actors running
concurrently is limited by the number of threads
available in the shared pool.
Provide better performance compared to
continuation-style actors
Good candidates for high-traffic positions in actor
network.
38. Stateless Actors
Dynamic Dispatch Actor
Repeatedly scans for messages
Dispatches arrived messages to one of the
onMessage(message) methods
Performance better than DefaultActor
40. Stateless Actors - DynamicDispatchActor
Actor myActor = new
DynamicDispatchActor().become{
when {String msg ->
println "Received String : $msg"
}
when {Integer msg ->
println "Received Integer : $msg"
}
}
41. Stateless Actor – Static Dispatch Actor
Contains single handler method
Performs better than DynamicDispatchActor
Make Dataflow operators four times faster
compared to when using DynamicDispatchActor
class MyActor extends StaticDispatchActor<String>{
void onMessage(String message){
println "Message is : $message"
}
}
43. Agents
Inspired by Agents in Clojure
Used when shared mutable state is required e.g
Shopping Cart
Is a thread-safe non-blocking shared mutable
state wrapper
Hides data and protects from direct access
Accepts messages and process them
asynchronously
44. Agents
Messages are commands(functions) and executed
inside Agent
Agent guarantees execution of a single function at
a time
After reception, received function is run against
the internal state of Agent and return value is new
internal state of Agent
The mutable values are not directly accessible
from outside
45. Agents
Requests have to be sent to Agent
Agent guarantees to process the requests
seqentially on behaf of callers
Wraps a reference to mutable state held inside a
single field
Messages can be sent via
'<<' operator
send() method
Implicit call() method
46. Agents - Basic Rules
Submitted commands obtain the agent's state as
a parameter.
Can call any methods on the agent's state.
Replacing the state object with a new one is also
possible using the updateValue() method.
The val property waits until all preceding
commands are consumed
47. Agents – Basic Rules
The valAsync() does not block caller.
The instantVal returns immediate snapshot of
agent state.
All Agent instances share a default daemon thread
pool.
Setting the threadPool property of an Agent
instance will allow it to use a different thread
pool.
49. Agent – Listeners & Validators
Listeners
Get notified each time internal state changes
Validators
Get a chance to reject a coming change by throwing an
exception
51. Dataflow
Operations in Dataflow programs consists of
“Black Boxes”
Inputs and Outputs are always explicitly defined
They run as soon as all of their inputs become
valid
Dataflow program is more like series of workers
in assembly line
They are inherently parallel
53. Dataflow Variables
Channel to safely and reliably transfer data from
producers to their consumers
Value is set using '<<' operator
A task blocks until value has been set by another
task
DF Variable can only be set only one in its
lifetime
Don't have to bother with ordering and
synchronizing the tasks or threads
54. Dataflow
def x = new DataflowVariable()
def y = new DataflowVariable()
def z = new DataflowVariable()
task{z << x.val + y.val}
task{x << 10}
task{y << 5}
println "Result : $z.val"