Request-Response Cycle of Ruby on Rails App
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Request-Response Cycle of Ruby on Rails App

  • 1,045 views
Uploaded on

This presentation describes the Request-Response cycle that a Ruby on Rails app goes through, narrowing in from a high level to a low level, and back.

This presentation describes the Request-Response cycle that a Ruby on Rails app goes through, narrowing in from a high level to a low level, and back.

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,045
On Slideshare
1,027
From Embeds
18
Number of Embeds
1

Actions

Shares
Downloads
5
Comments
0
Likes
1

Embeds 18

https://twitter.com 18

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Request-­‐Response Ruby  on  Rails   Nathalie  Steinmetz   http://github.com/natsteinmetz   http://linkedin.com/in/nathaliesteinmetz    
  • 2. User  Browser   DNS  Server   (1)  DNS  Lookup  (http://codefellows.org)   (2)  IP  Address   Web  Server  (for  example  Apache)   (3)  HTTP  Request              [URI]  (http://codefellows.org)              [method]  (GET)                          [request  header]  (user  agent,  etc.)   Application  Server     (for  example  Phusion  Passenger)   (4)  Recognized  Ruby                application  request  –                  forward  to  app  server   H I G H   L E V E L  
  • 3. Ruby  Version  Manager   Gemfile   Rails  Routes   (5)  Go  to  RVM   (6)  Check  Rails  version                  in  Gemfile   (7)  Check  routes  using  HTTP                request  URI  and  method   M I   D     L E V E L  
  • 4. L O W     L E V E L   Controller   Model   View   (9)  Go  to  Model,                  get  data  from                database   (8)  Go  to  appropriate  controller  (index)   Controller   (10)  Return  to                      controller     (11)  Compile  response  body  (HTML)  
  • 5. Application  Server     (for  example  Phusion  Passenger)   H I G H   L E V E L   Web  Server  (for  example  Apache)   User  Browser   (14)  Render  view   (12)  Send  HTTP  Response  to  app  server                    [Status  code]  (200)                    [Response  header]  (cookie,  etc.)                    [Response  body]  (HTML,  CSS,  Javascript)   (13)  Forward  HTTP  Response   Repeat  for  linked  files   (CSS,  images,  etc.)