SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
Better than X
Happstack: The framework
formerly known as HAppS

   Presented February 10th, 2009
 Thomas Hartman and Matthew Elder
  4760 Boelter Hall, UCLA campus
A brief history of HAppS
                                                                    • Big Bang 2005
                                                                    • Alex Jacobson
                                                                      markets aggressively
                                                                    • Interest starts to wane
                                                                      in 2007




* For more information see http://www.reddit.com/r/haskell/comments/7ug41/mathew_elder_joins_patchtagcom_as_a_partner_the/c07frjk
A Lonely 2008 for HAppS
            • Few commits
            • Low mailing list traffic
            • Hard to get help on
              IRC
            • Happstutorial
              released
Happstack Announced
• In 2009 Matthew Elder decides to rebrand
  HAppS as “Happstack”
• It turns out a lot of people want to work on
  HAppS
• Matthew Elder joins Patch-Tag as a
  partner
It works!
How does it work?
• Happstack has a builtin HTTP Server
• Templating system agnostic (common
  choices are HSP and HStringTemplate)
• State is serialized to disk for durability (like
  MySQL)
• Entire state is kept in ram for maximum
  performance (no memcached needed)*


 * This was inspired by Prevayler For more information see http://www.prevayler.org
Why bother
     When we have:
     • Rails
     • Django
     • Zope
     • Catalyst
     • (…)?
Haskell is better than Ruby
           The Ruby claim to fame? terse and beautiful code

quicksort in Ruby
def quicksort(list)
  return list if list.size <= 1
  pivot = list.pop
  left, right = list.partition { |e| e < pivot }
  quicksort(left) + [pivot] + quicksort(right)
end


quicksort in Haskell
qsort [] = []
qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs)




                        Haskell Wins.
Happstack is better than Rails
              Model
Rails                    Happstack


Object-Relational        No ORM needed, Native
Impedance Mismatch       datatypes via MACID
Error-prone database     Typesafe migration
migration strategy       strategy via MACID

Database queries scale   In-memory map lookups
pretty good              scale awesomely
Happstack is better than Rails
               View
Rails                  Happstack


ERB allows mixing      HStringTemplate
presentation and       enforces separation of
business logic         Controller / View
ERB does not prevent   HSP guarantees well-
malformed xml output   formed XML
Happstack is better than Rails
            Controller
Rails                   Happstack


Scaffolding creates a   Composable Server
huge mess of            Parts keep things simple
unmaintainable code
Routing logic is        Routing logic is
unnecessarily magic     straightforward
Haskell is better than Ruby/Rails
              BUT . . .
Ruby programmers have jobs!
Clicks Per Day:
• Ruby: 1613
• Haskell: 69
• HAppS: Not enough data to give estimates
• Source: Google Adwords Estimator


              Ruby Wins.
Haskell programmers need jobs!
               • Some Day . . .
               • Soon . . .
               • Haskell Devs will be
                 paid for developing
                 webapps in Haskell
               • Instead of doing
                 ruby/java/.net by day
                 and Haskell by night
Rails Envy? Not us!
Clicks Per Day:
• Ruby: 1613
• Haskell: 69
• HAppS: Not enough data to give estimates
• PHP: 8672

 The real nemesis of Happstack is PHP.
The End?
• Happstack may not really be better than
  everything, but we try.
• Patch-Tag and happstutorial are proof that
  Happstack is usable today.
• Visit the website: happstack.com
• Join us on #happs on irc.freenode.net
• OR http://groups.google.com/group/HAppS

Mais conteúdo relacionado

Mais procurados

What does it take to make google work at scale
What does it take to make google work at scale What does it take to make google work at scale
What does it take to make google work at scale
君 廖
 
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBaseHBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
Michael Stack
 

Mais procurados (13)

Architectural Evolution Starting from Hadoop
Architectural Evolution Starting from HadoopArchitectural Evolution Starting from Hadoop
Architectural Evolution Starting from Hadoop
 
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
Teradata Partners Conference Oct 2014   Big Data Anti-PatternsTeradata Partners Conference Oct 2014   Big Data Anti-Patterns
Teradata Partners Conference Oct 2014 Big Data Anti-Patterns
 
What does it take to make google work at scale
What does it take to make google work at scale What does it take to make google work at scale
What does it take to make google work at scale
 
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
HBaseCon 2012 | Gap Inc Direct: Serving Apparel Catalog from HBase for Live W...
 
Scaling HBase for Big Data
Scaling HBase for Big DataScaling HBase for Big Data
Scaling HBase for Big Data
 
HBase at Bloomberg: High Availability Needs for the Financial Industry
HBase at Bloomberg: High Availability Needs for the Financial IndustryHBase at Bloomberg: High Availability Needs for the Financial Industry
HBase at Bloomberg: High Availability Needs for the Financial Industry
 
HBase: Just the Basics
HBase: Just the BasicsHBase: Just the Basics
HBase: Just the Basics
 
Apache HBase - Just the Basics
Apache HBase - Just the BasicsApache HBase - Just the Basics
Apache HBase - Just the Basics
 
Nextag talk
Nextag talkNextag talk
Nextag talk
 
Efficient processing of large and complex XML documents in Hadoop
Efficient processing of large and complex XML documents in HadoopEfficient processing of large and complex XML documents in Hadoop
Efficient processing of large and complex XML documents in Hadoop
 
Hadoop breizhjug
Hadoop breizhjugHadoop breizhjug
Hadoop breizhjug
 
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBaseHBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
HBaseConAsia2018: Track2-5: JanusGraph-Distributed graph database with HBase
 
Batch is Back: Critical for Agile Application Adoption
Batch is Back: Critical for Agile Application AdoptionBatch is Back: Critical for Agile Application Adoption
Batch is Back: Critical for Agile Application Adoption
 

Semelhante a Better Than X

10 concepts the enterprise decision maker needs to understand about Hadoop
10 concepts the enterprise decision maker needs to understand about Hadoop10 concepts the enterprise decision maker needs to understand about Hadoop
10 concepts the enterprise decision maker needs to understand about Hadoop
Donald Miner
 
Design for Scalability in ADAM
Design for Scalability in ADAMDesign for Scalability in ADAM
Design for Scalability in ADAM
fnothaft
 
Hw09 Practical HBase Getting The Most From Your H Base Install
Hw09   Practical HBase  Getting The Most From Your H Base InstallHw09   Practical HBase  Getting The Most From Your H Base Install
Hw09 Practical HBase Getting The Most From Your H Base Install
Cloudera, Inc.
 
Facebook Hadoop Data & Applications
Facebook Hadoop Data & ApplicationsFacebook Hadoop Data & Applications
Facebook Hadoop Data & Applications
dzhou
 
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdfOpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
OpenStack Foundation
 

Semelhante a Better Than X (20)

Fast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPPFast & Scalable Front/Back-ends using Ruby, Rails & XMPP
Fast & Scalable Front/Back-ends using Ruby, Rails & XMPP
 
Joys & frustrations of putting 34,000 lines of Haskell into production (at Va...
Joys & frustrations of putting 34,000 lines of Haskell into production (at Va...Joys & frustrations of putting 34,000 lines of Haskell into production (at Va...
Joys & frustrations of putting 34,000 lines of Haskell into production (at Va...
 
10 concepts the enterprise decision maker needs to understand about Hadoop
10 concepts the enterprise decision maker needs to understand about Hadoop10 concepts the enterprise decision maker needs to understand about Hadoop
10 concepts the enterprise decision maker needs to understand about Hadoop
 
Mashups with Drupal and QueryPath
Mashups with Drupal and QueryPathMashups with Drupal and QueryPath
Mashups with Drupal and QueryPath
 
Spark_Part 1
Spark_Part 1Spark_Part 1
Spark_Part 1
 
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
Apache Giraph: start analyzing graph relationships in your bigdata in 45 minu...
 
Design for Scalability in ADAM
Design for Scalability in ADAMDesign for Scalability in ADAM
Design for Scalability in ADAM
 
Hw09 Practical HBase Getting The Most From Your H Base Install
Hw09   Practical HBase  Getting The Most From Your H Base InstallHw09   Practical HBase  Getting The Most From Your H Base Install
Hw09 Practical HBase Getting The Most From Your H Base Install
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
Is Spark Replacing Hadoop
Is Spark Replacing HadoopIs Spark Replacing Hadoop
Is Spark Replacing Hadoop
 
Spark!
Spark!Spark!
Spark!
 
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
 ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in... ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
ABRIDGED VERSION - Joys & frustrations of putting 34,000 lines of Haskell in...
 
Architecting the Future of Big Data & Search - Eric Baldeschwieler
Architecting the Future of Big Data & Search - Eric BaldeschwielerArchitecting the Future of Big Data & Search - Eric Baldeschwieler
Architecting the Future of Big Data & Search - Eric Baldeschwieler
 
Dchug m7-30 apr2013
Dchug m7-30 apr2013Dchug m7-30 apr2013
Dchug m7-30 apr2013
 
Keynote: The Future of Apache HBase
Keynote: The Future of Apache HBaseKeynote: The Future of Apache HBase
Keynote: The Future of Apache HBase
 
Bentobox exercise
Bentobox exerciseBentobox exercise
Bentobox exercise
 
Facebook Hadoop Data & Applications
Facebook Hadoop Data & ApplicationsFacebook Hadoop Data & Applications
Facebook Hadoop Data & Applications
 
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdfOpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
OpenStack-Design-Summit-HA-Pairs-Are-Not-The-Only-Answer copy.pdf
 
OpenStack Summit :: Redundancy Doesn't Always Mean "HA" or "Cluster"
OpenStack Summit :: Redundancy Doesn't Always Mean "HA" or "Cluster"OpenStack Summit :: Redundancy Doesn't Always Mean "HA" or "Cluster"
OpenStack Summit :: Redundancy Doesn't Always Mean "HA" or "Cluster"
 
Cascading Map-Side Joins over HBase for Scalable Join Processing
Cascading Map-Side Joins over HBase for Scalable Join ProcessingCascading Map-Side Joins over HBase for Scalable Join Processing
Cascading Map-Side Joins over HBase for Scalable Join Processing
 

Último

+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...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Ú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...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
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...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
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
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
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, ...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Better Than X

  • 1. Better than X Happstack: The framework formerly known as HAppS Presented February 10th, 2009 Thomas Hartman and Matthew Elder 4760 Boelter Hall, UCLA campus
  • 2. A brief history of HAppS • Big Bang 2005 • Alex Jacobson markets aggressively • Interest starts to wane in 2007 * For more information see http://www.reddit.com/r/haskell/comments/7ug41/mathew_elder_joins_patchtagcom_as_a_partner_the/c07frjk
  • 3. A Lonely 2008 for HAppS • Few commits • Low mailing list traffic • Hard to get help on IRC • Happstutorial released
  • 4. Happstack Announced • In 2009 Matthew Elder decides to rebrand HAppS as “Happstack” • It turns out a lot of people want to work on HAppS • Matthew Elder joins Patch-Tag as a partner
  • 6. How does it work? • Happstack has a builtin HTTP Server • Templating system agnostic (common choices are HSP and HStringTemplate) • State is serialized to disk for durability (like MySQL) • Entire state is kept in ram for maximum performance (no memcached needed)* * This was inspired by Prevayler For more information see http://www.prevayler.org
  • 7. Why bother When we have: • Rails • Django • Zope • Catalyst • (…)?
  • 8. Haskell is better than Ruby The Ruby claim to fame? terse and beautiful code quicksort in Ruby def quicksort(list) return list if list.size <= 1 pivot = list.pop left, right = list.partition { |e| e < pivot } quicksort(left) + [pivot] + quicksort(right) end quicksort in Haskell qsort [] = [] qsort (x:xs) = qsort (filter (< x) xs) ++ [x] ++ qsort (filter (>= x) xs) Haskell Wins.
  • 9. Happstack is better than Rails Model Rails Happstack Object-Relational No ORM needed, Native Impedance Mismatch datatypes via MACID Error-prone database Typesafe migration migration strategy strategy via MACID Database queries scale In-memory map lookups pretty good scale awesomely
  • 10. Happstack is better than Rails View Rails Happstack ERB allows mixing HStringTemplate presentation and enforces separation of business logic Controller / View ERB does not prevent HSP guarantees well- malformed xml output formed XML
  • 11. Happstack is better than Rails Controller Rails Happstack Scaffolding creates a Composable Server huge mess of Parts keep things simple unmaintainable code Routing logic is Routing logic is unnecessarily magic straightforward
  • 12. Haskell is better than Ruby/Rails BUT . . . Ruby programmers have jobs! Clicks Per Day: • Ruby: 1613 • Haskell: 69 • HAppS: Not enough data to give estimates • Source: Google Adwords Estimator Ruby Wins.
  • 13. Haskell programmers need jobs! • Some Day . . . • Soon . . . • Haskell Devs will be paid for developing webapps in Haskell • Instead of doing ruby/java/.net by day and Haskell by night
  • 14. Rails Envy? Not us! Clicks Per Day: • Ruby: 1613 • Haskell: 69 • HAppS: Not enough data to give estimates • PHP: 8672 The real nemesis of Happstack is PHP.
  • 15. The End? • Happstack may not really be better than everything, but we try. • Patch-Tag and happstutorial are proof that Happstack is usable today. • Visit the website: happstack.com • Join us on #happs on irc.freenode.net • OR http://groups.google.com/group/HAppS