You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Dirk Breuer (JIRA)" <ji...@apache.org> on 2009/04/28 16:09:30 UTC

[jira] Created: (THRIFT-468) Rack Middleware Application for Rails

Rack Middleware Application for Rails
-------------------------------------

                 Key: THRIFT-468
                 URL: https://issues.apache.org/jira/browse/THRIFT-468
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Ruby)
            Reporter: Dirk Breuer


Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.

That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Breuer updated THRIFT-468:
-------------------------------

    Attachment: rack_middleware.patch

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Breuer updated THRIFT-468:
-------------------------------

    Attachment:     (was: rack_middleware.patch)

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Breuer updated THRIFT-468:
-------------------------------

    Attachment:     (was: rack_middleware.patch)

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Dirk Breuer
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703724#action_12703724 ] 

Dirk Breuer commented on THRIFT-468:
------------------------------------

Thanks for your fast answer. Apperently those to things are not really the same. The Thrift Mongrel Support is great for using it as a standalone service without Rails. Rails itself starts a Mongrel to serve the underlying application. A Mongrel Handler as used in the Thrift Mongrel implementation is not able to act as a stackable filter. With the newly added Rack support you can easily integrate different Thrift processors into your Rails application. Which is really cool if you have already a running application and want to add RPC features to your app that are not JSON or something like REST, which is in my opinion no alternative to Thrift.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Breuer updated THRIFT-468:
-------------------------------

    Attachment: rack_middleware.patch

Patch-file containing the RackMiddleware application and specs.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Dirk Breuer
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704648#action_12704648 ] 

Michael Stockton commented on THRIFT-468:
-----------------------------------------

Dirk, I was merely highlighting that there could be other convenient classes to come in the future.  I wasn't declaring a preference for one method or another.  With other app integration methods in mind, David and Kevin may make a different decision on where to put your RackMiddleware class.




> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703992#action_12703992 ] 

Dirk Breuer commented on THRIFT-468:
------------------------------------

Michael, thanks for the feedback. Regarding your questions: Rack doesn't technically qualifies as a server. What you that is correct so far. It is just a web server interface abstraction (like CGI). So you always need a web server which implements the Rack interface (which is virtually every web server in the Ruby world), to handle the HTTP Request/Response stuff. So I think it would be wrong to inherit from Thrift::BaseServer. Maybe than it shouldn't be located in the server directory either, but I didn't know where to put it in the first place. I think it would be ok to keep it there, but maybe in subdirectory. What do you think. I agree with you when it comes to the require part. That was simply my fault - I missed that one.

I will update the patch file and remove the 'require' statement from the thrift.rb file.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704659#action_12704659 ] 

Dirk Breuer commented on THRIFT-468:
------------------------------------

Michael, sorry than I just misunderstood you. I don't mind at all where the class goes if anyone of you find a better place for it.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703707#action_12703707 ] 

Bryan Duxbury commented on THRIFT-468:
--------------------------------------

I'm not super familiar with all this stuff, but is this redundant with the pre-existing Thrift Mongrel support? 

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704637#action_12704637 ] 

Michael Stockton commented on THRIFT-468:
-----------------------------------------

Dirk, I like the idea of separating Rack from servers.  I think Bryan or Kevin may have a better idea of where to put a Rack interface, but they may also prefer to keep it in server.  I suspect an integration layer for Rack will not be the sole attempt at using thrift and rails.  For example, you could probably use RailsMetal.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bryan Duxbury updated THRIFT-468:
---------------------------------

    Component/s:     (was: Compiler (Ruby))
                 Library (Ruby)
       Priority: Minor  (was: Major)
     Issue Type: New Feature  (was: Improvement)

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704639#action_12704639 ] 

Dirk Breuer commented on THRIFT-468:
------------------------------------

Michael, regarding your comment about Rails Metal. Rails Metal is nothing more than a convenient way of having your custom Rack Application loaded at reasonable point wihtin the MiddlewareStack instance of Rails. I already thought about a solution based on Rails Metal, but using a dedicated Rack application included in the Thrift library seemed the better way to me for too reasons:

# The developer doesn't have to care about a concrete implementation of such an application and could just add it to the MiddlewareStack with some configuration
# The implementation is bundled with Thrift and you do not have to create any additional files in your Rails app for a Metal app (this would be {{app/metal/thrift_adapter.rb}}

What do you think about this? 

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Dirk Breuer (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dirk Breuer updated THRIFT-468:
-------------------------------

    Attachment: rack_middleware.patch

Patch file containing the required changes for the RackMiddleware application, including specs.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Dirk Breuer
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-468) Rack Middleware Application for Rails

Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12703763#action_12703763 ] 

Michael Stockton commented on THRIFT-468:
-----------------------------------------

Bryan, to put it another way, Rack is the gateway between your app -- whether written in rails or merb (+ others I believe) -- to its web server (apache, mongrel, thin).

Dirk, a couple of comments:  I don't know if Rack technically qualifies as a server because it requires a web server to work.  Second, if it stays as a server, can you inherit from Thrift::BaseServer and rename the class RackMiddlewareServer?  Third, I don't think we should "require 'thrift/server/rack_middleware'" in thrift.rb because Rack shouldn't be a required dependency.  Mongrel is treated the same way, too.

Pretty cool stuff.  I like the idea.

> Rack Middleware Application for Rails
> -------------------------------------
>
>                 Key: THRIFT-468
>                 URL: https://issues.apache.org/jira/browse/THRIFT-468
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Library (Ruby)
>            Reporter: Dirk Breuer
>            Priority: Minor
>         Attachments: rack_middleware.patch
>
>
> Thrift is a really great library and we decided to implement the majority of our service infrastructure for pkw.de with the help of Thrift. We already have some services up and running but are still experimenting how we can integrate it into our todays infrastructure. Since we are building and running a Ruby on Rails application and most of the stuff is still done in Ruby we needed a solution to integrate Thrift into Rails. We have some services build upon Thrift without Rails, but that became cumbersome as soon as you integrate any database connectivity. Suddenly you realize how much work is done by Rails itself for you concerning managing your environment.
> That said I had the idea to use the Rack integration of Rails 2.3 and build a custom Rack Application which intercepts all Posts to a certain URL and handle them through Thrift. I think this could be a really cool feature to integrate it into the main Thrift lib so I send you the enclosed patch.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.