SlideShare uma empresa Scribd logo
1 de 82
Scalable language;
   Scalable web
     Timothy Perrett
     ScalaDays 2012
Hello.
Hello.
Outline.
Scal•a•ble
Able to be used or produced in a range of
capabilities: it is scalable across a range of
                    systems.
Memory
 Lane.
package example.java.sucks;

import java.io.*;
import javax.servlet.http.*;
import javax.servlet.*;

public class HelloServlet extends HttpServlet {
  public void doGet (HttpServletRequest req,
                     HttpServletResponse res)
    throws ServletException, IOException
  {
    PrintWriter out = res.getWriter();
    out.println("Hello, world!");
    out.close();
  }
}
Vibrant Scala
 Ecosystem.
Scaling Down.
    Less is more.
Unfiltered.
type Intent[-A,-B] =
  PartialFunction[
    HttpRequest[A],
    ResponseFunction[B]]
object Example extends Plan {
  def intent = {
    case GET(Path("ping")) =>
         ResponseString("pong")
  }
}
HttpRequest[A]
  object Example extends Plan {
    def intent = {
      case GET(Path("ping")) =>
           ResponseString("pong")
    }
  }
HttpRequest[A]
  object Example extends Plan {
    def intent = {
      case GET(Path("ping")) =>
           ResponseString("pong")
    }
  }

     ResponseFunction[B]
Roundup
Roundup
๏ Leverage simple language
  constructs.
Roundup
๏ Leverage simple language
  constructs.
 ๏ Easy to learn.
Roundup
๏ Leverage simple language
  constructs.
 ๏ Easy to learn.
 ๏ Easy to extend.
Roundup
๏ Leverage simple language
  constructs.
 ๏ Easy to learn.
 ๏ Easy to extend.
๏ Micro-framework: less is more.
Roundup
๏ Leverage simple language
  constructs.
 ๏ Easy to learn.
 ๏ Easy to extend.
๏ Micro-framework: less is more.
๏ Used by Meetup, RTM, Novus
Scaling Performance.
  Building the next Facebook (obviously)
Spray.
(and blueeyes)
type Route =
  RequestContext => Unit
path("foobar" / JavaUUID){ uuid =>
  get {
    _.completeWith {
      // load Foo instance by uuid
    }
  }
}
path("foobar" / JavaUUID){ uuid =>
  get {
    _.completeWith {
      // load Foo instance by uuid
    }
  }
}
path("foobar" / JavaUUID){ uuid =>
  get {
    _.completeWith {
      // load Foo instance by uuid
    }
  }
}
   implicit def foo[Foo : Marshaller]
case class Foo(whatever: String)

path("foobar" / JavaUUID){ uuid =>
  put {
    content(as[Foo]){ foo =>
      ...
    }
  }
}
Actors. Everywhere.
Detached
                          worker




HTTP Request    HTTP          Detached
                               worker
               Service



                          Detached
                           worker
def receive = {
  case HttpRequest(GET, "/", _, _, _) =>
  ...
}
Roundup
Roundup
๏ Totally actor-based
Roundup
๏ Totally actor-based
๏ Crazy-fast, non-blocking HTTP
  Server
Roundup
๏ Totally actor-based
๏ Crazy-fast, non-blocking HTTP
  Server
๏ Route definitions are just CPS
Roundup
๏ Totally actor-based
๏ Crazy-fast, non-blocking HTTP
  Server
๏ Route definitions are just CPS
๏ Typeclass-based (un)marshalling
Roundup
๏ Totally actor-based
๏ Crazy-fast, non-blocking HTTP
  Server
๏ Route definitions are just CPS
๏ Typeclass-based (un)marshalling
๏ Used by: VMWare, Zeebox, eBay
Scaling Features.
  Real-time, secure applications.
Lift.
def foo =
  "type=text" #> text(name, name = _) &
  "type=submit" #> submit(println _)

<form lift="foo">
  <p><input type="text" /></p>
  <p><input type="submit" /></p>
</form>
NodeSeq => NodeSeq

def foo =
  "type=text" #> text(name, name = _) &
  "type=submit" #> submit(println _)

<form lift="foo">
  <p><input type="text" /></p>
  <p><input type="submit" /></p>
</form>
<form action="/" method="post">
  <p><input type="text" name="F04FS5G5454" /></p>
  <p><input type="submit" name="F0S324435" /></p>
</form>
NodeSeq.
(a.k.a XSS-safe templates)
Unparsed("<strong>ABC</
       strong>")
Roundup
Roundup
๏ Secure by default
Roundup
๏ Secure by default
 ๏ Prevents common CSRF vulnerabilities
Roundup
๏ Secure by default
 ๏ Prevents common CSRF vulnerabilities
 ๏ XSS impossible without developer input
Roundup
๏ Secure by default
 ๏ Prevents common CSRF vulnerabilities
 ๏ XSS impossible without developer input
๏ Advocates server-controlled state
Roundup
๏ Secure by default
 ๏ Prevents common CSRF vulnerabilities
 ๏ XSS impossible without developer input
๏ Advocates server-controlled state
๏ Used by: 4sq, Stackmob, OpenStudy
What’s the
bottom line?
No.
Such.
Thing.
EOF
      @timperrett
github.com/timperrett
    timperrett.com

Mais conteúdo relacionado

Mais procurados

JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...
JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...
JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...PROIDEA
 
Async queue-transaction
Async queue-transaction Async queue-transaction
Async queue-transaction Fei (James) Liu
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parserfukamachi
 
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir MeetupCachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir MeetupAbel Muíño
 
轉轉轉好運旺來一起來之雲端轉檔大作戰!
轉轉轉好運旺來一起來之雲端轉檔大作戰!轉轉轉好運旺來一起來之雲端轉檔大作戰!
轉轉轉好運旺來一起來之雲端轉檔大作戰!進錕 林進錕
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freakskarupanerura
 
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2Sylvain Zimmer
 
Hello elixir (and otp)
Hello elixir (and otp)Hello elixir (and otp)
Hello elixir (and otp)Abel Muíño
 
Kotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platformsKotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platformsKirill Rozov
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra Sencha
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraHiroshi SHIBATA
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JSCakra Danu Sedayu
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTokuhiro Matsuno
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP PerspectiveBarry Jones
 
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryBuilding a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 

Mais procurados (20)

JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...
JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...
JDD 2016 - Andrej Mihály - How To Bake Reactive Behavior Into Your Java Ee Ap...
 
Async queue-transaction
Async queue-transaction Async queue-transaction
Async queue-transaction
 
Writing a fast HTTP parser
Writing a fast HTTP parserWriting a fast HTTP parser
Writing a fast HTTP parser
 
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir MeetupCachopo - Scalable Stateful Services - Madrid Elixir Meetup
Cachopo - Scalable Stateful Services - Madrid Elixir Meetup
 
轉轉轉好運旺來一起來之雲端轉檔大作戰!
轉轉轉好運旺來一起來之雲端轉檔大作戰!轉轉轉好運旺來一起來之雲端轉檔大作戰!
轉轉轉好運旺來一起來之雲端轉檔大作戰!
 
Optimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaksOptimize perl5 code for perfomance freaks
Optimize perl5 code for perfomance freaks
 
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2
Why and how Pricing Assistant migrated from Celery to RQ - Paris.py #2
 
Hello elixir (and otp)
Hello elixir (and otp)Hello elixir (and otp)
Hello elixir (and otp)
 
Kotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platformsKotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platforms
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
 
Leave end-to-end testing to Capybara
Leave end-to-end testing to CapybaraLeave end-to-end testing to Capybara
Leave end-to-end testing to Capybara
 
Java 8 concurrency abstractions
Java 8 concurrency abstractionsJava 8 concurrency abstractions
Java 8 concurrency abstractions
 
Perl6 meets JVM
Perl6 meets JVMPerl6 meets JVM
Perl6 meets JVM
 
Build RESTful API Using Express JS
Build RESTful API Using Express JSBuild RESTful API Using Express JS
Build RESTful API Using Express JS
 
2021laravelconftwslides6
2021laravelconftwslides62021laravelconftwslides6
2021laravelconftwslides6
 
Test::Kantan - Perl and Testing
Test::Kantan - Perl and TestingTest::Kantan - Perl and Testing
Test::Kantan - Perl and Testing
 
Rack
RackRack
Rack
 
Go from a PHP Perspective
Go from a PHP PerspectiveGo from a PHP Perspective
Go from a PHP Perspective
 
Plack at YAPC::NA 2010
Plack at YAPC::NA 2010Plack at YAPC::NA 2010
Plack at YAPC::NA 2010
 
Building a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQueryBuilding a desktop app with HTTP::Engine, SQLite and jQuery
Building a desktop app with HTTP::Engine, SQLite and jQuery
 

Destaque

Building Enigma with State Monad & Lens
Building Enigma with State Monad & LensBuilding Enigma with State Monad & Lens
Building Enigma with State Monad & LensTimothy Perrett
 
Functional Programming at Verizon
Functional Programming at VerizonFunctional Programming at Verizon
Functional Programming at VerizonTimothy Perrett
 
Enterprise Algebras, Scala World 2016
Enterprise Algebras, Scala World 2016Enterprise Algebras, Scala World 2016
Enterprise Algebras, Scala World 2016Timothy Perrett
 
Large-scale Infrastructure Automation at Verizon
Large-scale Infrastructure Automation at VerizonLarge-scale Infrastructure Automation at Verizon
Large-scale Infrastructure Automation at VerizonTimothy Perrett
 

Destaque (6)

Building Enigma with State Monad & Lens
Building Enigma with State Monad & LensBuilding Enigma with State Monad & Lens
Building Enigma with State Monad & Lens
 
Scala Helix
Scala HelixScala Helix
Scala Helix
 
Functional Programming at Verizon
Functional Programming at VerizonFunctional Programming at Verizon
Functional Programming at Verizon
 
BRUG - Hello, Scala
BRUG - Hello, ScalaBRUG - Hello, Scala
BRUG - Hello, Scala
 
Enterprise Algebras, Scala World 2016
Enterprise Algebras, Scala World 2016Enterprise Algebras, Scala World 2016
Enterprise Algebras, Scala World 2016
 
Large-scale Infrastructure Automation at Verizon
Large-scale Infrastructure Automation at VerizonLarge-scale Infrastructure Automation at Verizon
Large-scale Infrastructure Automation at Verizon
 

Semelhante a Scalalable Language for a Scalable Web

Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareAlona Mekhovova
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
 
Great Developers Steal
Great Developers StealGreat Developers Steal
Great Developers StealBen Scofield
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server Masahiro Nagano
 
Express Presentation
Express PresentationExpress Presentation
Express Presentationaaronheckmann
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)James Titcumb
 
TPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxTPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxJirat Kijlerdpornpailoj
 
Spring into rails
Spring into railsSpring into rails
Spring into railsHiro Asari
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)James Titcumb
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jerseyb_kathir
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Frameworkjfarcand
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHPKing Foo
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)xSawyer
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)James Titcumb
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortalJennifer Bourey
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesciklum_ods
 

Semelhante a Scalalable Language for a Scalable Web (20)

Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Great Developers Steal
Great Developers StealGreat Developers Steal
Great Developers Steal
 
How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server How to build a High Performance PSGI/Plack Server
How to build a High Performance PSGI/Plack Server
 
Express Presentation
Express PresentationExpress Presentation
Express Presentation
 
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP UK 2017)
 
TPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and FluxTPSE Thailand 2015 - Rethinking Web with React and Flux
TPSE Thailand 2015 - Rethinking Web with React and Flux
 
Spring into rails
Spring into railsSpring into rails
Spring into rails
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
Kicking off with Zend Expressive and Doctrine ORM (Sunshine PHP 2017)
 
Developing RESTful WebServices using Jersey
Developing RESTful WebServices using JerseyDeveloping RESTful WebServices using Jersey
Developing RESTful WebServices using Jersey
 
The Atmosphere Framework
The Atmosphere FrameworkThe Atmosphere Framework
The Atmosphere Framework
 
JS everywhere 2011
JS everywhere 2011JS everywhere 2011
JS everywhere 2011
 
Implementing Comet using PHP
Implementing Comet using PHPImplementing Comet using PHP
Implementing Comet using PHP
 
Sprockets
SprocketsSprockets
Sprockets
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
 
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
Kicking off with Zend Expressive and Doctrine ORM (PHP Srbija 2017)
 
Rich Portlet Development in uPortal
Rich Portlet Development in uPortalRich Portlet Development in uPortal
Rich Portlet Development in uPortal
 
Rapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devicesRapid java backend and api development for mobile devices
Rapid java backend and api development for mobile devices
 

Mais de Timothy Perrett

Nelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldNelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldTimothy Perrett
 
Online Experimentation with Immutable Infrastructure
Online Experimentation with Immutable InfrastructureOnline Experimentation with Immutable Infrastructure
Online Experimentation with Immutable InfrastructureTimothy Perrett
 
Javazone 2011: Goal Directed Web Applications
Javazone 2011: Goal Directed Web ApplicationsJavazone 2011: Goal Directed Web Applications
Javazone 2011: Goal Directed Web ApplicationsTimothy Perrett
 
Concurrency and Parallelism with Scala
Concurrency and Parallelism with ScalaConcurrency and Parallelism with Scala
Concurrency and Parallelism with ScalaTimothy Perrett
 
Scaladays 2011: Task Driven Scala Web Applications
Scaladays 2011: Task Driven Scala Web ApplicationsScaladays 2011: Task Driven Scala Web Applications
Scaladays 2011: Task Driven Scala Web ApplicationsTimothy Perrett
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicTimothy Perrett
 
Devoxx 2009: The Lift Framework
Devoxx 2009: The Lift FrameworkDevoxx 2009: The Lift Framework
Devoxx 2009: The Lift FrameworkTimothy Perrett
 

Mais de Timothy Perrett (8)

Nelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional WorldNelson: Rigorous Deployment for a Functional World
Nelson: Rigorous Deployment for a Functional World
 
Online Experimentation with Immutable Infrastructure
Online Experimentation with Immutable InfrastructureOnline Experimentation with Immutable Infrastructure
Online Experimentation with Immutable Infrastructure
 
Javazone 2011: Goal Directed Web Applications
Javazone 2011: Goal Directed Web ApplicationsJavazone 2011: Goal Directed Web Applications
Javazone 2011: Goal Directed Web Applications
 
Concurrency and Parallelism with Scala
Concurrency and Parallelism with ScalaConcurrency and Parallelism with Scala
Concurrency and Parallelism with Scala
 
Scaladays 2011: Task Driven Scala Web Applications
Scaladays 2011: Task Driven Scala Web ApplicationsScaladays 2011: Task Driven Scala Web Applications
Scaladays 2011: Task Driven Scala Web Applications
 
Bathcamp 2010-riak
Bathcamp 2010-riakBathcamp 2010-riak
Bathcamp 2010-riak
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
Devoxx 2009: The Lift Framework
Devoxx 2009: The Lift FrameworkDevoxx 2009: The Lift Framework
Devoxx 2009: The Lift Framework
 

Último

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

Scalalable Language for a Scalable Web

Notas do Editor

  1. Good afternoon everyone, and welcome to this talk: scalable language; scalable web. My name is Timothy Perrett, and i&amp;#x2019;ve been kicking around in the Scala community since about the end of 2007; essentially before we had a reasonable collections library, akka, lift as we know it today, or any of the other awesome Scala projects that make up out lovely community. \n\nI like to make things though, and i&amp;#x2019;ve been involved in a wide range of projects, from web toolkits, to build systems to a myriad of other things. With that being said, I have a big interest in web programming, and its something I care a great deal about: most of the commercial projects I work on these days are web applications or services. \n
  2. I&amp;#x2019;m also the author of Lift in Action, the most complete guide to Lift available today; so if you have an interest in learning Lift, by all means pick up a copy.\n
  3. So today I&amp;#x2019;m going to be talking to you about how approaches to web programming have changed over the years, and how the features present in both the scala language and the within our community have influenced &amp;#x201C;solutions&amp;#x201D; to the problem of HTTP application programming.\n\nAs this talk is titled &amp;#x201C;scalable language; scalable web&amp;#x201D; I first what to reconsider the meaning of the word &amp;#x201C;scalable&amp;#x201D;.\n
  4. Scalability has very much become a buzzword in the business community, and we are often bombarded with blanket marketing that implies scalability is directly centred around performance concerns, and performance alone. \n\nWhilst it may be true that online sites and applications are growing faster than ever before, and indeed, at the end of 2011 there were some 555,000,000 sites online. Of that huge number though, only a very small portion are the Facebooks, Googles and twitters of this world. This is something we must consider when discussing scalability. \n\nAs you can see on the slide here, the dictionary defines scalability to mean &amp;#x201C;Able to be used or produced in a range of capabilities: it is scalable across a range of systems&amp;#x201D;. Not once does that sentence mention performance or &amp;#x201C;big data&amp;#x201D; or anything else suitably buzzword like. Ergo, we can consider this idea of scalability as being multi-faceted, having multiple applicable axis. In this talk I&amp;#x2019;ll be covering what could be three possible axis of scalability:\n- scaling down: something that is small, lightweight and has minimal overhead.\n- scaling up, or scaling performance: pretty much what the business folks take it as meaning; building the next facebook. obviously. \n- scaling features: scaling an idea; taking a single concept and applying it to everything you do. \n
  5. So before we get onto all that good stuff, I would just like to take you on a trip down memory lane... the year is 1995, and whilst Bill Gates was busy launching his &amp;#x201C;revolutionary&amp;#x201D; new operating system Windows 95, James Gosling was busy inventing servlets. \n\nServlets did remain useful after &amp;#x2019;95 though, unlike Windows unfortunately for Mr Gates.\n\n----- ERATA \n\nServlets were later formalised by Pawani Diwanji as part of JavaSofts Jeeves project in 1996[1]\n\n[1] http://www.mtvjug.org/Oct23.html\n
  6. Raise your hands if you recognise this code, or something similar to this, or if you&amp;#x2019;re still maintaing or writing something like this today...\n\nThis style of HTTP programming is 17 years old. When we look at nearly everything else we use today, &amp;#x201C;old&amp;#x201D; constitutes 6 months, or perhaps even a year. On that scale 17 years old is practically neolithic! This stuff is dinosaur technology.\n\n\n\n\n\n
  7. Whilst researching this talk I can across this great quote from a 1996 mountain view JUG agenda, which detailed the &amp;#x201C;Jeeves&amp;#x201D; project which the servlet API was originally a part of. The agenda states: &amp;#x201C;Jeeves defines the Java Servlet APIs for the quick and easy creation, installation, administration and security of Java-based network servers.&amp;#x201D;\n\nThat sounds awesomely whizzbang!... and at the time it really was. Now though, we know we can do better: its not 1995 or 96 anymore; things in our industry have changed, but, fundamentally web programming hasn&amp;#x2019;t changed on the JVM since its inception. Ok, things have been added, augmented and hastily bolted on, but at its core it hasn&amp;#x2019;t really changed.\n
  8. This strikes me as diametrically opposed to views on HTTP programming within the wider industry: things have changed irreparably in the past two years or so with the advent of HTML5. Browsers are now capable of delivering better, more seamless user experiences and interacting with richer server-side backends than ever before: event sources and web sockets being just two such examples.\n\nWith the pace of change being what it is, the unfortunate reality is that the servlet specification cannot keep up; the point in case there being the time it took servlet 3.0 to reach release status. \n
  9. Consider for a moment our vibrant Scala eco-system; its thankfully quite different to the Java eco-system, and its full of very smart folks who&amp;#x2019;ve approached the problem of HTTP programming in a range of different, and innovative ways. These toolkits are numerous:\n- scalatra\n- play\n- lift\n- unfiltered\n- slinky\n- and many more\n\nGetting back to this idea of scalability, the first on my axis of possible interpretations of scalability was scaling down with lightweight toolkits.\n
  10. I once recall hearing a software industry anecdote that said that by increasing application complexity by 25% would boost the development effort by 200%. This is most fascinating, as one has to consider what happens when situation is reversed: remove 25% of the complexity, and slash the development effort and cost of that project. \n\nOf course, this can&amp;#x2019;t work for every conceivable application, but as per the introduction, many, many applications will never need to scale to anything more than a single instance. \n
  11. Unfiltered is a lightweight, stateless HTTP abstraction that can sit atop many different types of backend server, from our old friend the servlet API, to newer platforms like Netty. In any case, Unfiltered&amp;#x2019;s API is exceedingly lightweight and solely based around two Scala language concepts: function composition and pattern matching.\n
  12. Intents are just partial functions\n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. 1. ergo simple learning curve\n\n
  19. 1. ergo simple learning curve\n\n
  20. 1. ergo simple learning curve\n\n
  21. 1. ergo simple learning curve\n\n
  22. 1. ergo simple learning curve\n\n
  23. \n
  24. introduction to spray with a quick mention of its blueeyes lineage \n\ninsanely fast: 65k req/s which is slightly faster than netty \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. Architecturally speaking, Spray is entirely built on actors: HTTP Requests are just immutable messages.\n
  33. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  34. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  35. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  36. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  37. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  38. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  39. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  40. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  41. This a gross over-simplification of how spray works, but you can visualise HTTP requests as incoming messages to the HTTP Service actor, which in turn spawns a new worker actor with a request context continuation to execute and respond to continue the request processing. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. talk about lifts security features\n\nImplements its own session storage so the session is fully type-safe\n
  49. introduction to lift \n\nstateful web\n\nOne of the oldest scala projects around\n\n\n
  50. \n
  51. \n
  52. \n
  53. Prevents CSRF\n
  54. Prevents CSRF\n
  55. Templates are validated XML, not a bunch of strings that are simply munged together. The result is that anytime you want to pass unescaped content you have to be very explicit about it, the toolkit forces the developer to understand why he/she is doing that.\n\nThis massively helps in preventing XSS vulnerable code getting into production by accident. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. In this talk i&amp;#x2019;ve demonstrated three distinct ways in which Scala has had an impact on the design of web toolkits within our eco-system. Whilst its fairly easy to see that each tool is distinctly different from its fellow projects, there is a degree of commonality throughout, and that&amp;#x2019;s composition. \n\nFrom core APIs, to higher level routing DSLs and templating: the upshot of highly compassable systems is more modularity, code that is easier to maintain, and far simpler to reason about. \n\nGone are the days of monolithic Spring or JEE systems! HTTP toolkits in Scala let you achieve things that are either not easily doable with servlets, or require a dependency chain as long as your arm to make it happen.\n\n\n
  65. With all that good stuff being said, its important to understand that there are no panaceas, no silver bullets. \n\nThe real take away from this presentation is that most of the HTTP toolkits differ considerably from one another. Each has its own strengths and weaknesses, and its more important than ever to understand your own use case and make the right tooling choice to solve your problem. \n\n\n
  66. With all that good stuff being said, its important to understand that there are no panaceas, no silver bullets. \n\nThe real take away from this presentation is that most of the HTTP toolkits differ considerably from one another. Each has its own strengths and weaknesses, and its more important than ever to understand your own use case and make the right tooling choice to solve your problem. \n\n\n
  67. With that, thank you very much for listening. If anyone has any questions I&amp;#x2019;d be happy to answer them. \n
  68. With that, thank you very much for listening. If anyone has any questions I&amp;#x2019;d be happy to answer them. \n