SlideShare una empresa de Scribd logo
Merb, not rails? !
A practical introduction to a new framework.
Intro to merb
What is merb?

• MVC Framework.
• Similar to Rails.
• Lightweight, extensible, fast.
Merb Ideology

• Hacker-friendly.
• Core should be small, plugins bountiful.
• Code should be as simple as possible.
• Code should not be “magical.”
Merb is like rails


• Application structure is very similar
• Can use ActiveRecord
What does merb-core include?

• rack-based request handling
• session handling
• before / after filters
• layouts / views with erb
• routing
What does merb-core include?

• gem-based plugins
• mailers
• partials
• exceptions
• generator for controllers, and models
  (integrates with your chosen ORM).
What is elsewhere?

• an ORM (can use ActiveRecord,
  DataMapper, Sequel)
• form helpers such as form_for
  (merb_helper)
• ActiveSupport and all those little ruby
  extensions (extlib?)
What is elsewhere?
• flash (merb_has_flash and
  redirect :message)
 • redirect(quot;/posts/34quot;, :message =>
    { :notice => 'Post updated successfully!' })
• scaffolding
• caching (merb-cache)
• ajax library (merb_jquery)
DataMapper

• Thread-safe.
• Supports data stores you don’t manage.
• Optimizations in eager-loading, lazy-loading,
  etc.
What do we need
 helper functions for?

• Why not just use HTML for templating
  instead of all those helper functions?
• Why not just use JQuery for AJAX instead
  of all those AJAX helper functions?
Thread-safety

• Merb is thread-safe now.
• Rails will be thread-safe in 2.2.
• What does that mean? http://
  blog.headius.com/2008/08/qa-what-thread-
  safe-rails-means.html
Considerations
• Does your app block?
 • File uploads
 • Remote HTTP calls
   • Facebook app: 1-2s wait time?
• Do you have native threads?
 • JRuby / C ruby differences
Instances Required
                                Merb   Rails

C MRI, one core, no blocking     1      1

C MRI, one core, 80% blocking    1      5

C MRI, two cores, no blocking    2      2

C MRI, two core, 80% blocking    2      10

Jruby, one core, no blocking     1      1

Jruby, one core, 80% blocking    1      5

Jruby, two cores, no blocking    1      2

Jruby, two core, 80% blocking    1      10

Jruby, 16 cores, 80% blocking    1      80
Case study
The Project

• CMS for Faculty.
• Keeps track of courses, education,
  biography info, etc.
• Deployed to Tomcat.
Requirements

• 2500 faculty websites.
• 5 concurrent backend users.
• 500 users per day on the public facing
  pages.
Can Rails handle that?


• One process per file upload?
• RAM requirements?
Why merb?

• Thread-safe.
• Low memory footprint.
• ???
Why JRuby?


• Authentication integration using JRadius
• Java platform lowers IT stress level.
What is development
         like?
• There are no books... yet.
• The codebase is changing.
• Smaller userbase than rails.
• If you are doing anything weird, be prepared
  to corepatch!
Problems
• File upload broken in Tomcat deploy.
• Partial behavior is totally weird.
• Render syntax changed / broke export
  code.
• Activerecord-jdbc mysql quote error.
• String concurrency problem??
Other Issues


• acts_as_list had to be extracted from
  ActiveRecord files and manually included in
  init.rb.
Post-mortem
Speed Comparison

•   Test with simple merb / rails apps using ActiveRecord

•   Tests using ab -n 10000

•   Testing serially, not concurrently.

•   Tested on this MacBook Pro
C MRI Mongrel


• Merb: 170 requests / second
• Rails: 32 requests / second
JRuby Tomcat


• Merb: 69 requests / second
• Rails : 121 requests / second
JRuby Mongrel


• Merb: 104 requests / second
• Rails: 29 requests / second
JRuby Glassfish


• Merb: 106 requests / second
• Rails : 125 requests / second
What is the deal?

• JRuby thread pool, instead of thread
  instantiation?
• Default session handling?
• Overspinning threads in app server?
• Incorrect JIT compilation?
Tomcat Memory Usage

• Merb: ~30 MB for all threads
• Rails: ~60 MB+ additional memory per
  process


• (Tested on Tomcat)
Was it worth it?
• Thread-safety is a minor advantage when it
  comes to file uploads.
• Merb uses less memory.
• Merb is slower than rails.
• Merb may die on string thread-safe bug
  until JRuby / Merb team fix it.
Conclusion
Consider merb if...
• you’re writing a small tool.
• you have limited memory requirements.
• you like trying new ORMs.
• you need fast performance (and you’ve
  figured out why it runs so slow on JRuby).
• you like hacking about in frameworks.
Upcoming

• Merb 1.0 is released Oct 11-12.
• MerbCamp is in San Diego Oct 11-12.
• Merb in Action book (2009?).
Available

• I’m available for contracts again. Talk to me
  here, at 408-646-2240 or
  paulboone@mindbucket.com.
• http://www.mindbucket.com/

Más contenido relacionado

La actualidad más candente

Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco Presentation
Juan J. Merelo
 
Starting a new ruby on rails development
Starting a new ruby on rails developmentStarting a new ruby on rails development
Starting a new ruby on rails development
Nicolas Alpi
 
From java-to-ruby-book-summary
From java-to-ruby-book-summaryFrom java-to-ruby-book-summary
From java-to-ruby-book-summary
120bi
 
Merb For The Enterprise
Merb For The EnterpriseMerb For The Enterprise
Merb For The Enterprise
Matt Aimonetti
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
Brian Sam-Bodden
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
deimos
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
olegshpynov
 
pearls of Perl
pearls of Perlpearls of Perl
pearls of Perl
Valerio Balbi
 
Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)
Stefan Koopmanschap
 
Myphp-busters: symfony framework
Myphp-busters: symfony frameworkMyphp-busters: symfony framework
Myphp-busters: symfony framework
Stefan Koopmanschap
 
WebSocket For Web Rubyists
WebSocket For Web RubyistsWebSocket For Web Rubyists
WebSocket For Web Rubyists
Mu-Fan Teng
 
Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!
Abu Ashraf Masnun
 
JRuby and Google App Engine
JRuby and Google App EngineJRuby and Google App Engine
JRuby and Google App Engine
joshsmoore
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
oscon2007
 
Gearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsGearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applications
Dinh Pham
 

La actualidad más candente (15)

Dconrails Gecco Presentation
Dconrails Gecco PresentationDconrails Gecco Presentation
Dconrails Gecco Presentation
 
Starting a new ruby on rails development
Starting a new ruby on rails developmentStarting a new ruby on rails development
Starting a new ruby on rails development
 
From java-to-ruby-book-summary
From java-to-ruby-book-summaryFrom java-to-ruby-book-summary
From java-to-ruby-book-summary
 
Merb For The Enterprise
Merb For The EnterpriseMerb For The Enterprise
Merb For The Enterprise
 
Bitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRubyBitter Java, Sweeten with JRuby
Bitter Java, Sweeten with JRuby
 
Ola Bini Evolving The Java Platform
Ola Bini Evolving The Java PlatformOla Bini Evolving The Java Platform
Ola Bini Evolving The Java Platform
 
Fighting Ruby code smell
Fighting Ruby code smellFighting Ruby code smell
Fighting Ruby code smell
 
pearls of Perl
pearls of Perlpearls of Perl
pearls of Perl
 
Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)Myphp-busters: symfony framework (PHPCon.it)
Myphp-busters: symfony framework (PHPCon.it)
 
Myphp-busters: symfony framework
Myphp-busters: symfony frameworkMyphp-busters: symfony framework
Myphp-busters: symfony framework
 
WebSocket For Web Rubyists
WebSocket For Web RubyistsWebSocket For Web Rubyists
WebSocket For Web Rubyists
 
Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!Gearman, Supervisor and PHP - Job Management with Sanity!
Gearman, Supervisor and PHP - Job Management with Sanity!
 
JRuby and Google App Engine
JRuby and Google App EngineJRuby and Google App Engine
JRuby and Google App Engine
 
Ajax Tutorial
Ajax TutorialAjax Tutorial
Ajax Tutorial
 
Gearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applicationsGearman and asynchronous processing in PHP applications
Gearman and asynchronous processing in PHP applications
 

Destacado

Trabajo De InvestigacióN De Sociedad123
Trabajo De InvestigacióN De Sociedad123Trabajo De InvestigacióN De Sociedad123
Trabajo De InvestigacióN De Sociedad123
guest17b72f
 
Gracias
GraciasGracias
Gracias
x_perika_x
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro Merb
Paul Pajo
 
Hacker To Founder - Filipino Technical Co-Founders at Work
Hacker To Founder - Filipino Technical Co-Founders at WorkHacker To Founder - Filipino Technical Co-Founders at Work
Hacker To Founder - Filipino Technical Co-Founders at Work
Paul Pajo
 
Tech island2014
Tech island2014Tech island2014
Tech island2014
Paul Pajo
 
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidosCiclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
Tic Eraiken
 

Destacado (6)

Trabajo De InvestigacióN De Sociedad123
Trabajo De InvestigacióN De Sociedad123Trabajo De InvestigacióN De Sociedad123
Trabajo De InvestigacióN De Sociedad123
 
Gracias
GraciasGracias
Gracias
 
Practical Intro Merb
Practical Intro MerbPractical Intro Merb
Practical Intro Merb
 
Hacker To Founder - Filipino Technical Co-Founders at Work
Hacker To Founder - Filipino Technical Co-Founders at WorkHacker To Founder - Filipino Technical Co-Founders at Work
Hacker To Founder - Filipino Technical Co-Founders at Work
 
Tech island2014
Tech island2014Tech island2014
Tech island2014
 
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidosCiclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
Ciclo Sup. Mantenimiento de Instalaciones térmicas y de fluidos
 

Similar a Practical Intro Merb

Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUG
Matt Aimonetti
 
J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
QConLondon2008
 
re7olabini
re7olabinire7olabini
re7olabini
guest6850dd
 
Merb Presentation
Merb PresentationMerb Presentation
Merb Presentation
gueste4d7fc
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
Amit Solanki
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
deimos
 
Xen_and_Rails_deployment
Xen_and_Rails_deploymentXen_and_Rails_deployment
Xen_and_Rails_deployment
Abhishek Singh
 
Scaling the Rails
Scaling the RailsScaling the Rails
Scaling the Rails
elliando dias
 
Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of Frameworks
Rowan Hick
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
peter_marklund
 
Rails on JRuby
Rails on JRubyRails on JRuby
Rails on JRuby
Rob C
 
Flickr Architecture Presentation
Flickr Architecture PresentationFlickr Architecture Presentation
Flickr Architecture Presentation
web25
 
JRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyJRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRuby
elliando dias
 
The Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With RubyThe Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With Ruby
mattmatt
 
Merb + Nanite
Merb + NaniteMerb + Nanite
Merb + Nanite
Ezra Zygmuntowicz
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018
Charles Nutter
 
Rails hosting
Rails hostingRails hosting
Rails hosting
wonko
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUG
Tomek Borek
 
Spark Tips & Tricks
Spark Tips & TricksSpark Tips & Tricks
Spark Tips & Tricks
Jason Hubbard
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
Ross Lawley
 

Similar a Practical Intro Merb (20)

Merb presentation at ORUG
Merb presentation at ORUGMerb presentation at ORUG
Merb presentation at ORUG
 
J Ruby Power On The Jvm
J Ruby Power On The JvmJ Ruby Power On The Jvm
J Ruby Power On The Jvm
 
re7olabini
re7olabinire7olabini
re7olabini
 
Merb Presentation
Merb PresentationMerb Presentation
Merb Presentation
 
Introduction to JRuby
Introduction to JRubyIntroduction to JRuby
Introduction to JRuby
 
Ola Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The JvmOla Bini J Ruby Power On The Jvm
Ola Bini J Ruby Power On The Jvm
 
Xen_and_Rails_deployment
Xen_and_Rails_deploymentXen_and_Rails_deployment
Xen_and_Rails_deployment
 
Scaling the Rails
Scaling the RailsScaling the Rails
Scaling the Rails
 
Merb The Super Bike Of Frameworks
Merb The Super Bike Of FrameworksMerb The Super Bike Of Frameworks
Merb The Super Bike Of Frameworks
 
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory CourseRuby on Rails 101 - Presentation Slides for a Five Day Introductory Course
Ruby on Rails 101 - Presentation Slides for a Five Day Introductory Course
 
Rails on JRuby
Rails on JRubyRails on JRuby
Rails on JRuby
 
Flickr Architecture Presentation
Flickr Architecture PresentationFlickr Architecture Presentation
Flickr Architecture Presentation
 
JRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRubyJRoR Deploying Rails on JRuby
JRoR Deploying Rails on JRuby
 
The Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With RubyThe Current State of Asynchronous Processing With Ruby
The Current State of Asynchronous Processing With Ruby
 
Merb + Nanite
Merb + NaniteMerb + Nanite
Merb + Nanite
 
The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018The Year of JRuby - RubyC 2018
The Year of JRuby - RubyC 2018
 
Rails hosting
Rails hostingRails hosting
Rails hosting
 
Jvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUGJvm tuning in a rush! - Lviv JUG
Jvm tuning in a rush! - Lviv JUG
 
Spark Tips & Tricks
Spark Tips & TricksSpark Tips & Tricks
Spark Tips & Tricks
 
Rails Conf Europe 2007 Notes
Rails Conf  Europe 2007  NotesRails Conf  Europe 2007  Notes
Rails Conf Europe 2007 Notes
 

Más de Paul Pajo

Geeks On A Beach 2013: Mobile App Trends
Geeks On A Beach 2013: Mobile App TrendsGeeks On A Beach 2013: Mobile App Trends
Geeks On A Beach 2013: Mobile App Trends
Paul Pajo
 
Have Code, Will Compete
Have Code, Will CompeteHave Code, Will Compete
Have Code, Will Compete
Paul Pajo
 
My excel reviewer
My excel reviewer My excel reviewer
My excel reviewer
Paul Pajo
 
Using Twitter, Plurk, Etherpad, Pb Works
Using Twitter, Plurk, Etherpad, Pb WorksUsing Twitter, Plurk, Etherpad, Pb Works
Using Twitter, Plurk, Etherpad, Pb Works
Paul Pajo
 
Social Network-Driven Voter's Education
Social Network-Driven Voter's EducationSocial Network-Driven Voter's Education
Social Network-Driven Voter's Education
Paul Pajo
 
Presidentiable Leadeship Similiarity Survey
Presidentiable Leadeship Similiarity SurveyPresidentiable Leadeship Similiarity Survey
Presidentiable Leadeship Similiarity Survey
Paul Pajo
 
Principal Factors Analysis on IS Survey
Principal Factors Analysis on IS SurveyPrincipal Factors Analysis on IS Survey
Principal Factors Analysis on IS Survey
Paul Pajo
 
Principal Factors Analysis of IS Survey
Principal Factors Analysis of IS SurveyPrincipal Factors Analysis of IS Survey
Principal Factors Analysis of IS Survey
Paul Pajo
 
Cloud Computing Nist Paul Pajo
Cloud Computing Nist Paul PajoCloud Computing Nist Paul Pajo
Cloud Computing Nist Paul Pajo
Paul Pajo
 
I made something people want
I made something people wantI made something people want
I made something people want
Paul Pajo
 
ITETHIC Accomplisment Report 3 T 2008 2009
ITETHIC Accomplisment Report 3 T 2008 2009ITETHIC Accomplisment Report 3 T 2008 2009
ITETHIC Accomplisment Report 3 T 2008 2009
Paul Pajo
 
Will You Be The Next Social Entrepreneur Mar 27, 2009
Will You Be The Next Social Entrepreneur Mar 27, 2009Will You Be The Next Social Entrepreneur Mar 27, 2009
Will You Be The Next Social Entrepreneur Mar 27, 2009
Paul Pajo
 
Drip In Cultural Commons
Drip In Cultural CommonsDrip In Cultural Commons
Drip In Cultural Commons
Paul Pajo
 
Accomplishment Report Sysanal Itethic 1t20082009
Accomplishment Report Sysanal Itethic 1t20082009Accomplishment Report Sysanal Itethic 1t20082009
Accomplishment Report Sysanal Itethic 1t20082009
Paul Pajo
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
Paul Pajo
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
Paul Pajo
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
Paul Pajo
 
Introduction To Business Ethics
Introduction To Business EthicsIntroduction To Business Ethics
Introduction To Business Ethics
Paul Pajo
 
P I C S Ecommerce In The Region E Not What It Used To Be V2
P I C S  Ecommerce In The  Region  E  Not  What  It  Used  To  Be V2P I C S  Ecommerce In The  Region  E  Not  What  It  Used  To  Be V2
P I C S Ecommerce In The Region E Not What It Used To Be V2
Paul Pajo
 
talentsinc: Christian Arts & Media and The Cultural Mandate
talentsinc: Christian Arts & Media and The Cultural Mandatetalentsinc: Christian Arts & Media and The Cultural Mandate
talentsinc: Christian Arts & Media and The Cultural Mandate
Paul Pajo
 

Más de Paul Pajo (20)

Geeks On A Beach 2013: Mobile App Trends
Geeks On A Beach 2013: Mobile App TrendsGeeks On A Beach 2013: Mobile App Trends
Geeks On A Beach 2013: Mobile App Trends
 
Have Code, Will Compete
Have Code, Will CompeteHave Code, Will Compete
Have Code, Will Compete
 
My excel reviewer
My excel reviewer My excel reviewer
My excel reviewer
 
Using Twitter, Plurk, Etherpad, Pb Works
Using Twitter, Plurk, Etherpad, Pb WorksUsing Twitter, Plurk, Etherpad, Pb Works
Using Twitter, Plurk, Etherpad, Pb Works
 
Social Network-Driven Voter's Education
Social Network-Driven Voter's EducationSocial Network-Driven Voter's Education
Social Network-Driven Voter's Education
 
Presidentiable Leadeship Similiarity Survey
Presidentiable Leadeship Similiarity SurveyPresidentiable Leadeship Similiarity Survey
Presidentiable Leadeship Similiarity Survey
 
Principal Factors Analysis on IS Survey
Principal Factors Analysis on IS SurveyPrincipal Factors Analysis on IS Survey
Principal Factors Analysis on IS Survey
 
Principal Factors Analysis of IS Survey
Principal Factors Analysis of IS SurveyPrincipal Factors Analysis of IS Survey
Principal Factors Analysis of IS Survey
 
Cloud Computing Nist Paul Pajo
Cloud Computing Nist Paul PajoCloud Computing Nist Paul Pajo
Cloud Computing Nist Paul Pajo
 
I made something people want
I made something people wantI made something people want
I made something people want
 
ITETHIC Accomplisment Report 3 T 2008 2009
ITETHIC Accomplisment Report 3 T 2008 2009ITETHIC Accomplisment Report 3 T 2008 2009
ITETHIC Accomplisment Report 3 T 2008 2009
 
Will You Be The Next Social Entrepreneur Mar 27, 2009
Will You Be The Next Social Entrepreneur Mar 27, 2009Will You Be The Next Social Entrepreneur Mar 27, 2009
Will You Be The Next Social Entrepreneur Mar 27, 2009
 
Drip In Cultural Commons
Drip In Cultural CommonsDrip In Cultural Commons
Drip In Cultural Commons
 
Accomplishment Report Sysanal Itethic 1t20082009
Accomplishment Report Sysanal Itethic 1t20082009Accomplishment Report Sysanal Itethic 1t20082009
Accomplishment Report Sysanal Itethic 1t20082009
 
Jasig Rubyon Rails
Jasig Rubyon RailsJasig Rubyon Rails
Jasig Rubyon Rails
 
Remote Method Invocation
Remote Method InvocationRemote Method Invocation
Remote Method Invocation
 
Ruby On Rails Presentation
Ruby On Rails PresentationRuby On Rails Presentation
Ruby On Rails Presentation
 
Introduction To Business Ethics
Introduction To Business EthicsIntroduction To Business Ethics
Introduction To Business Ethics
 
P I C S Ecommerce In The Region E Not What It Used To Be V2
P I C S  Ecommerce In The  Region  E  Not  What  It  Used  To  Be V2P I C S  Ecommerce In The  Region  E  Not  What  It  Used  To  Be V2
P I C S Ecommerce In The Region E Not What It Used To Be V2
 
talentsinc: Christian Arts & Media and The Cultural Mandate
talentsinc: Christian Arts & Media and The Cultural Mandatetalentsinc: Christian Arts & Media and The Cultural Mandate
talentsinc: Christian Arts & Media and The Cultural Mandate
 

Último

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Último (20)

GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Practical Intro Merb

  • 1. Merb, not rails? ! A practical introduction to a new framework.
  • 3. What is merb? • MVC Framework. • Similar to Rails. • Lightweight, extensible, fast.
  • 4. Merb Ideology • Hacker-friendly. • Core should be small, plugins bountiful. • Code should be as simple as possible. • Code should not be “magical.”
  • 5. Merb is like rails • Application structure is very similar • Can use ActiveRecord
  • 6. What does merb-core include? • rack-based request handling • session handling • before / after filters • layouts / views with erb • routing
  • 7. What does merb-core include? • gem-based plugins • mailers • partials • exceptions • generator for controllers, and models (integrates with your chosen ORM).
  • 8. What is elsewhere? • an ORM (can use ActiveRecord, DataMapper, Sequel) • form helpers such as form_for (merb_helper) • ActiveSupport and all those little ruby extensions (extlib?)
  • 9. What is elsewhere? • flash (merb_has_flash and redirect :message) • redirect(quot;/posts/34quot;, :message => { :notice => 'Post updated successfully!' }) • scaffolding • caching (merb-cache) • ajax library (merb_jquery)
  • 10. DataMapper • Thread-safe. • Supports data stores you don’t manage. • Optimizations in eager-loading, lazy-loading, etc.
  • 11. What do we need helper functions for? • Why not just use HTML for templating instead of all those helper functions? • Why not just use JQuery for AJAX instead of all those AJAX helper functions?
  • 12. Thread-safety • Merb is thread-safe now. • Rails will be thread-safe in 2.2. • What does that mean? http:// blog.headius.com/2008/08/qa-what-thread- safe-rails-means.html
  • 13. Considerations • Does your app block? • File uploads • Remote HTTP calls • Facebook app: 1-2s wait time? • Do you have native threads? • JRuby / C ruby differences
  • 14. Instances Required Merb Rails C MRI, one core, no blocking 1 1 C MRI, one core, 80% blocking 1 5 C MRI, two cores, no blocking 2 2 C MRI, two core, 80% blocking 2 10 Jruby, one core, no blocking 1 1 Jruby, one core, 80% blocking 1 5 Jruby, two cores, no blocking 1 2 Jruby, two core, 80% blocking 1 10 Jruby, 16 cores, 80% blocking 1 80
  • 15.
  • 17. The Project • CMS for Faculty. • Keeps track of courses, education, biography info, etc. • Deployed to Tomcat.
  • 18. Requirements • 2500 faculty websites. • 5 concurrent backend users. • 500 users per day on the public facing pages.
  • 19. Can Rails handle that? • One process per file upload? • RAM requirements?
  • 20. Why merb? • Thread-safe. • Low memory footprint. • ???
  • 21. Why JRuby? • Authentication integration using JRadius • Java platform lowers IT stress level.
  • 22. What is development like? • There are no books... yet. • The codebase is changing. • Smaller userbase than rails. • If you are doing anything weird, be prepared to corepatch!
  • 23. Problems • File upload broken in Tomcat deploy. • Partial behavior is totally weird. • Render syntax changed / broke export code. • Activerecord-jdbc mysql quote error. • String concurrency problem??
  • 24. Other Issues • acts_as_list had to be extracted from ActiveRecord files and manually included in init.rb.
  • 26. Speed Comparison • Test with simple merb / rails apps using ActiveRecord • Tests using ab -n 10000 • Testing serially, not concurrently. • Tested on this MacBook Pro
  • 27. C MRI Mongrel • Merb: 170 requests / second • Rails: 32 requests / second
  • 28. JRuby Tomcat • Merb: 69 requests / second • Rails : 121 requests / second
  • 29. JRuby Mongrel • Merb: 104 requests / second • Rails: 29 requests / second
  • 30. JRuby Glassfish • Merb: 106 requests / second • Rails : 125 requests / second
  • 31. What is the deal? • JRuby thread pool, instead of thread instantiation? • Default session handling? • Overspinning threads in app server? • Incorrect JIT compilation?
  • 32. Tomcat Memory Usage • Merb: ~30 MB for all threads • Rails: ~60 MB+ additional memory per process • (Tested on Tomcat)
  • 33. Was it worth it? • Thread-safety is a minor advantage when it comes to file uploads. • Merb uses less memory. • Merb is slower than rails. • Merb may die on string thread-safe bug until JRuby / Merb team fix it.
  • 35. Consider merb if... • you’re writing a small tool. • you have limited memory requirements. • you like trying new ORMs. • you need fast performance (and you’ve figured out why it runs so slow on JRuby). • you like hacking about in frameworks.
  • 36. Upcoming • Merb 1.0 is released Oct 11-12. • MerbCamp is in San Diego Oct 11-12. • Merb in Action book (2009?).
  • 37. Available • I’m available for contracts again. Talk to me here, at 408-646-2240 or paulboone@mindbucket.com. • http://www.mindbucket.com/