SlideShare a Scribd company logo
1 of 21
Sinatra + Heroku
Comfortable ruby way for web service
Rails or not rails
 it’s a question
• Rails is a full stack, web application
  framework

• A MVC framework
• DRY - Do not repeat yourself
• Convention over configuration
Rails !"#$
    Components help you
    as well as trouble you

                             M




V                 C
Someone wants simpler
     and faster
 How can you know that, if the code is not written by yourself?



• Merb: no code is faster than no code [merge
  with rails]
• Sinatra is a simple DSL which has minimum
  code
• Some other names: camping,ramaze,waves..
Why talk about Sinatra
       today?
Cause it is simple,
popular and heroku
  developer like it
Sinatra app looks like...
                                           Choose dbms




                              ruby model


 catch
request

                  provide
                   response
Linux system     Reverse
    setup         proxy




      Say goodbye to
     environment setup
 Web server
                    scaling
configuration
Just throw it up to
      heroku
• write a config.ru file:   require "blog.rb"
                          run Sinatra::Application


• git init
• git add .
• git commit -m “whatever you want to mark”
• sudo gem install heroku
• heroku create your-app-name
• git push heroku master
Why heroku?
• Easy deploy
• A free plan for demo
• Easy scaling
• Use your domain name freely
• Customization for ruby
 • GAE is native for python and support java
How heroku performs?
A benchmarking...
 against free plan
ab -n 100 -c 10 http://msg.dazhe.me/
                  A simple blog system


 Concurrency Level:     10
 Time taken for tests: 8.738 seconds
 Complete requests:     100

 Requests per second: 11.44 [#/sec] (mean)
 Time per request:   873.761 [ms] (mean)
 Time per request:   87.376 [ms]
Some experience
   and tips
• Google Map API need a domain name
 • loc2ip.dazhe.me
• heroku create your-app-name
 • The auto-generated name with mass you
    mind in no time

• A credit card is needed for enable the
  customized domain function

  • not reasonable because it is free
• Add gems?            rspec --version 1.2.7
                       radiant --version 0.7.1

 • write a .gems file
• Use other DB servers
 • 5M space is not big enough
• References
 • docs.heroku.com
 • www.sinatrarb.com
 • Lightweight Webservices with Sinatra and
    RestClient: http://u.dazhe.me/6
Deep Blue

www.footalk.com

opencv@gmail.com

More Related Content

What's hot

Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsJeff Geerling
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Marina Peregud
 
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Attila Cs. Nagy
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemetApurva Tripathi
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of dockerPHP Indonesia
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastOSCON Byrum
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of JavascriptIrfan Maulana
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentIrfan Maulana
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentationKen Kramer
 
Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Katherine Golovinova
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteYves Goeleven
 
Harnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovyHarnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovySteve Pember
 
Intro To Serverless ClojureScript
Intro To Serverless ClojureScriptIntro To Serverless ClojureScript
Intro To Serverless ClojureScriptJim Lynch
 
React.js and Flux in details
React.js and Flux in detailsReact.js and Flux in details
React.js and Flux in detailsArtyom Trityak
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupalRonan Berder
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Managerconnectwebex
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance DrupalJeff Geerling
 

What's hot (20)

Ansible
AnsibleAnsible
Ansible
 
Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.js
 
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
Антон Бойко "Разделяй и властвуй — набор практик для построения масштабируемо...
 
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
Drupal Developer Days 2014 - Using Drupal as a 
content repository for 
onlin...
 
Website design & developemet
Website design & developemetWebsite design & developemet
Website design & developemet
 
Afrimadoni the power of docker
Afrimadoni   the power of dockerAfrimadoni   the power of docker
Afrimadoni the power of docker
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
 
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript[Blibli Brown Bag] Nodejs - The Other Side of Javascript
[Blibli Brown Bag] Nodejs - The Other Side of Javascript
 
PHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web DevelopmentPHP Indonesia - Nodejs Web Development
PHP Indonesia - Nodejs Web Development
 
Chugalug
ChugalugChugalug
Chugalug
 
Desktop server presentation
Desktop server presentationDesktop server presentation
Desktop server presentation
 
Ruby Setup
Ruby SetupRuby Setup
Ruby Setup
 
Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...Azure Functions - the evolution of microservices platform or marketing gibber...
Azure Functions - the evolution of microservices platform or marketing gibber...
 
Back to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static websiteBack to the 90s' - Revenge of the static website
Back to the 90s' - Revenge of the static website
 
Harnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with GroovyHarnessing Spark and Cassandra with Groovy
Harnessing Spark and Cassandra with Groovy
 
Intro To Serverless ClojureScript
Intro To Serverless ClojureScriptIntro To Serverless ClojureScript
Intro To Serverless ClojureScript
 
React.js and Flux in details
React.js and Flux in detailsReact.js and Flux in details
React.js and Flux in details
 
Performance and scalability with drupal
Performance and scalability with drupalPerformance and scalability with drupal
Performance and scalability with drupal
 
Building Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience ManagerBuilding Creative Product Extensions with Experience Manager
Building Creative Product Extensions with Experience Manager
 
High Performance Drupal
High Performance DrupalHigh Performance Drupal
High Performance Drupal
 

Viewers also liked

Album Fotografico Ivan Castro
Album Fotografico Ivan CastroAlbum Fotografico Ivan Castro
Album Fotografico Ivan CastroIvan Castro
 
Presentación1 [autoguardado]
Presentación1 [autoguardado]Presentación1 [autoguardado]
Presentación1 [autoguardado]1608diego
 
Presentación viaje a bretaña 2011
Presentación viaje a bretaña 2011Presentación viaje a bretaña 2011
Presentación viaje a bretaña 2011clarrangarcia
 
Coda Lunga e prodotti di Nicchia: Gruppo Capramagra
Coda Lunga e prodotti di Nicchia: Gruppo CapramagraCoda Lunga e prodotti di Nicchia: Gruppo Capramagra
Coda Lunga e prodotti di Nicchia: Gruppo CapramagraVladi Finotto
 
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...Sena Cedagro
 
Presentation of english
Presentation of english Presentation of english
Presentation of english Maykol Pineda
 
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft wordใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word0981081205
 
Educacion en valores
Educacion en valoresEducacion en valores
Educacion en valoresNuria_1990
 
Англійська мова. 4 клас. «We live in Ukraine!» (на базі підручника Доценко ...
Англійська мова. 4 клас.   «We live in Ukraine!» (на базі підручника Доценко ...Англійська мова. 4 клас.   «We live in Ukraine!» (на базі підручника Доценко ...
Англійська мова. 4 клас. «We live in Ukraine!» (на базі підручника Доценко ...Електронні книги Ранок
 
Літературне читання. 4 клас. Тарас Шевченко «І досі сниться…».
Літературне читання. 4 клас.   Тарас Шевченко «І досі сниться…».Літературне читання. 4 клас.   Тарас Шевченко «І досі сниться…».
Літературне читання. 4 клас. Тарас Шевченко «І досі сниться…».Електронні книги Ранок
 

Viewers also liked (20)

sourav cvv
sourav cvvsourav cvv
sourav cvv
 
G4w8
G4w8G4w8
G4w8
 
Album Fotografico Ivan Castro
Album Fotografico Ivan CastroAlbum Fotografico Ivan Castro
Album Fotografico Ivan Castro
 
Presentación1 [autoguardado]
Presentación1 [autoguardado]Presentación1 [autoguardado]
Presentación1 [autoguardado]
 
Presentación viaje a bretaña 2011
Presentación viaje a bretaña 2011Presentación viaje a bretaña 2011
Presentación viaje a bretaña 2011
 
Coda Lunga e prodotti di Nicchia: Gruppo Capramagra
Coda Lunga e prodotti di Nicchia: Gruppo CapramagraCoda Lunga e prodotti di Nicchia: Gruppo Capramagra
Coda Lunga e prodotti di Nicchia: Gruppo Capramagra
 
configuracion word
configuracion wordconfiguracion word
configuracion word
 
denys
denysdenys
denys
 
PEERS Network
PEERS NetworkPEERS Network
PEERS Network
 
Ruby on rails delegate
Ruby on rails delegateRuby on rails delegate
Ruby on rails delegate
 
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...
Miguel solorzano mitigación_y_análisis_de_los_riesgos_de_seguridad_presentado...
 
Presentation of english
Presentation of english Presentation of english
Presentation of english
 
Resume
ResumeResume
Resume
 
Jardín botánico1
Jardín botánico1Jardín botánico1
Jardín botánico1
 
Lamaran Pekerjaan
Lamaran PekerjaanLamaran Pekerjaan
Lamaran Pekerjaan
 
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft wordใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word
ใบงานที่ 1 ความรู้พื้นฐานเกี่ยวกับ microsoft word
 
DEW POINT
DEW POINTDEW POINT
DEW POINT
 
Educacion en valores
Educacion en valoresEducacion en valores
Educacion en valores
 
Англійська мова. 4 клас. «We live in Ukraine!» (на базі підручника Доценко ...
Англійська мова. 4 клас.   «We live in Ukraine!» (на базі підручника Доценко ...Англійська мова. 4 клас.   «We live in Ukraine!» (на базі підручника Доценко ...
Англійська мова. 4 клас. «We live in Ukraine!» (на базі підручника Доценко ...
 
Літературне читання. 4 клас. Тарас Шевченко «І досі сниться…».
Літературне читання. 4 клас.   Тарас Шевченко «І досі сниться…».Літературне читання. 4 клас.   Тарас Шевченко «І досі сниться…».
Літературне читання. 4 клас. Тарас Шевченко «І досі сниться…».
 

Similar to Sinatra and Heroku - A comfortable ruby way for web service

Beyond Heroku: Hosting Your Rails App Yourself
Beyond Heroku: Hosting Your Rails App YourselfBeyond Heroku: Hosting Your Rails App Yourself
Beyond Heroku: Hosting Your Rails App Yourselfstcarpenter
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGuillaume Laforge
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Dockervisual28
 
Use Cases of #Grails in #WebApplications
Use Cases of #Grails in #WebApplicationsUse Cases of #Grails in #WebApplications
Use Cases of #Grails in #WebApplicationsXebia IT Architects
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefMatt Ray
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebChris Canal
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?Christian Nagel
 
Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaAlexandre Morgaut
 
Node.js for .NET Developers
Node.js for .NET DevelopersNode.js for .NET Developers
Node.js for .NET DevelopersDavid Neal
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonNeotys
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework IntroNikolaus Graf
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSEugene Lazutkin
 

Similar to Sinatra and Heroku - A comfortable ruby way for web service (20)

20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Beyond Heroku: Hosting Your Rails App Yourself
Beyond Heroku: Hosting Your Rails App YourselfBeyond Heroku: Hosting Your Rails App Yourself
Beyond Heroku: Hosting Your Rails App Yourself
 
Google App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and GaelykGoogle App Engine Java, Groovy and Gaelyk
Google App Engine Java, Groovy and Gaelyk
 
Intro to Node.js
Intro to Node.jsIntro to Node.js
Intro to Node.js
 
Getting Started with Docker
Getting Started with DockerGetting Started with Docker
Getting Started with Docker
 
Use Cases of #Grails in #WebApplications
Use Cases of #Grails in #WebApplicationsUse Cases of #Grails in #WebApplications
Use Cases of #Grails in #WebApplications
 
Achieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with ChefAchieving Infrastructure Portability with Chef
Achieving Infrastructure Portability with Chef
 
Single Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.WebSingle Page Application Development with backbone.js and Simple.Web
Single Page Application Development with backbone.js and Simple.Web
 
Javascript for Wep Apps
Javascript for Wep AppsJavascript for Wep Apps
Javascript for Wep Apps
 
Remix
RemixRemix
Remix
 
Blazor - The New Silverlight?
Blazor - The New Silverlight?Blazor - The New Silverlight?
Blazor - The New Silverlight?
 
Benefits of an Open environment with Wakanda
Benefits of an Open environment with WakandaBenefits of an Open environment with Wakanda
Benefits of an Open environment with Wakanda
 
Node and Azure
Node and AzureNode and Azure
Node and Azure
 
Node.js for .NET Developers
Node.js for .NET DevelopersNode.js for .NET Developers
Node.js for .NET Developers
 
PAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark TomlinsonPAC 2019 virtual Mark Tomlinson
PAC 2019 virtual Mark Tomlinson
 
Serverless Framework Intro
Serverless Framework IntroServerless Framework Intro
Serverless Framework Intro
 
SSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJSSSJS, NoSQL, GAE and AppengineJS
SSJS, NoSQL, GAE and AppengineJS
 
Introduction to node.js
Introduction to node.jsIntroduction to node.js
Introduction to node.js
 
Microservices
MicroservicesMicroservices
Microservices
 

Recently uploaded

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

Sinatra and Heroku - A comfortable ruby way for web service

  • 1. Sinatra + Heroku Comfortable ruby way for web service
  • 2. Rails or not rails it’s a question
  • 3. • Rails is a full stack, web application framework • A MVC framework • DRY - Do not repeat yourself • Convention over configuration
  • 4. Rails !"#$ Components help you as well as trouble you M V C
  • 5. Someone wants simpler and faster How can you know that, if the code is not written by yourself? • Merb: no code is faster than no code [merge with rails] • Sinatra is a simple DSL which has minimum code • Some other names: camping,ramaze,waves..
  • 6. Why talk about Sinatra today?
  • 7. Cause it is simple, popular and heroku developer like it
  • 8. Sinatra app looks like... Choose dbms ruby model catch request provide response
  • 9. Linux system Reverse setup proxy Say goodbye to environment setup Web server scaling configuration
  • 10. Just throw it up to heroku
  • 11. • write a config.ru file: require "blog.rb" run Sinatra::Application • git init • git add . • git commit -m “whatever you want to mark” • sudo gem install heroku • heroku create your-app-name • git push heroku master
  • 13. • Easy deploy • A free plan for demo • Easy scaling • Use your domain name freely • Customization for ruby • GAE is native for python and support java
  • 16. ab -n 100 -c 10 http://msg.dazhe.me/ A simple blog system Concurrency Level: 10 Time taken for tests: 8.738 seconds Complete requests: 100 Requests per second: 11.44 [#/sec] (mean) Time per request: 873.761 [ms] (mean) Time per request: 87.376 [ms]
  • 17. Some experience and tips
  • 18. • Google Map API need a domain name • loc2ip.dazhe.me • heroku create your-app-name • The auto-generated name with mass you mind in no time • A credit card is needed for enable the customized domain function • not reasonable because it is free
  • 19. • Add gems? rspec --version 1.2.7 radiant --version 0.7.1 • write a .gems file • Use other DB servers • 5M space is not big enough
  • 20. • References • docs.heroku.com • www.sinatrarb.com • Lightweight Webservices with Sinatra and RestClient: http://u.dazhe.me/6