Sinatra and Heroku - A comfortable ruby way for web service

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Sinatra and Heroku - A comfortable ruby way for web service - Presentation Transcript

    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
    12. Why heroku?
    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
    14. How heroku performs?
    15. A benchmarking... against free plan
    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
    21. Deep Blue www.footalk.com opencv@gmail.com

    + ztieeeztieee, 2 months ago

    custom

    408 views, 1 favs, 1 embeds more stats

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 408
      • 359 on SlideShare
      • 49 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 14
    Most viewed embeds
    • 49 views on http://www.footalk.com

    more

    All embeds
    • 49 views on http://www.footalk.com

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories