• Familiarity with big data and real time streaming platforms • Familiarity with scala • Effort between the akka-streams and Gearpump teams started late last year • Resulted in a number of pull requests into akka-streams to enable different materializers • Close to completion with good support of the akka-streams DSL (all GraphStages) • Fairly seamless to switch between local and distributed
http://gearpump.apache.org • Architect on Trusted Analytics Platform (TAP) - http://trustedanalytics.org • Lead or Architect across many companies, industries - NYSE, eBay, PayPal, Yahoo, ... Title Goes Here There are many variations of passages of lorem ipsum available, but the majority suffered alteration some form.
March • Similar to Apache Beam and Apache Flink (real-time message delivery) • Heavily leverages the actor model and akka (more so than others) • Unique features like dynamic DAG • Excellent runtime visualization tooling of cluster and application DAGs • One of the best big data performance profiles (both throughput, latency)
data platform? • Big Data platform evolving features ◦ Functionality big data platforms are embracing • Prerequisites needed for any Big Data platform ◦ Minimal features a big data platform must have • Big data platform integration challenges ◦ What concepts do not map well within big data platforms? • Object models: akka-streams, Gearpump • Materialization ◦ ActorMaterializer - materializing the module tree ◦ GearpumpMaterializer - rewriting the module tree
◦ Throughput and latency are key big data features that require scaling beyond single JVM’s • Akka-streams DSL is a superset of other big data platform DSLs ◦ Has a logical plan (declarative) that can be transformed to an execution plan (runtime) • Akka-streams programming paradigm is declarative, composable, extensible*, stackable* and reusable* * Provides a level of extensibility and functionality beyond most big data platform DSLs
Kleisli (theoretical). • Source, Sink, Flow or BidiFlow may contain their own topologies * Provides a level of extensibility and functionality beyond most big data platform DSLs
• Recent akka-streams feature is dynamic attachment via hubs • Hubs will take advantage of Gearpump dynamic DAG within the GearpumpMaterializer * Provides a level of extensibility and functionality beyond most big data platform DSLs
are moving to consolidate disparate API’s ◦ Too many APIs: Concord, Flink, Heron, Pulsar, Spark, Storm, Samza ◦ Common DSL is also an approach being taken by Apache Beam ◦ Analogy to SQL - common grammar that different platforms execute
have completion or cancellation semantics. Big data pipelines are often infinite streams and do not complete. Cancel is often viewed as a failure. • Balance[T] • Completion[T] • Merge[T] • Split[T]
base type is a GraphStage ↪ Graph contains a ↳ Module contains a ↳ Shape ↪ Only a RunnableGraph can be materialized ↪ A RunnableGraph needs at least one Source and one Sink
◦ Materialized Value • Graph contains a Module contains a Shape ◦ Module is where the runtime is constructed and manipulated • Graph’s first level subtypes provide basic functionality ◦ Source ◦ Sink ◦ Flow ◦ BidiFlow S M Graph Source Sink Flow BidiFlow Module Shape
a Set[Modules] • Module is a declarative data structure used as the AST • Module is used to represent a graph of nodes and edges from the original GraphStages • Module contains downstream and upstream ports (edges) • Materializers walk the module tree to create and run instances of publishers and subscribers. • Each publisher and subscriber is an actor (ActorGraphInterpreter)
module type (GearpumpMaterializer) 2. AST (module tree) is matched for certain module types ◦ After distribution - local ActorMaterializer is used for operations on that worker ◦ Materializer works more as a distribution coordinator
(Reactive API). 3. Each Publisher or Subscriber contains an instance of GraphStageLogic specific to that GraphStage. 4. Each Publisher or Subscriber also contains an instance of ActorGraphInterpreter - an Actor that manages the message flow using GraphStageLogic.
2. Choice of ‘local’ and ‘remote’ is determined by a ‘Strategy’. The default Strategy is to put Source and Sink types in local GraphStageModule( stage=StatefulMapConcat)
= GearpumpMaterializer() RunnableGraph.fromGraph(GraphDSL.create() { implicitbuilder => val A = builder.add(Source.single(0)).out val B = builder.add(Broadcast[Int](2)) val C = builder.add(Merge[Int](2)) val D = builder.add(Flow[Int].map(_ + 1)) val E = builder.add(Balance[Int](2)) val F = builder.add(Merge[Int](2)) val G = builder.add(Sink.foreach(println)).in C <~ F A ~> B ~> C ~> F B ~> D ~> E ~> F E ~> G ClosedShape }).run()
declarative pipeline reuse and extensibility. • Akka-streams allows different materializers to control and materialize different parts of the module tree. • It’s possible to provide a seamless (or nearly seamless) conversion of akka-streams to run in a distributed setting by merely replacing ActorMaterializer with GearpumpMaterializer. • Alternative distributed materializers can be implemented using a similar approach. • Distributed akka-streams via Apache Gearpump will be available in the next release of Apache Gearpump (0.8.2) or will be made available within an akka specific repo.