Poking rails middleware with a stick

35 views
Skip to first unread message

artt...@gmail.com

unread,
Jul 9, 2014, 6:25:21 PM7/9/14
to laruby...@googlegroups.com
Cruising the googles and found an article that mentioned a way to see what middleware your rails app has loaded.
The article mentions that  'rack middleware are implemented in a russian dolls structure.'
It is sounding like it might make for an interesting visualization.

http://pothibo.com/2013/11/ruby-on-rails-inside-actiondispatch-and-rack/
 
In your apps root directory run 'rake middleware'


 

Cynthia Kiser

unread,
Jul 9, 2014, 7:53:14 PM7/9/14
to laruby...@googlegroups.com
Quoting artt...@gmail.com <artt...@gmail.com>:
> Cruising the googles and found an article that mentioned a way to see what
> middleware your rails app has loaded.
> The article mentions that 'rack middleware are implemented in a russian
> dolls structure.'
> It is sounding like it might make for an interesting visualization.
>
> http://pothibo.com/2013/11/ruby-on-rails-inside-actiondispatch-and-rack/

That does look interesting. Will you be joining us tonight to make a
start on the visualization?

--
Cynthia N. Kiser
c...@ugcs.caltech.edu

Cynthia Kiser

unread,
Jul 10, 2014, 12:37:24 AM7/10/14
to laruby...@googlegroups.com
Hey all, great to see everyone this evening. Anna walked us through
the project planning deck / design document she created for our
project to visualize the calls made in a Rack middleware
stack. Eventually we would like to be able to watch a running rack
application (like Rails or Sinatra). But for the first step we are
going to experiment with diagramming the Rack middleware layer of a
Rails application.

We discussed a number of tools during the meeting. So before next
week's meeting, let's all try to spend some time looking into them -
or finding similar, even better tools for the following facets of the
problem:

Listing the middlewares:
- Something using or like the existing 'rake middleware' task

Diagramming:
- Basic UML squence diagram?
- Plantuml http://plantuml.sourceforge.net/sequence.html
- js-sequence-diagrams http://bramp.github.io/js-sequence-diagrams/
- Other ways of visualizing flow
- Anna's subway map example (esp use of color coding)
- flamegraph - http://samsaffron.com/archive/2013/03/19/flame-graphs-in-ruby-miniprofiler
- Something using d3 https://github.com/mbostock/d3/wiki/Gallery

Monitoring / Profiling tools:
- ruby-prof filtering on rack layer https://github.com/ruby-prof/ruby-prof
- rack-timer http://dec0de.me/2014/03/rack-timer/
- rack_timer https://github.com/lukeludwig/rack_timer
- Rack::Profiler https://github.com/rack/rack-contrib
- rack-mini-profiler https://github.com/MiniProfiler/rack-mini-profiler
Reply all
Reply to author
Forward
0 new messages