SlideShare a Scribd company logo
Typesafe Stack Software
Development On The JVM

Sushanta Pradhan
Talentica Software (I) Pvt. Ltd.
History of Hardware Architecture

•   Single core era
    • moore's law achieved by increasing clock cycles

•   Multi core era
    • moore's law achieved by increasing # of cores
Moore’s Law
PPP – Grand Challenge
•   Parallel programming as easy as sequential
    programming
•   Moores’s law of performance – speed up 2 times year
    on year
•   Eliminate concurrency bugs
History of software applications
 • pre .com era
   • standalone desktop apps
 • .com era
   • web sites - static web pages, automated business
      processes
   • data controlled by software vendor
   • deployed on data centers
contd ..
 •   web2.0/semantic web era
     • web/networked applications
     • Smart apps
     • data not controlled by vendor but by the users
     • deployed on cloud
Properties of modern day App
•   Scalability
•   Distributed
•   Parallel & Concurrent
•   Dynamic
•   Agile & Swift
Parallelism & Concurrency
 •   Parallel Programming
     • parallel execution of programs
     • can't be performed without parallel hardware
     • programs get faster
Parallelism & Concurrency
•   Concurrent Programming
    • simultaneous execution of programs
    • can be performed without parallel hardware
    • programs get more responsive

Both are too hard !!
Why Hard?

•   non-determinism due to shared mutable state by
    concurrent threads
•   encapsulate state in actors or transactors but fundamental
    problems still remains

    non-determinism = parallel processing + mutable state
Remedy?
       PREVENTION IS BETTER THAN CURE !!

 •   Avoid mutable state and get deterministic processing

 •   Which means program functionally
Space vs Time
Space(functional/parallel)




    Time(imperative/concurrent)
Scala
•   Hybrid – functional & object oriented (pure)
•   strong static typing
•   Agile - concise & expressive
•   Parallel & Sequential
•   intermixes well with Java
Scala contd ..

  Parallellism
  • parallel collections
  • distributed collections
  Concurrency
  • Actors
  • STM              Akka
  • Futures
Scala contd ..

•   Concise Java
•   Immutability Val & Var
•   Tuples & Multiple Assignments
•   Sensible Defaults
•   Operator Overloading
Scala classes ..
•   Terse
•   Object keyword - Singleton
•   Companion Objects
•   Type inference
•   Option[T] – Some[T], None
Class hierarchy
Scala – Functional Aspects
•   Functions too are objects
•   Higher Order Functions
•   Partially applied Functions
•   Closures
Scala Inehritance
•   Traits
•   Mixins
•   Type inference - implicit keyword
Scala collections
•   Mutable & immutable
•   filter()
•   Map()
•   foldLeft()
•   foldRight()
Scala – Pattern Matching
•   Advanced switch case
•   Literals and constants
•   WildCards
•   Tuples & Lists
•   Guards
•   Regular Expressions
Scala - Concurrency
•   actor()
•   Actor Class
•   receive() & recieveWithin()
•   react() & reachWithin()
•   loop() & loopwhile()
Akka - Middleware
•   Concurrent, Scalable & fault-tolerant
•   based on actor model
•   highly performant
•   event driven
•   location transparency
Actor system
•   ensemble of actors sharing common configuration
•   hierarchical structure
•   heavyweight
•   has its own pool of resources threads
Supervision
•   dependency relationship between actors
•   supervisor - subordinate model
•   supervisor monitors and reacts to any errors reported
    by subordinates
•   configurable supervision strategy
•   lifecycle monitoring
Supervision hierarchy




                                ”root guardian”

                        ”guardian”
             shutdown                    “system
         guardian”
                                order
Remoting
•   ActorPath
    • purely local - "akka://my-sys/user/service-a/worker1"
    • local or remote - "akka://my-sys@host.example.com:5678
                   /user/service-b"

•   Seamlessly send messages to actors on remote nodes
Routing
•   route messages to actors(routees)
•   ideal for load balancing
•   Examples
    • RoundRobinRouter
    • RandomRouter
    • SmallestMailboxRouter
    • BroadcastRouter
Dispatchers
•   make akka actors tick
•   manages the resources(threads) used by actors
•   configure mailboxes of actors
•   Examples
    • fork-join-executor
    • thread-pool-executor
Play
•   ruby on rails like agility
•   convention over configuration
•   seamless integration with akka for scalability
•   edit and test
Play contd ..
 •   an easy, out-of-the-box setup for unit and functional testing
 •   asynchronous HTTP request handling
 •   WebSocket support
 •   cache support (e.g. memcached)
 •   integrated JSON and XML handling
Progressive Stream Processing
•   Iteratees
•   Enumerators
•   Enumeratees
Q/A

More Related Content

PDF
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
Atlassian
 
PPT
Sneaking Scala through the Back Door
Dianne Marsh
 
PPTX
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
Legacy Typesafe (now Lightbend)
 
PPTX
Apache spark
Sameer Mahajan
 
PDF
Introduction to Rails by Evgeniy Hinyuk
Pivorak MeetUp
 
PDF
Lecture #5 Introduction to rails
Evgeniy Hinyuk
 
PPTX
Getting started with Apache Spark
Habib Ahmed Bhutto
 
PDF
Reactive meetup 0 copy
Patrick Charles
 
AtlasCamp 2014: Preparing Your Plugin for JIRA Data Center
Atlassian
 
Sneaking Scala through the Back Door
Dianne Marsh
 
A Deeper Look Into Reactive Streams with Akka Streams 1.0 and Slick 3.0
Legacy Typesafe (now Lightbend)
 
Apache spark
Sameer Mahajan
 
Introduction to Rails by Evgeniy Hinyuk
Pivorak MeetUp
 
Lecture #5 Introduction to rails
Evgeniy Hinyuk
 
Getting started with Apache Spark
Habib Ahmed Bhutto
 
Reactive meetup 0 copy
Patrick Charles
 

What's hot (20)

PDF
Display earthquakes with Akka-http
Pierangelo Cecchetto
 
PPT
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
PROIDEA
 
PPT
Flying to clouds - can it be easy? Cloud Native Applications
Jacek Bukowski
 
PPTX
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Josh Carlisle
 
PDF
Azkaban
Anatoliy Nikulin
 
PDF
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
Lightbend
 
PPTX
Getting ready to java 8
DataArt
 
PPTX
Getting ready to java 8
Strannik_2013
 
PPTX
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
MobileNepal
 
PDF
Apache Zeppelin & Cluster
Jongyoul Lee
 
PPTX
Search and analyze your data with elasticsearch
Anton Udovychenko
 
PPTX
Hands-on Performance Tuning Lab - Devoxx Poland
C2B2 Consulting
 
PPTX
Uniqueness of java
Sandeep Pandey
 
PDF
Transactions in micro-services (fall 2019)
Rudy De Busscher
 
PPTX
Biomatters and Amazon Web Services
Biomatters
 
PDF
Advanced queries on the Infinispan Data Grid
C2B2 Consulting
 
PDF
Control and monitor_microservices_with_microprofile
Rudy De Busscher
 
PPTX
Deploying microservices on AWS
Michael Haberman
 
PDF
Zeppelin meetup 2016 madrid
Jongyoul Lee
 
Display earthquakes with Akka-http
Pierangelo Cecchetto
 
JDD 2016 - Jacek Bukowski - "Flying To Clouds" - Can It Be Easy?
PROIDEA
 
Flying to clouds - can it be easy? Cloud Native Applications
Jacek Bukowski
 
Rainbows, Unicorns, and other Fairy Tales in the Land of Serverless Dreams
Josh Carlisle
 
The 6 Rules for Modernizing Your Legacy Java Monolith with Microservices
Lightbend
 
Getting ready to java 8
DataArt
 
Getting ready to java 8
Strannik_2013
 
Training on iOS app development - Samesh Swongamikha & Neetin Sharma
MobileNepal
 
Apache Zeppelin & Cluster
Jongyoul Lee
 
Search and analyze your data with elasticsearch
Anton Udovychenko
 
Hands-on Performance Tuning Lab - Devoxx Poland
C2B2 Consulting
 
Uniqueness of java
Sandeep Pandey
 
Transactions in micro-services (fall 2019)
Rudy De Busscher
 
Biomatters and Amazon Web Services
Biomatters
 
Advanced queries on the Infinispan Data Grid
C2B2 Consulting
 
Control and monitor_microservices_with_microprofile
Rudy De Busscher
 
Deploying microservices on AWS
Michael Haberman
 
Zeppelin meetup 2016 madrid
Jongyoul Lee
 
Ad

Viewers also liked (9)

PPTX
Moving to moodle 2
JISC RSC Eastern
 
PPTX
Indic threads pune12-accelerating computation in html 5
IndicThreads
 
PPT
Phone for Me, Tablet for We: Building a multi screen app in One Hour
IndicThreads
 
PDF
Cloud development made easy with cloud foundry indicthreads cloud computing...
IndicThreads
 
PPTX
The move to m2 colchsfc
JISC RSC Eastern
 
PPTX
Indic threads pune12-recommenders-apache-mahout
IndicThreads
 
PDF
Building modular applications
IndicThreads
 
PPT
Rsc update feb 2014
JISC RSC Eastern
 
PPTX
Http2 is here! And why the web needs it
IndicThreads
 
Moving to moodle 2
JISC RSC Eastern
 
Indic threads pune12-accelerating computation in html 5
IndicThreads
 
Phone for Me, Tablet for We: Building a multi screen app in One Hour
IndicThreads
 
Cloud development made easy with cloud foundry indicthreads cloud computing...
IndicThreads
 
The move to m2 colchsfc
JISC RSC Eastern
 
Indic threads pune12-recommenders-apache-mahout
IndicThreads
 
Building modular applications
IndicThreads
 
Rsc update feb 2014
JISC RSC Eastern
 
Http2 is here! And why the web needs it
IndicThreads
 
Ad

Similar to Indic threads pune12-typesafe stack software development on the jvm (20)

PDF
Typesafe stack - Scala, Akka and Play
Luka Zakrajšek
 
PPTX
Developing distributed applications with Akka and Akka Cluster
Konstantin Tsykulenko
 
PPT
Building large scale, job processing systems with Scala Akka Actor framework
Vignesh Sukumar
 
PPTX
Composable Futures with Akka 2.0
Mike Slinn
 
PDF
Agile Lab_BigData_Meetup_AKKA
Paolo Platter
 
PPTX
Road Trip To Component
Marketa Adamova
 
PPTX
Akka.Net Overview
Geoffrey Vandiest
 
PPTX
Real world Scala hAkking NLJUG JFall 2011
Raymond Roestenburg
 
PDF
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Helena Edelson
 
PPTX
Process Orchestration with Flowable and Spring Boot
Chavdar Baikov
 
PPTX
Micro services Architecture
Jenis Dharmadurai
 
PDF
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
PPTX
DEVNET-1106 Upcoming Services in OpenStack
Cisco DevNet
 
PDF
Play Framework and Activator
Kevin Webber
 
PDF
NDev Talk - Serverless Design Patterns
Ryan Green
 
PPTX
Fault tolerance
Thisara Pramuditha
 
PPTX
Concurrency in java
Abhra Basak
 
PPTX
Azure basics
Jitendra Soni
 
PPTX
Architectures, Frameworks and Infrastructure
harendra_pathak
 
PPTX
ZooKeeper (and other things)
Jonathan Halterman
 
Typesafe stack - Scala, Akka and Play
Luka Zakrajšek
 
Developing distributed applications with Akka and Akka Cluster
Konstantin Tsykulenko
 
Building large scale, job processing systems with Scala Akka Actor framework
Vignesh Sukumar
 
Composable Futures with Akka 2.0
Mike Slinn
 
Agile Lab_BigData_Meetup_AKKA
Paolo Platter
 
Road Trip To Component
Marketa Adamova
 
Akka.Net Overview
Geoffrey Vandiest
 
Real world Scala hAkking NLJUG JFall 2011
Raymond Roestenburg
 
Streaming Analytics with Spark, Kafka, Cassandra and Akka
Helena Edelson
 
Process Orchestration with Flowable and Spring Boot
Chavdar Baikov
 
Micro services Architecture
Jenis Dharmadurai
 
Stay productive_while_slicing_up_the_monolith
Markus Eisele
 
DEVNET-1106 Upcoming Services in OpenStack
Cisco DevNet
 
Play Framework and Activator
Kevin Webber
 
NDev Talk - Serverless Design Patterns
Ryan Green
 
Fault tolerance
Thisara Pramuditha
 
Concurrency in java
Abhra Basak
 
Azure basics
Jitendra Soni
 
Architectures, Frameworks and Infrastructure
harendra_pathak
 
ZooKeeper (and other things)
Jonathan Halterman
 

More from IndicThreads (20)

ODP
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
PPT
Go Programming Language - Learning The Go Lang way
IndicThreads
 
PPT
Building Resilient Microservices
IndicThreads
 
PPT
App using golang indicthreads
IndicThreads
 
PDF
Building on quicksand microservices indicthreads
IndicThreads
 
PDF
How to Think in RxJava Before Reacting
IndicThreads
 
PPT
Iot secure connected devices indicthreads
IndicThreads
 
PDF
Real world IoT for enterprises
IndicThreads
 
PPT
IoT testing and quality assurance indicthreads
IndicThreads
 
PPT
Functional Programming Past Present Future
IndicThreads
 
PDF
Harnessing the Power of Java 8 Streams
IndicThreads
 
PDF
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
PPTX
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
PDF
Cars and Computers: Building a Java Carputer
IndicThreads
 
PPTX
Scrap Your MapReduce - Apache Spark
IndicThreads
 
PPT
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
PPTX
Speed up your build pipeline for faster feedback
IndicThreads
 
PPT
Unraveling OpenStack Clouds
IndicThreads
 
PPTX
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 
PDF
Architectural Considerations For Complex Mobile And Web Applications
IndicThreads
 
Understanding Bitcoin (Blockchain) and its Potential for Disruptive Applications
IndicThreads
 
Go Programming Language - Learning The Go Lang way
IndicThreads
 
Building Resilient Microservices
IndicThreads
 
App using golang indicthreads
IndicThreads
 
Building on quicksand microservices indicthreads
IndicThreads
 
How to Think in RxJava Before Reacting
IndicThreads
 
Iot secure connected devices indicthreads
IndicThreads
 
Real world IoT for enterprises
IndicThreads
 
IoT testing and quality assurance indicthreads
IndicThreads
 
Functional Programming Past Present Future
IndicThreads
 
Harnessing the Power of Java 8 Streams
IndicThreads
 
Building & scaling a live streaming mobile platform - Gr8 road to fame
IndicThreads
 
Internet of things architecture perspective - IndicThreads Conference
IndicThreads
 
Cars and Computers: Building a Java Carputer
IndicThreads
 
Scrap Your MapReduce - Apache Spark
IndicThreads
 
Continuous Integration (CI) and Continuous Delivery (CD) using Jenkins & Docker
IndicThreads
 
Speed up your build pipeline for faster feedback
IndicThreads
 
Unraveling OpenStack Clouds
IndicThreads
 
Digital Transformation of the Enterprise. What IT leaders need to know!
IndicThreads
 
Architectural Considerations For Complex Mobile And Web Applications
IndicThreads
 

Indic threads pune12-typesafe stack software development on the jvm

  • 1. Typesafe Stack Software Development On The JVM Sushanta Pradhan Talentica Software (I) Pvt. Ltd.
  • 2. History of Hardware Architecture • Single core era • moore's law achieved by increasing clock cycles • Multi core era • moore's law achieved by increasing # of cores
  • 4. PPP – Grand Challenge • Parallel programming as easy as sequential programming • Moores’s law of performance – speed up 2 times year on year • Eliminate concurrency bugs
  • 5. History of software applications • pre .com era • standalone desktop apps • .com era • web sites - static web pages, automated business processes • data controlled by software vendor • deployed on data centers
  • 6. contd .. • web2.0/semantic web era • web/networked applications • Smart apps • data not controlled by vendor but by the users • deployed on cloud
  • 7. Properties of modern day App • Scalability • Distributed • Parallel & Concurrent • Dynamic • Agile & Swift
  • 8. Parallelism & Concurrency • Parallel Programming • parallel execution of programs • can't be performed without parallel hardware • programs get faster
  • 9. Parallelism & Concurrency • Concurrent Programming • simultaneous execution of programs • can be performed without parallel hardware • programs get more responsive Both are too hard !!
  • 10. Why Hard? • non-determinism due to shared mutable state by concurrent threads • encapsulate state in actors or transactors but fundamental problems still remains non-determinism = parallel processing + mutable state
  • 11. Remedy? PREVENTION IS BETTER THAN CURE !! • Avoid mutable state and get deterministic processing • Which means program functionally
  • 12. Space vs Time Space(functional/parallel) Time(imperative/concurrent)
  • 13. Scala • Hybrid – functional & object oriented (pure) • strong static typing • Agile - concise & expressive • Parallel & Sequential • intermixes well with Java
  • 14. Scala contd .. Parallellism • parallel collections • distributed collections Concurrency • Actors • STM Akka • Futures
  • 15. Scala contd .. • Concise Java • Immutability Val & Var • Tuples & Multiple Assignments • Sensible Defaults • Operator Overloading
  • 16. Scala classes .. • Terse • Object keyword - Singleton • Companion Objects • Type inference • Option[T] – Some[T], None
  • 18. Scala – Functional Aspects • Functions too are objects • Higher Order Functions • Partially applied Functions • Closures
  • 19. Scala Inehritance • Traits • Mixins • Type inference - implicit keyword
  • 20. Scala collections • Mutable & immutable • filter() • Map() • foldLeft() • foldRight()
  • 21. Scala – Pattern Matching • Advanced switch case • Literals and constants • WildCards • Tuples & Lists • Guards • Regular Expressions
  • 22. Scala - Concurrency • actor() • Actor Class • receive() & recieveWithin() • react() & reachWithin() • loop() & loopwhile()
  • 23. Akka - Middleware • Concurrent, Scalable & fault-tolerant • based on actor model • highly performant • event driven • location transparency
  • 24. Actor system • ensemble of actors sharing common configuration • hierarchical structure • heavyweight • has its own pool of resources threads
  • 25. Supervision • dependency relationship between actors • supervisor - subordinate model • supervisor monitors and reacts to any errors reported by subordinates • configurable supervision strategy • lifecycle monitoring
  • 26. Supervision hierarchy ”root guardian” ”guardian” shutdown “system guardian” order
  • 27. Remoting • ActorPath • purely local - "akka://my-sys/user/service-a/worker1" • local or remote - "akka://[email protected]:5678 /user/service-b" • Seamlessly send messages to actors on remote nodes
  • 28. Routing • route messages to actors(routees) • ideal for load balancing • Examples • RoundRobinRouter • RandomRouter • SmallestMailboxRouter • BroadcastRouter
  • 29. Dispatchers • make akka actors tick • manages the resources(threads) used by actors • configure mailboxes of actors • Examples • fork-join-executor • thread-pool-executor
  • 30. Play • ruby on rails like agility • convention over configuration • seamless integration with akka for scalability • edit and test
  • 31. Play contd .. • an easy, out-of-the-box setup for unit and functional testing • asynchronous HTTP request handling • WebSocket support • cache support (e.g. memcached) • integrated JSON and XML handling
  • 32. Progressive Stream Processing • Iteratees • Enumerators • Enumeratees
  • 33. Q/A