Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Onyx

Sponsored · Ship Features Fearlessly Turn features on and off without deploys. Used by thousands of Ruby developers. →

 Onyx

This is the presentation for the talk on Onyx which I presented in Pune Data Conference 2019.

Avatar for Abhishek Anand Amralkar

Abhishek Anand Amralkar

March 16, 2019

More Decks by Abhishek Anand Amralkar

Other Decks in Programming

Transcript

  1. Different Computation Engines • Apache Spark ◦ Large Scale Data

    Processing ◦ Streaming Support ◦ Micro Batch Support ◦ Written in Scala ◦ Supports Python and Java too
  2. Different Computation Engines • Apache Flink ◦ Stream first and

    then batch ◦ Streaming Data Flow Engine ◦ Written in JAVA and Scala
  3. Why Clojure? Clojure is..... • A dialect of Lisp •

    Interop • Emphasizes functional programming • Runs on the Java Virtual Machine • Designed for Concurrency
  4. Truthiness What is truthy? • true • “False” • [

    ] • (= 1 1) • 0 • 1 What is falsey? • false • nil • ( = 1 2 )
  5. Clojure Collections Lists • Singly linked lists • First item

    in calling position • Heterogeneous elements ‘( 1 2 3 4 “foo” :bar ) Vectors • Simply evaluate each item in order. • Fast looks ups • Heterogeneous elements [ 1 2 3 4 “foo” :bar ]
  6. Clojure Collections Maps • Maps store Keys and Values {:name

    “abhishek”} Sets • Store zero or more unique items #{ :a :b 1 2 3 }
  7. Clojure Functions • First Class • Higher-Order • Pure Functions

    def or defn? • Both bind to symbol or name • def is only evaluated once • defn is evaluated every time it is called
  8. What Onyx brings? • Clojure Philosophy • How to rethink

    about data? • How to program your programs in Distributed Systems
  9. What Onyx is? • Masterless • Cloud Scale • Fault

    Tolerant • High Performance Distributed Computation System • Batch and Stream hybrid processing model • Written in Clojure
  10. Onyx Program • Read data from the source • Transform

    the data into various sources • Write the data into the target
  11. WorkFlow :in | :split-sentence | :count-words | :output (def workflow

    [[:in :split-sentence] [:split-sentence :count-words] [:count-words :out]])
  12. Catalog (def catalog [{:onyx/name :in :onyx/plugin :onyx.plugin.core-async/input :onyx/type :input :onyx/medium

    :core.async :onyx/batch-size batch-size :onyx/max-peers 1 :onyx/doc "Reads segments from a core.async channel"}
  13. Catalog {:onyx/name :out :onyx/plugin :onyx.plugin.core-async/output :onyx/type :output :onyx/medium :core.async :onyx/max-peers

    1 :onyx/batch-size batch-size :onyx/doc "Writes segments to a core.async channel"}])
  14. Sneak Peak into Zookeeper • Apache Zookeeper is open source

    tool from Apache. • Originally developed at Yahoo. • Zookeeper is written in Java and it is platform independent. • Zookeeper service can run in 2 mode ◦ Standalone ◦ Quorum
  15. How to interact with Zookeeper? • Zookeeper CLI ◦ create

    /avengers "infinitywar" ◦ get /avengers ◦ get /avengers [watch] 1 ◦ set /avengers endgame ◦ delete /avengers ◦ ls / ◦ stat /avengers
  16. Aeron • Messaging layer in Onyx • Takes care of

    transfer of segments between peers.
  17. Official Plugins (in/out) • onyx-core-async • onyx-kafka • onyx-kafka-0.8 •

    onyx-datomic • onyx-redis • onyx-sql • onyx-bookkeeper
  18. Onyx Deployment • Docker • Kubernetes • Apache Mesos •

    DCOS • Shared File System like AWS S3 • Any Cloud VM
  19. About Me (def about-me {:name “Abhishek Anand Amralkar” :shortname “@aaa”

    :from “Talentica Software Pvt. Ltd” :social { :blog “https://medium.com/@aamralkar” :twitter “https://twitter.com/aamralkar” :github “https://github.com/abhishekamralkar”} })