I’ve been playing around with Orbited, APE and the like, but they all have lots of code and kind of reinvent the wheels in some ways (reimplementing an HTTP server, daemon, etc). So just for fun, I’ve hacked a simple AJAX push server (aka Comet) on top of Thin using the new Async Response feature. To be honest, after revisiting Orbited a couple times, it’s pretty cool! It’s easily extensible, base
■ [ruby] Rackミドルウェアのコンテスト、優勝者が決定 Rackミドルウェアのコンテスト「CodeRack」の結果発表があったようです。 http://coderack.org/ では、上位3位の発表です! 3位:RackProctitle Rubyプロセスのタイトルに、処理中のURLや処理時間を入れることで、時間がかかっているプロセスをpsで見つけやすくする。 2位:Rack::Superlogger Rackレベルでログを取る。いろいろなフレームワークを使い分けているときに、全部同じログ形式になるので、解析しやすい。 1位:Rack::GeoIPCountry アクセス元のIPから国名を推測し、env['X_GEOIP_COUNTRY'] に入れてくれる。 特別賞(?) : RedisRequestLimiter Redis(KVS)を使って、短時間に大量にアクセスしてくるユ
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. Rackamole (GitHub repo) is a Rack application that lets you to monitor the interactions between users and your own Rack-based application (e.g. any Rails or Sinatra app). As well as pumping out information to the console or a log file, there's a Web interface called Wackamole to give you the skinny on your app activity. Ra
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message require 'rack' class FooRack def call(env) content='' while true #something check the connection puts '.' sleep 1 end [200,{"Content-Type"=>"text/html"},content] end end Rack::Handler::Mongrel.run(FooRack.new,:Port=>3003) When client disconnect, but the script sti
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. Have you ever yearned for something like Rails's script/console or Merb's merb -i in your other Rack based apps? If so, then Marcin Kulik's racksh, inspired by Heroku's console, might be for you. Racksh is a console for Rack based ruby web applications. It allows you run a console in the context of an application environme
前回、前々回の記事では、Rackの生まれた背景、Rackとは何か、実際にRackアプリケーションを作る際に使えるものをご紹介しましたが、もう一つまだ説明していない重要な要素がRackにはあります。今回は、そのミドルウェアという仕組みについてご紹介します。 ミドルウェアとは ミドルウェアとは何かを一言で言うと、「別なアプリケーションをラップして、リクエストやレスポンスを加工したり、処理を切り換えたりするRackアプリケーション」です。 この仕組みがあることで一体何ができるのでしょうか。Webアプリケーションを作っていると、リクエストやレスポンスをアプリケーションに行く前やアプリケーションの処理の後に加工したくなることはよくあります。例えば、条件に応じてURLの書き換えをしたり、エンコーディングの変換をしたり、Cookieの処理をしたり…といったことが日常茶飯事です。こういう処理を、サーバと
どうやらUnicornというのが良いらしいという噂を聞きつけたので、どんなもんじゃろと試してみることにした。 Route 477 - 大規模Railsサイトのための新しいHTTPサーバ、Unicorn Unicornてのは何者なのかと言うと、Rack及びRailsに対応したRubyのWebアプリ用のHTTPサーバ。詳しくは上の記事を読んで下さい。githubでも使ってるそうだ。あと、名前が格好良い(あんまり関係ない)。 まずはunicornの設定 と言っても、gem install unicornしてconfig.ruがあるディレクトリでunicornコマンドを叩けば、thinとかと同じようにサーバが起動する。rackup互換のオプションも付いてるので特に悩むこともないと思う。あとは普通にApacheとかでプロキシの設定してやるなりなんなりすればすぐ使える。 それだけだと大して面白くないの
前回の記事では、Rackとは何かについてを、Rackが生まれた背景を交えてご紹介しました。今回は、Rackを実際に使ってみるにはどうすればいいのかを実際に作りながら解説します。 rackupとRack::Builder 前回の記事の最後で、アプリケーションの他にconfig.ruというファイルを用意し、rackupといういうコマンドを使ってアプリケーションを起動しましたが、これについてもう少し詳しく説明したいと思います。 実は、単にRackアプリケーションを起動するためだけであれば、config.ru(rackupファイルと呼びます。拡張子のruはおそらくrackupの略でしょう)は必要ありません。Rackの入門記事等で目にしたことのある方もいるかもしれませんが、以下のようなコードをファイルの末尾に書き加えるとsimple_app.rb単体でアプリケーションを起動することができます。 if
■ [ruby] Tab Sweep http://github.com/defunkt/mustache ロジックを含まないテンプレートエンジン。 というのは他にもいろいろあるけど、Rails界ではいまいち流行らんよね。 erbでロジックを「含めない」ことはできるからかも。 http://github.com/defunkt/lyndon Pure RubyのJavaScriptインタプリタ、jhonsonのMacRuby版。 どうやらWebKitのJSインタプリタを呼び出しているらしい。なのでMacRuby専用。その代わり、速度面や互換性はばっちりだと思われる。 ■ [ruby] Rackミドルウェアのコンテストが開催中 (参加賞あり) Rails, Sinatra, Merb, RamazeといったRuby用Webフレームワークで共通して使われているライブラリ「Rack」の、ミドルウ
Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news. If you've worked with Web apps using Ruby, you might know of Rack, an interface that sits between Ruby applications and HTTP-speaking Web servers. All of the major Ruby frameworks and server setups use it now, including Rails. Middleware (in Rack) is code that manipulates data going back and forth between your Ruby apps an
少し前のエントリで、GAE/JRuby上でRackアプリを動かす手順を書きました。 Google App Engine上でRubyアプリを動かす手順 - しばそんノート このときの手順は、Java SDKをインストールして、GAE SDKをダウンロードして、jruby-complete.jarをコンパイルして…と、やや煩雑なものでした。この当時はおそらくこれが一般的な手法だったのではないかと思います。 しかし、今や時代は変わりました。今GAE/JRubyでRackアプリを作るのに必要な作業は、たったひとつのgemのインストールだけです。 GettingStarted - appengine-jruby - Getting Started with JRuby on Google App Engine - Project Hosting on Google Code 有志によってGAE/JR
../ 2024-06-27 23:40 - Unicorn/ 2023-10-03 17:15 - examples/ 2023-10-03 17:15 - files/ 2023-12-30 01:23 - public/ 2021-03-12 20:34 - Application_Timeouts 2023-10-03 17:15 3K Application_Timeouts.html 2023-10-03 17:15 6K CONTRIBUTORS 2023-10-03 17:15 1K CONTRIBUTORS.html 2023-10-03 17:15 5K COPYING 2023-10-03 17:15 34K ChangeLog 2020-04-22 02:00 42 ChangeLog.html 2020-04-22 02:00 230 DESIGN 2023-10
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く