From kato.kiwamu @ future.co.jp Wed Jun 13 08:10:10 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Wed, 13 Jun 2007 21:10:10 +0900 Subject: [ap4r-devel-ja] test Message-ID: <14CE73B79D552644B7CBEF0428763DF6027BF0C7@045MAIL.future.co.jp> テスト From kato.kiwamu @ future.co.jp Wed Jun 13 08:17:02 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Wed, 13 Jun 2007 21:17:02 +0900 Subject: [ap4r-devel-ja] test Message-ID: <14CE73B79D552644B7CBEF0428763DF6027BF0CA@045MAIL.future.co.jp> てすと From shinohara.shunichi @ future.co.jp Sun Jun 24 20:33:36 2007 From: shinohara.shunichi @ future.co.jp (shinohara.shunichi @ future.co.jp) Date: Mon, 25 Jun 2007 09:33:36 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. Message-ID: <14CE73B79D552644B7CBEF0428763DF602957FD7@045MAIL.future.co.jp> しのはらです # 日本語側で (^-^ ) hoe 対応ありがとうございます。 気になった点 - Manifest.txt が面倒そう、ワイルドカードで指定したいところ # もしくは、Manifest.txt をタスクで生成するか? - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします しの -----Original Message----- From: ap4r-devel-bounces @ rubyforge.org [mailto:ap4r-devel-bounces @ rubyforge.org] On Behalf Of kato-k @ rubyforge.org Sent: Friday, June 22, 2007 7:13 PM To: ap4r-devel @ rubyforge.org Subject: [ap4r-devel] [243] trunk/ap4r: Modified Rakefile with hoe. Revision: 243 Author: kato-k Date: 2007-06-22 06:13:03 -0400 (Fri, 22 Jun 2007) Log Message: ----------- Modified Rakefile with hoe. Modified Paths: -------------- trunk/ap4r/Rakefile Added Paths: ----------- trunk/ap4r/History.txt trunk/ap4r/Manifest.txt trunk/ap4r/README.txt Removed Paths: ------------- trunk/ap4r/CHANGELOG trunk/ap4r/README Deleted: trunk/ap4r/CHANGELOG =================================================================== --- trunk/ap4r/CHANGELOG 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/CHANGELOG 2007-06-22 10:13:03 UTC (rev 243) @@ -1,40 +0,0 @@ -== 0.3.x - -=== 0.3.2 (June 7th, 2007) -* Fixed: util/loc.rb doesn't work. -* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. -* Added: Dynamic configuration with ERb. -* Added: Script to run AP4R on Mongrel. -* Changed: How to plugin and main API names have changed. -* Added: Support of several Content-type on asynchronous call. -* Added: Block style for async_to. -* Added: Url rewrite filter. - -=== 0.3.1 (April 24th, 2007) - -* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. -* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. -* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. - -=== 0.3.0 (April 6th, 2007) - -* Changed: name space from "AP4R" to "Ap4r". -* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . - -== 0.2.x - -=== 0.2.0 (October 17th, 2006) - -* Added: Protocols to invoke asynchronous logics. -* Added: At-lease-once QoS. - -== 0.1.x - -=== 0.1.1 (October 5th, 2006) - -* Changed: Enriched RDoc. -* Changed: Enriched README. - -=== 0.1.0 (September 1st, 2006) - -* Initial release. Added: trunk/ap4r/History.txt =================================================================== --- trunk/ap4r/History.txt (rev 0) +++ trunk/ap4r/History.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,43 @@ +== 0.3.x + +=== 0.3.3 (June ?, 2007) +* Added: support with hoe. + +=== 0.3.2 (June 7th, 2007) +* Fixed: util/loc.rb doesn't work. +* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. +* Added: Dynamic configuration with ERb. +* Added: Script to run AP4R on Mongrel. +* Changed: How to plugin and main API names have changed. +* Added: Support of several Content-type on asynchronous call. +* Added: Block style for async_to. +* Added: Url rewrite filter. + +=== 0.3.1 (April 24th, 2007) + +* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. +* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. +* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. + +=== 0.3.0 (April 6th, 2007) + +* Changed: name space from "AP4R" to "Ap4r". +* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . + +== 0.2.x + +=== 0.2.0 (October 17th, 2006) + +* Added: Protocols to invoke asynchronous logics. +* Added: At-lease-once QoS. + +== 0.1.x + +=== 0.1.1 (October 5th, 2006) + +* Changed: Enriched RDoc. +* Changed: Enriched README. + +=== 0.1.0 (September 1st, 2006) + +* Initial release. Added: trunk/ap4r/Manifest.txt =================================================================== --- trunk/ap4r/Manifest.txt (rev 0) +++ trunk/ap4r/Manifest.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,38 @@ +History.txt +MIT-LICENSE +Rakefile +README.txt +bin/ap4r_setup +config/ap4r_settings.rb +config/log4r.yaml +config/queues.cfg +config/queues_disk.cfg +config/queues_mysql.cfg +lib/ap4r.rb +lib/ap4r/carrier.rb +lib/ap4r/dispatcher.rb +lib/ap4r/message_store_ext.rb +lib/ap4r/mongrel.rb +lib/ap4r/mongrel_ap4r.rb +lib/ap4r/multi_queue.rb +lib/ap4r/queue_manager_ext.rb +lib/ap4r/queue_manager_ext_debug.rb +lib/ap4r/retention_history.rb +lib/ap4r/script/base.rb +lib/ap4r/script/queue_manager_control.rb +lib/ap4r/script/setup.rb +lib/ap4r/script/workspace_generator.rb +lib/ap4r/start_with_log4r.rb +lib/ap4r/store_and_forward.rb +lib/ap4r/stored_message.rb +lib/ap4r/util/irm.rb +lib/ap4r/util/queue_client.rb +lib/ap4r/version.rb +script/irm +script/loop.cmd +script/loop.rb +script/mongrel_ap4r +script/start +script/stop +spec/local/dispatcher_base_spec.rb +spec/spec_helper.rb Deleted: trunk/ap4r/README =================================================================== --- trunk/ap4r/README 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/README 2007-06-22 10:13:03 UTC (rev 243) @@ -1,55 +0,0 @@ -== What is AP4R? - -AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. -Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. -Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. - -For more information, please step in AP4R homepage! - -http://ap4r.rubyforge.org/wiki/wiki.pl - -== Features - -1. Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. -1. Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. -1. Load balancing over multiple AP4R processes on single/multiple servers is supported. -1. Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. -1. Using store and forward function, at-least-omce QoS level is provided. - -== Typical process flow - -1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). -1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. -1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). -1. Once the synchronous logic is done, the clients receives a response immediately. -1. AP4R queues the message, and requests it to the web server asynchronously. -1. An asynchronous logic, implemented as usual rails action, is executed. - - -== Installation - -Use RubyGems command. - - $ sudo gem install ap4r --include-dependencies - -== References - -* Ruby Homepage - * http://www.ruby-lang.org/ -* Ruby on Rails tutorial - * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html -* MySQL tutorial - * http://dev.mysql.com/doc/refman/5.0/en/index.html -* reliable-msg - * http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging - -== Licence - -This licence is licensed under the MIT license. -Copyright(c) 2007 Future Architect Inc. - -== Authors - -* Kiwamu Kato -* Shunichi Shinohara - Added: trunk/ap4r/README.txt =================================================================== --- trunk/ap4r/README.txt (rev 0) +++ trunk/ap4r/README.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,82 @@ +Ap4r +* by Kiwamu Kato, Shun'ichi Shinohara +* http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage +* ap4r-user @ rubyforge.org + +== DESCRIPTION: + +AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. +Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. +Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. + +For more information, please step in AP4R homepage! + + +== FEATURES/PROBLEMS: + +* Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. +* Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. +* Load balancing over multiple AP4R processes on single/multiple servers is supported. +* Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. +* Using store and forward function, at-least-omce QoS level is provided. + +== TYPICAL PROCESS FLOW: + +1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). +1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. +1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). +1. Once the synchronous logic is done, the clients receives a response immediately. +1. AP4R queues the message, and requests it to the web server asynchronously. +1. An asynchronous logic, implemented as usual rails action, is executed. + + +== SYNOPSIS: + +* FIX (code sample of usage) + +== REQUIREMENTS: + +* FIX (list of requirements) + +== INSTALL: + +Use RubyGems command. + + $ sudo gem install ap4r --include-dependencies + + +== REFERENCES: + +* Ruby Homepage + * http://www.ruby-lang.org/ +* Ruby on Rails tutorial + * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html +* MySQL tutorial + * http://dev.mysql.com/doc/refman/5.0/en/index.html +* reliable-msg + * http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging + + +== LICENSE: + +* This licence is licensed under the MIT license. +* Copyright(c) 2007 Future Architect Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Modified: trunk/ap4r/Rakefile =================================================================== --- trunk/ap4r/Rakefile 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/Rakefile 2007-06-22 10:13:03 UTC (rev 243) @@ -1,102 +1,70 @@ -# Author:: Kiwamu Kato -# Copyright:: Copyright (c) 2007 Future Architect Inc. -# Licence:: MIT Licence - -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' -require 'rake/gempackagetask' -require 'rake/contrib/rubyforgepublisher' - -require 'date' -require 'find' -require 'rbconfig' - +require 'rubygems' +require 'hoe' require File.join(File.dirname(__FILE__), 'lib/ap4r', 'version') -PKG_VERSION = Ap4r::VERSION::STRING +HelloWorld = '../samples/HelloWorld' -TEMP_DIR = './temp' -PKG_DIR = './pkg' -RELEASE_DIR = './release' -HELLO_WORLD_DIR = '../samples/HelloWorld' +# AP4R release tasks -------------------------------------------------------- -# Generate GEM ---------------------------------------------------------------------------- +# copy rails plugin from sample before gem build +FileUtils.mkdir_p('./rails_plugin/ap4r/lib') +FileUtils.cp(HelloWorld + '/db/migrate/001_create_table_for_saf.rb', './lib/ap4r/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/async_helper.rb', './rails_plugin/ap4r/lib/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/message_builder.rb', './rails_plugin/ap4r/lib/') - -PKG_FILES = FileList[ - '[a-zA-Z]*', - 'bin/**/*', - 'config/**/*', - 'rails_plugin/**/*', - 'script/**/*', - 'lib/**/*' -] - -HELLO_WORLD_SAMPLE_FILES = FileList[ - '[a-zA-Z]*', - 'app/**/*', - 'components/**/*', - 'config/**/*', - 'db/**/*', - 'doc/**/*', - 'lib/**/*', - 'log/**/*', - 'public/**/*', - 'script/**/*', - 'test/**/*', - 'tmp/**/*', - 'vendor/**/*', -] - - -spec = Gem::Specification.new do |s| - s.name = 'ap4r' - s.version = PKG_VERSION - s.summary = "Asynchronous Processing for Ruby." - s.description = <<-EOF +Hoe.new('ap4r', Ap4r::VERSION::STRING) do |p| + p.author = ["Shunichi Shinohara", "Kiwamu Kato"] + p.changes = p.paragraphs_of('History.txt', 1..2).join("\n\n") + #p.clean_globs = + p.description = <<-EOF Asynchronous Processing for Ruby. EOF + p.email = %q{shinohara.shunichi @ future.co.jp, kato.kiwamu @ future.co.jp} - s.add_dependency(%q, ["= 1.1.0"]) - s.add_dependency(%q) - s.add_dependency(%q) - s.add_dependency(%q) + p.extra_deps << ['reliable-msg', '=1.1.0'] + p.extra_deps << ['activesupport'] + p.extra_deps << ['mongrel'] + p.extra_deps << ['rake'] + p.extra_deps << ['hoe'] - s.has_rdoc = true - s.extra_rdoc_files = ["README", "CHANGELOG", 'rails_plugin'] - s.rdoc_options << "--main" << "README" - s.rdoc_options << "--title" << "Asynchronous Processing for Ruby" - s.rdoc_options << "--line-numbers" + p.name = 'ap4r' + p.need_tar = false + p.need_zip = false + #p.rdoc_pattern = + #p.remote_rdoc_dir = + #p.rsync = + p.rubyforge_name = 'ap4r' + #p.spec_extra = + p.summary = 'Asynchronous Processing for Ruby.' + p.test_globs = 'spec/**/*_spec.rb' + p.url = 'http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage' + p.version = Ap4r::VERSION::STRING +end - s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')} - s.require_path = 'lib' - s.autorequire = %q{ap4r.rb} +# Sample release tasks ------------------------------------------------------ +desc 'Make samle tarball (Now only HelloWorld sample).' +task :sample do + FileUtils.mkdir_p('./pkg/samples') + FileUtils.rm_rf('./pkg/samples/HelloWorld') + + FileUtils.cp_r(HelloWorld, './pkg/samples/') + Find.find('./pkg/samples') do |path| + next unless File.file? path + FileUtils.rm_rf(path) if path =~ /\.svn|tmp$|CVS|.rb\~/ + end - s.bindir = "bin" # Use these for applications. - s.executables = ["ap4r_setup"] - s.default_executable = "ap4r_setup" - - s.authors = ["Shunichi Shinohara", "Kiwamu Kato"] - s.email = %q{shinohara.shunichi @ future.co.jp, kato.kiwamu @ future.co.jp} - s.homepage = %q{http://rubyforge.org/projects/ap4r/} - s.rubyforge_project = "ap4r" + Dir.chdir('./pkg/samples/HelloWorld') + `rake db:migrate` + Dir.chdir('../../') + + `tar czvf HelloWorld-#{Ap4r::VERSION::STRING}.tar.gz ./samples/HelloWorld/` + Dir.chdir('../') end -Rake::GemPackageTask.new(spec) do |pkg| -end -# Generate documentation ------------------------------------------------------------------ - -Rake::RDocTask.new { |rdoc| - rdoc.rdoc_dir = 'doc' - rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=rw' - rdoc.rdoc_files.include('README', 'CHANGELOG') - rdoc.rdoc_files.include('lib/**/*.rb') - rdoc.rdoc_files.include('rails_plugin/**/*.rb') -} - # Spec tasks ---------------------------------------------------------------- require 'spec/rake/spectask' @@ -123,71 +91,7 @@ end end -# AP4R release ---------------------------------------------------------------- -desc "Make gem" -task :gem_release => [ :make_release_dir, :copy_to_ap4r_from_sample, :gem] - -task :copy_to_ap4r_from_sample do - FileUtils.cp(HELLO_WORLD_DIR + '/db/migrate/001_create_table_for_saf.rb', './lib/ap4r/xxx_create_table_for_saf.rb') - - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/init.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/async_helper.rb', './rails_plugin/ap4r/lib/async_helper.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/ap4r_client.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/message_builder.rb', './rails_plugin/ap4r/lib/message_builder.rb') -end - -desc "Make sample tgz" -task :sample_release => [ :make_release_dir, :make_sample_tgz, :copy_to_release_dir ] - -task :make_sample_tgz => [ :make_temp_dir, :copy_sample, :execute_migration, :make_tgz ] - -task :make_release_dir do - make_dir RELEASE_DIR -end - -task :make_temp_dir do - make_dir TEMP_DIR -end - -def make_dir(path) - if(File.exist?(path)) - FileUtils.remove_entry(path, true) - end - FileUtils.mkdir_p(path) -end - - -task :copy_sample do - FileUtils.cp_r(HELLO_WORLD_DIR, TEMP_DIR) - Find.find(TEMP_DIR) {|f| - if f.include?('.svn') - FileUtils.rm_rf(f) - end - } -end - -task :execute_migration do - Dir.chdir('temp/HelloWorld') - `rake db:migrate` - Dir.chdir('../../') -end - -task :make_tgz do - Dir.chdir('temp/') - `tar czvf HelloWorld.tar.gz HelloWorld/` - Dir.chdir('../') -end - -task :copy_to_release_dir do - Dir.foreach(PKG_DIR) {|f| - FileUtils.cp(PKG_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.gem", f) - } - Dir.foreach(TEMP_DIR) {|f| - FileUtils.cp(TEMP_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.tar.gz", f) - } -end - # AP4R misc tools ---------------------------------------------------------------- desc "display code statistics" _______________________________________________ ap4r-devel mailing list ap4r-devel @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel From kato.kiwamu @ future.co.jp Sun Jun 24 21:06:17 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Mon, 25 Jun 2007 10:06:17 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602957FD7@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> 加藤です。 > - Manifest.txt が面倒そう、ワイルドカードで指定したいところ > # もしくは、Manifest.txt をタスクで生成するか? 自分もメンテがしんどそうだなと思ってたとこです。 確認してみたら、Manifest.txt で指定した内容は、 Gem::Specification#files に渡してるだけなのでワイルドカード指定も OK ですね。 RubyGems GemSpec Reference | RubyGems Manuals http://rubygems.org/read/chapter/20#files > - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします ここもちょっと迷ったとこです。 (^^; これまでリリースタイミングは一緒だったのでコマンド一発で両方まとめてリリースしようかとも 思いましたが、今後の拡張を考えると ap4r と分離しといたほうがよいかもしれないですね。 -----Original Message----- From: ap4r-devel-ja-bounces @ rubyforge.org [mailto:ap4r-devel-ja-bounces @ rubyforge.org] On Behalf Of shinohara.shunichi @ future.co.jp Sent: Monday, June 25, 2007 9:34 AM To: ap4r-devel-ja @ rubyforge.org Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. しのはらです # 日本語側で (^-^ ) hoe 対応ありがとうございます。 気になった点 - Manifest.txt が面倒そう、ワイルドカードで指定したいところ # もしくは、Manifest.txt をタスクで生成するか? - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします しの -----Original Message----- From: ap4r-devel-bounces @ rubyforge.org [mailto:ap4r-devel-bounces @ rubyforge.org] On Behalf Of kato-k @ rubyforge.org Sent: Friday, June 22, 2007 7:13 PM To: ap4r-devel @ rubyforge.org Subject: [ap4r-devel] [243] trunk/ap4r: Modified Rakefile with hoe. Revision: 243 Author: kato-k Date: 2007-06-22 06:13:03 -0400 (Fri, 22 Jun 2007) Log Message: ----------- Modified Rakefile with hoe. Modified Paths: -------------- trunk/ap4r/Rakefile Added Paths: ----------- trunk/ap4r/History.txt trunk/ap4r/Manifest.txt trunk/ap4r/README.txt Removed Paths: ------------- trunk/ap4r/CHANGELOG trunk/ap4r/README Deleted: trunk/ap4r/CHANGELOG =================================================================== --- trunk/ap4r/CHANGELOG 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/CHANGELOG 2007-06-22 10:13:03 UTC (rev 243) @@ -1,40 +0,0 @@ -== 0.3.x - -=== 0.3.2 (June 7th, 2007) -* Fixed: util/loc.rb doesn't work. -* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. -* Added: Dynamic configuration with ERb. -* Added: Script to run AP4R on Mongrel. -* Changed: How to plugin and main API names have changed. -* Added: Support of several Content-type on asynchronous call. -* Added: Block style for async_to. -* Added: Url rewrite filter. - -=== 0.3.1 (April 24th, 2007) - -* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. -* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. -* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. - -=== 0.3.0 (April 6th, 2007) - -* Changed: name space from "AP4R" to "Ap4r". -* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . - -== 0.2.x - -=== 0.2.0 (October 17th, 2006) - -* Added: Protocols to invoke asynchronous logics. -* Added: At-lease-once QoS. - -== 0.1.x - -=== 0.1.1 (October 5th, 2006) - -* Changed: Enriched RDoc. -* Changed: Enriched README. - -=== 0.1.0 (September 1st, 2006) - -* Initial release. Added: trunk/ap4r/History.txt =================================================================== --- trunk/ap4r/History.txt (rev 0) +++ trunk/ap4r/History.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,43 @@ +== 0.3.x + +=== 0.3.3 (June ?, 2007) +* Added: support with hoe. + +=== 0.3.2 (June 7th, 2007) +* Fixed: util/loc.rb doesn't work. +* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. +* Added: Dynamic configuration with ERb. +* Added: Script to run AP4R on Mongrel. +* Changed: How to plugin and main API names have changed. +* Added: Support of several Content-type on asynchronous call. +* Added: Block style for async_to. +* Added: Url rewrite filter. + +=== 0.3.1 (April 24th, 2007) + +* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. +* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. +* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. + +=== 0.3.0 (April 6th, 2007) + +* Changed: name space from "AP4R" to "Ap4r". +* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . + +== 0.2.x + +=== 0.2.0 (October 17th, 2006) + +* Added: Protocols to invoke asynchronous logics. +* Added: At-lease-once QoS. + +== 0.1.x + +=== 0.1.1 (October 5th, 2006) + +* Changed: Enriched RDoc. +* Changed: Enriched README. + +=== 0.1.0 (September 1st, 2006) + +* Initial release. Added: trunk/ap4r/Manifest.txt =================================================================== --- trunk/ap4r/Manifest.txt (rev 0) +++ trunk/ap4r/Manifest.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,38 @@ +History.txt +MIT-LICENSE +Rakefile +README.txt +bin/ap4r_setup +config/ap4r_settings.rb +config/log4r.yaml +config/queues.cfg +config/queues_disk.cfg +config/queues_mysql.cfg +lib/ap4r.rb +lib/ap4r/carrier.rb +lib/ap4r/dispatcher.rb +lib/ap4r/message_store_ext.rb +lib/ap4r/mongrel.rb +lib/ap4r/mongrel_ap4r.rb +lib/ap4r/multi_queue.rb +lib/ap4r/queue_manager_ext.rb +lib/ap4r/queue_manager_ext_debug.rb +lib/ap4r/retention_history.rb +lib/ap4r/script/base.rb +lib/ap4r/script/queue_manager_control.rb +lib/ap4r/script/setup.rb +lib/ap4r/script/workspace_generator.rb +lib/ap4r/start_with_log4r.rb +lib/ap4r/store_and_forward.rb +lib/ap4r/stored_message.rb +lib/ap4r/util/irm.rb +lib/ap4r/util/queue_client.rb +lib/ap4r/version.rb +script/irm +script/loop.cmd +script/loop.rb +script/mongrel_ap4r +script/start +script/stop +spec/local/dispatcher_base_spec.rb +spec/spec_helper.rb Deleted: trunk/ap4r/README =================================================================== --- trunk/ap4r/README 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/README 2007-06-22 10:13:03 UTC (rev 243) @@ -1,55 +0,0 @@ -== What is AP4R? - -AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. -Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. -Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. - -For more information, please step in AP4R homepage! - -http://ap4r.rubyforge.org/wiki/wiki.pl - -== Features - -1. Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. -1. Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. -1. Load balancing over multiple AP4R processes on single/multiple servers is supported. -1. Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. -1. Using store and forward function, at-least-omce QoS level is provided. - -== Typical process flow - -1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). -1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. -1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). -1. Once the synchronous logic is done, the clients receives a response immediately. -1. AP4R queues the message, and requests it to the web server asynchronously. -1. An asynchronous logic, implemented as usual rails action, is executed. - - -== Installation - -Use RubyGems command. - - $ sudo gem install ap4r --include-dependencies - -== References - -* Ruby Homepage - * http://www.ruby-lang.org/ -* Ruby on Rails tutorial - * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html -* MySQL tutorial - * http://dev.mysql.com/doc/refman/5.0/en/index.html -* reliable-msg - * http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging - -== Licence - -This licence is licensed under the MIT license. -Copyright(c) 2007 Future Architect Inc. - -== Authors - -* Kiwamu Kato -* Shunichi Shinohara - Added: trunk/ap4r/README.txt =================================================================== --- trunk/ap4r/README.txt (rev 0) +++ trunk/ap4r/README.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,82 @@ +Ap4r +* by Kiwamu Kato, Shun'ichi Shinohara +* http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage +* ap4r-user @ rubyforge.org + +== DESCRIPTION: + +AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. +Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. +Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. + +For more information, please step in AP4R homepage! + + +== FEATURES/PROBLEMS: + +* Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. +* Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. +* Load balancing over multiple AP4R processes on single/multiple servers is supported. +* Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. +* Using store and forward function, at-least-omce QoS level is provided. + +== TYPICAL PROCESS FLOW: + +1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). +1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. +1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). +1. Once the synchronous logic is done, the clients receives a response immediately. +1. AP4R queues the message, and requests it to the web server asynchronously. +1. An asynchronous logic, implemented as usual rails action, is executed. + + +== SYNOPSIS: + +* FIX (code sample of usage) + +== REQUIREMENTS: + +* FIX (list of requirements) + +== INSTALL: + +Use RubyGems command. + + $ sudo gem install ap4r --include-dependencies + + +== REFERENCES: + +* Ruby Homepage + * http://www.ruby-lang.org/ +* Ruby on Rails tutorial + * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html +* MySQL tutorial + * http://dev.mysql.com/doc/refman/5.0/en/index.html +* reliable-msg + * +http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging + + +== LICENSE: + +* This licence is licensed under the MIT license. +* Copyright(c) 2007 Future Architect Inc. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Modified: trunk/ap4r/Rakefile =================================================================== --- trunk/ap4r/Rakefile 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/Rakefile 2007-06-22 10:13:03 UTC (rev 243) @@ -1,102 +1,70 @@ -# Author:: Kiwamu Kato -# Copyright:: Copyright (c) 2007 Future Architect Inc. -# Licence:: MIT Licence - -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' -require 'rake/gempackagetask' -require 'rake/contrib/rubyforgepublisher' - -require 'date' -require 'find' -require 'rbconfig' - +require 'rubygems' +require 'hoe' require File.join(File.dirname(__FILE__), 'lib/ap4r', 'version') -PKG_VERSION = Ap4r::VERSION::STRING +HelloWorld = '../samples/HelloWorld' -TEMP_DIR = './temp' -PKG_DIR = './pkg' -RELEASE_DIR = './release' -HELLO_WORLD_DIR = '../samples/HelloWorld' +# AP4R release tasks -------------------------------------------------------- -# Generate GEM ---------------------------------------------------------------------------- +# copy rails plugin from sample before gem build +FileUtils.mkdir_p('./rails_plugin/ap4r/lib') +FileUtils.cp(HelloWorld + '/db/migrate/001_create_table_for_saf.rb', './lib/ap4r/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/async_helper.rb', './rails_plugin/ap4r/lib/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/message_builder.rb', './rails_plugin/ap4r/lib/') - -PKG_FILES = FileList[ - '[a-zA-Z]*', - 'bin/**/*', - 'config/**/*', - 'rails_plugin/**/*', - 'script/**/*', - 'lib/**/*' -] - -HELLO_WORLD_SAMPLE_FILES = FileList[ - '[a-zA-Z]*', - 'app/**/*', - 'components/**/*', - 'config/**/*', - 'db/**/*', - 'doc/**/*', - 'lib/**/*', - 'log/**/*', - 'public/**/*', - 'script/**/*', - 'test/**/*', - 'tmp/**/*', - 'vendor/**/*', -] - - -spec = Gem::Specification.new do |s| - s.name = 'ap4r' - s.version = PKG_VERSION - s.summary = "Asynchronous Processing for Ruby." - s.description = <<-EOF +Hoe.new('ap4r', Ap4r::VERSION::STRING) do |p| + p.author = ["Shunichi Shinohara", "Kiwamu Kato"] + p.changes = p.paragraphs_of('History.txt', 1..2).join("\n\n") + #p.clean_globs = + p.description = <<-EOF Asynchronous Processing for Ruby. EOF + p.email = %q{shinohara.shunichi @ future.co.jp, kato.kiwamu @ future.co.jp} - s.add_dependency(%q, ["= 1.1.0"]) - s.add_dependency(%q) - s.add_dependency(%q) - s.add_dependency(%q) + p.extra_deps << ['reliable-msg', '=1.1.0'] + p.extra_deps << ['activesupport'] + p.extra_deps << ['mongrel'] + p.extra_deps << ['rake'] + p.extra_deps << ['hoe'] - s.has_rdoc = true - s.extra_rdoc_files = ["README", "CHANGELOG", 'rails_plugin'] - s.rdoc_options << "--main" << "README" - s.rdoc_options << "--title" << "Asynchronous Processing for Ruby" - s.rdoc_options << "--line-numbers" + p.name = 'ap4r' + p.need_tar = false + p.need_zip = false + #p.rdoc_pattern = + #p.remote_rdoc_dir = + #p.rsync = + p.rubyforge_name = 'ap4r' + #p.spec_extra = + p.summary = 'Asynchronous Processing for Ruby.' + p.test_globs = 'spec/**/*_spec.rb' + p.url = 'http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage' + p.version = Ap4r::VERSION::STRING +end - s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')} - s.require_path = 'lib' - s.autorequire = %q{ap4r.rb} +# Sample release tasks ------------------------------------------------------ +desc 'Make samle tarball (Now only HelloWorld sample).' +task :sample do + FileUtils.mkdir_p('./pkg/samples') + FileUtils.rm_rf('./pkg/samples/HelloWorld') + + FileUtils.cp_r(HelloWorld, './pkg/samples/') + Find.find('./pkg/samples') do |path| + next unless File.file? path + FileUtils.rm_rf(path) if path =~ /\.svn|tmp$|CVS|.rb\~/ + end - s.bindir = "bin" # Use these for applications. - s.executables = ["ap4r_setup"] - s.default_executable = "ap4r_setup" - - s.authors = ["Shunichi Shinohara", "Kiwamu Kato"] - s.email = %q{shinohara.shunichi @ future.co.jp, kato.kiwamu @ future.co.jp} - s.homepage = %q{http://rubyforge.org/projects/ap4r/} - s.rubyforge_project = "ap4r" + Dir.chdir('./pkg/samples/HelloWorld') + `rake db:migrate` + Dir.chdir('../../') + + `tar czvf HelloWorld-#{Ap4r::VERSION::STRING}.tar.gz ./samples/HelloWorld/` + Dir.chdir('../') end -Rake::GemPackageTask.new(spec) do |pkg| -end -# Generate documentation ------------------------------------------------------------------ - -Rake::RDocTask.new { |rdoc| - rdoc.rdoc_dir = 'doc' - rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=rw' - rdoc.rdoc_files.include('README', 'CHANGELOG') - rdoc.rdoc_files.include('lib/**/*.rb') - rdoc.rdoc_files.include('rails_plugin/**/*.rb') -} - # Spec tasks ---------------------------------------------------------------- require 'spec/rake/spectask' @@ -123,71 +91,7 @@ end end -# AP4R release ---------------------------------------------------------------- -desc "Make gem" -task :gem_release => [ :make_release_dir, :copy_to_ap4r_from_sample, :gem] - -task :copy_to_ap4r_from_sample do - FileUtils.cp(HELLO_WORLD_DIR + '/db/migrate/001_create_table_for_saf.rb', './lib/ap4r/xxx_create_table_for_saf.rb') - - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/init.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/async_helper.rb', './rails_plugin/ap4r/lib/async_helper.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/ap4r_client.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/message_builder.rb', './rails_plugin/ap4r/lib/message_builder.rb') -end - -desc "Make sample tgz" -task :sample_release => [ :make_release_dir, :make_sample_tgz, :copy_to_release_dir ] - -task :make_sample_tgz => [ :make_temp_dir, :copy_sample, :execute_migration, :make_tgz ] - -task :make_release_dir do - make_dir RELEASE_DIR -end - -task :make_temp_dir do - make_dir TEMP_DIR -end - -def make_dir(path) - if(File.exist?(path)) - FileUtils.remove_entry(path, true) - end - FileUtils.mkdir_p(path) -end - - -task :copy_sample do - FileUtils.cp_r(HELLO_WORLD_DIR, TEMP_DIR) - Find.find(TEMP_DIR) {|f| - if f.include?('.svn') - FileUtils.rm_rf(f) - end - } -end - -task :execute_migration do - Dir.chdir('temp/HelloWorld') - `rake db:migrate` - Dir.chdir('../../') -end - -task :make_tgz do - Dir.chdir('temp/') - `tar czvf HelloWorld.tar.gz HelloWorld/` - Dir.chdir('../') -end - -task :copy_to_release_dir do - Dir.foreach(PKG_DIR) {|f| - FileUtils.cp(PKG_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.gem", f) - } - Dir.foreach(TEMP_DIR) {|f| - FileUtils.cp(TEMP_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.tar.gz", f) - } -end - # AP4R misc tools ---------------------------------------------------------------- desc "display code statistics" _______________________________________________ ap4r-devel mailing list ap4r-devel @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel _______________________________________________ ap4r-devel-ja mailing list ap4r-devel-ja @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel-ja From kato.kiwamu @ future.co.jp Sun Jun 24 21:13:45 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Mon, 25 Jun 2007 10:13:45 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602957FEB@045MAIL.future.co.jp> > 確認してみたら、Manifest.txt で指定した内容は、 > Gem::Specification#files に渡してるだけなのでワイルドカード指定も OK ですね。 うそです。勘違いしました。 ワイルドカード指定は無理そうなので、 Manifest.txt 作成のタスク化が無難な気がします。 加藤 -----Original Message----- From: ap4r-devel-ja-bounces @ rubyforge.org [mailto:ap4r-devel-ja-bounces @ rubyforge.org] On Behalf Of kato.kiwamu @ future.co.jp Sent: Monday, June 25, 2007 10:06 AM To: Shinohara Shunichi(篠原 俊一); ap4r-devel-ja @ rubyforge.org Subject: Re: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. 加藤です。 > - Manifest.txt が面倒そう、ワイルドカードで指定したいところ > # もしくは、Manifest.txt をタスクで生成するか? 自分もメンテがしんどそうだなと思ってたとこです。 確認してみたら、Manifest.txt で指定した内容は、 Gem::Specification#files に渡してるだけなのでワイルドカード指定も OK ですね。 RubyGems GemSpec Reference | RubyGems Manuals http://rubygems.org/read/chapter/20#files > - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします ここもちょっと迷ったとこです。 (^^; これまでリリースタイミングは一緒だったのでコマンド一発で両方まとめてリリースしようかとも 思いましたが、今後の拡張を考えると ap4r と分離しといたほうがよいかもしれないですね。 -----Original Message----- From: ap4r-devel-ja-bounces @ rubyforge.org [mailto:ap4r-devel-ja-bounces @ rubyforge.org] On Behalf Of shinohara.shunichi @ future.co.jp Sent: Monday, June 25, 2007 9:34 AM To: ap4r-devel-ja @ rubyforge.org Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. しのはらです # 日本語側で (^-^ ) hoe 対応ありがとうございます。 気になった点 - Manifest.txt が面倒そう、ワイルドカードで指定したいところ # もしくは、Manifest.txt をタスクで生成するか? - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします しの -----Original Message----- From: ap4r-devel-bounces @ rubyforge.org [mailto:ap4r-devel-bounces @ rubyforge.org] On Behalf Of kato-k @ rubyforge.org Sent: Friday, June 22, 2007 7:13 PM To: ap4r-devel @ rubyforge.org Subject: [ap4r-devel] [243] trunk/ap4r: Modified Rakefile with hoe. Revision: 243 Author: kato-k Date: 2007-06-22 06:13:03 -0400 (Fri, 22 Jun 2007) Log Message: ----------- Modified Rakefile with hoe. Modified Paths: -------------- trunk/ap4r/Rakefile Added Paths: ----------- trunk/ap4r/History.txt trunk/ap4r/Manifest.txt trunk/ap4r/README.txt Removed Paths: ------------- trunk/ap4r/CHANGELOG trunk/ap4r/README Deleted: trunk/ap4r/CHANGELOG =================================================================== --- trunk/ap4r/CHANGELOG 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/CHANGELOG 2007-06-22 10:13:03 UTC (rev 243) @@ -1,40 +0,0 @@ -== 0.3.x - -=== 0.3.2 (June 7th, 2007) -* Fixed: util/loc.rb doesn't work. -* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. -* Added: Dynamic configuration with ERb. -* Added: Script to run AP4R on Mongrel. -* Changed: How to plugin and main API names have changed. -* Added: Support of several Content-type on asynchronous call. -* Added: Block style for async_to. -* Added: Url rewrite filter. - -=== 0.3.1 (April 24th, 2007) - -* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. -* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. -* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. - -=== 0.3.0 (April 6th, 2007) - -* Changed: name space from "AP4R" to "Ap4r". -* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . - -== 0.2.x - -=== 0.2.0 (October 17th, 2006) - -* Added: Protocols to invoke asynchronous logics. -* Added: At-lease-once QoS. - -== 0.1.x - -=== 0.1.1 (October 5th, 2006) - -* Changed: Enriched RDoc. -* Changed: Enriched README. - -=== 0.1.0 (September 1st, 2006) - -* Initial release. Added: trunk/ap4r/History.txt =================================================================== --- trunk/ap4r/History.txt (rev 0) +++ trunk/ap4r/History.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,43 @@ +== 0.3.x + +=== 0.3.3 (June ?, 2007) +* Added: support with hoe. + +=== 0.3.2 (June 7th, 2007) +* Fixed: util/loc.rb doesn't work. +* Changed: Argument order of async_dispatch has changed, backward INCOMPATIBLE. +* Added: Dynamic configuration with ERb. +* Added: Script to run AP4R on Mongrel. +* Changed: How to plugin and main API names have changed. +* Added: Support of several Content-type on asynchronous call. +* Added: Block style for async_to. +* Added: Url rewrite filter. + +=== 0.3.1 (April 24th, 2007) + +* Changed: @delete_mode of AsyncController to @@saf_delete_mode with accessor. +* Changed: default value of dispatch_mode, from :XMLRPC to :HTTP. +* Added: Bootstrap script to let ap4r run on mongrel, experimental yet. + +=== 0.3.0 (April 6th, 2007) + +* Changed: name space from "AP4R" to "Ap4r". +* Added: support the latest version for Ruby(1.8.6) and RubyGems(0.9.2) and Rails(1.2.3) . + +== 0.2.x + +=== 0.2.0 (October 17th, 2006) + +* Added: Protocols to invoke asynchronous logics. +* Added: At-lease-once QoS. + +== 0.1.x + +=== 0.1.1 (October 5th, 2006) + +* Changed: Enriched RDoc. +* Changed: Enriched README. + +=== 0.1.0 (September 1st, 2006) + +* Initial release. Added: trunk/ap4r/Manifest.txt =================================================================== --- trunk/ap4r/Manifest.txt (rev 0) +++ trunk/ap4r/Manifest.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,38 @@ +History.txt +MIT-LICENSE +Rakefile +README.txt +bin/ap4r_setup +config/ap4r_settings.rb +config/log4r.yaml +config/queues.cfg +config/queues_disk.cfg +config/queues_mysql.cfg +lib/ap4r.rb +lib/ap4r/carrier.rb +lib/ap4r/dispatcher.rb +lib/ap4r/message_store_ext.rb +lib/ap4r/mongrel.rb +lib/ap4r/mongrel_ap4r.rb +lib/ap4r/multi_queue.rb +lib/ap4r/queue_manager_ext.rb +lib/ap4r/queue_manager_ext_debug.rb +lib/ap4r/retention_history.rb +lib/ap4r/script/base.rb +lib/ap4r/script/queue_manager_control.rb +lib/ap4r/script/setup.rb +lib/ap4r/script/workspace_generator.rb +lib/ap4r/start_with_log4r.rb +lib/ap4r/store_and_forward.rb +lib/ap4r/stored_message.rb +lib/ap4r/util/irm.rb +lib/ap4r/util/queue_client.rb +lib/ap4r/version.rb +script/irm +script/loop.cmd +script/loop.rb +script/mongrel_ap4r +script/start +script/stop +spec/local/dispatcher_base_spec.rb +spec/spec_helper.rb Deleted: trunk/ap4r/README =================================================================== --- trunk/ap4r/README 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/README 2007-06-22 10:13:03 UTC (rev 243) @@ -1,55 +0,0 @@ -== What is AP4R? - -AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. -Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. -Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. - -For more information, please step in AP4R homepage! - -http://ap4r.rubyforge.org/wiki/wiki.pl - -== Features - -1. Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. -1. Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. -1. Load balancing over multiple AP4R processes on single/multiple servers is supported. -1. Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. -1. Using store and forward function, at-least-omce QoS level is provided. - -== Typical process flow - -1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). -1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. -1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). -1. Once the synchronous logic is done, the clients receives a response immediately. -1. AP4R queues the message, and requests it to the web server asynchronously. -1. An asynchronous logic, implemented as usual rails action, is executed. - - -== Installation - -Use RubyGems command. - - $ sudo gem install ap4r --include-dependencies - -== References - -* Ruby Homepage - * http://www.ruby-lang.org/ -* Ruby on Rails tutorial - * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html -* MySQL tutorial - * http://dev.mysql.com/doc/refman/5.0/en/index.html -* reliable-msg - * http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging - -== Licence - -This licence is licensed under the MIT license. -Copyright(c) 2007 Future Architect Inc. - -== Authors - -* Kiwamu Kato -* Shunichi Shinohara - Added: trunk/ap4r/README.txt =================================================================== --- trunk/ap4r/README.txt (rev 0) +++ trunk/ap4r/README.txt 2007-06-22 10:13:03 UTC (rev 243) @@ -0,0 +1,82 @@ +Ap4r +* by Kiwamu Kato, Shun'ichi Shinohara +* http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage +* ap4r-user @ rubyforge.org + +== DESCRIPTION: + +AP4R, Asynchronous Processing for Ruby, is the implementation of reliable asynchronous message processing. It provides message queuing, and message dispatching. +Using asynchronous processing, we can cut down turn-around-time of web applications by queuing, or can utilize more machine power by load-balancing. +Also AP4R nicely ties with your Ruby on Rails applications. See Hello World sample application from rubyforge. + +For more information, please step in AP4R homepage! + + +== FEATURES/PROBLEMS: + +* Business logics can be implemented as simple Web applications, or ruby code, whether it's called asynchronously or synchronously. +* Asynchronous messaging is reliable by RDBMS persistence (now MySQL only) or file persistence, under the favor of reliable-msg. +* Load balancing over multiple AP4R processes on single/multiple servers is supported. +* Asynchronous logics are called via various protocols, such as XML-RPC, SOAP, HTTP PUT, and more. +* Using store and forward function, at-least-omce QoS level is provided. + +== TYPICAL PROCESS FLOW: + +1. A client(e.g. a web browser) makes a request to a web server (Apache, Lighttpd, etc...). +1. A rails application (a synchronous logic) is executed on mongrel via mod_proxy or something. +1. At the last of the synchronous logic, message(s) are put to AP4R (AP4R provides a helper). +1. Once the synchronous logic is done, the clients receives a response immediately. +1. AP4R queues the message, and requests it to the web server asynchronously. +1. An asynchronous logic, implemented as usual rails action, is executed. + + +== SYNOPSIS: + +* FIX (code sample of usage) + +== REQUIREMENTS: + +* FIX (list of requirements) + +== INSTALL: + +Use RubyGems command. + + $ sudo gem install ap4r --include-dependencies + + +== REFERENCES: + +* Ruby Homepage + * http://www.ruby-lang.org/ +* Ruby on Rails tutorial + * http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html +* MySQL tutorial + * http://dev.mysql.com/doc/refman/5.0/en/index.html +* reliable-msg + * +http://trac.labnotes.org/cgi-bin/trac.cgi/wiki/Ruby/ReliableMessaging + + +== LICENSE: + +* This licence is licensed under the MIT license. +* Copyright(c) 2007 Future Architect Inc. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Modified: trunk/ap4r/Rakefile =================================================================== --- trunk/ap4r/Rakefile 2007-06-22 09:53:46 UTC (rev 242) +++ trunk/ap4r/Rakefile 2007-06-22 10:13:03 UTC (rev 243) @@ -1,102 +1,70 @@ -# Author:: Kiwamu Kato -# Copyright:: Copyright (c) 2007 Future Architect Inc. -# Licence:: MIT Licence - -require 'rake' -require 'rake/testtask' -require 'rake/rdoctask' -require 'rake/gempackagetask' -require 'rake/contrib/rubyforgepublisher' - -require 'date' -require 'find' -require 'rbconfig' - +require 'rubygems' +require 'hoe' require File.join(File.dirname(__FILE__), 'lib/ap4r', 'version') -PKG_VERSION = Ap4r::VERSION::STRING +HelloWorld = '../samples/HelloWorld' -TEMP_DIR = './temp' -PKG_DIR = './pkg' -RELEASE_DIR = './release' -HELLO_WORLD_DIR = '../samples/HelloWorld' +# AP4R release tasks +-------------------------------------------------------- -# Generate GEM ---------------------------------------------------------------------------- +# copy rails plugin from sample before gem build +FileUtils.mkdir_p('./rails_plugin/ap4r/lib') +FileUtils.cp(HelloWorld + '/db/migrate/001_create_table_for_saf.rb', +'./lib/ap4r/') FileUtils.cp(HelloWorld + +'/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/') +FileUtils.cp(HelloWorld + '/vendor/plugins/ap4r/lib/async_helper.rb', +'./rails_plugin/ap4r/lib/') FileUtils.cp(HelloWorld + +'/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/') +FileUtils.cp(HelloWorld + +'/vendor/plugins/ap4r/lib/message_builder.rb', +'./rails_plugin/ap4r/lib/') - -PKG_FILES = FileList[ - '[a-zA-Z]*', - 'bin/**/*', - 'config/**/*', - 'rails_plugin/**/*', - 'script/**/*', - 'lib/**/*' -] - -HELLO_WORLD_SAMPLE_FILES = FileList[ - '[a-zA-Z]*', - 'app/**/*', - 'components/**/*', - 'config/**/*', - 'db/**/*', - 'doc/**/*', - 'lib/**/*', - 'log/**/*', - 'public/**/*', - 'script/**/*', - 'test/**/*', - 'tmp/**/*', - 'vendor/**/*', -] - - -spec = Gem::Specification.new do |s| - s.name = 'ap4r' - s.version = PKG_VERSION - s.summary = "Asynchronous Processing for Ruby." - s.description = <<-EOF +Hoe.new('ap4r', Ap4r::VERSION::STRING) do |p| + p.author = ["Shunichi Shinohara", "Kiwamu Kato"] + p.changes = p.paragraphs_of('History.txt', 1..2).join("\n\n") + #p.clean_globs = + p.description = <<-EOF Asynchronous Processing for Ruby. EOF + p.email = %q{shinohara.shunichi @ future.co.jp, + kato.kiwamu @ future.co.jp} - s.add_dependency(%q, ["= 1.1.0"]) - s.add_dependency(%q) - s.add_dependency(%q) - s.add_dependency(%q) + p.extra_deps << ['reliable-msg', '=1.1.0'] p.extra_deps << + ['activesupport'] p.extra_deps << ['mongrel'] p.extra_deps << + ['rake'] p.extra_deps << ['hoe'] - s.has_rdoc = true - s.extra_rdoc_files = ["README", "CHANGELOG", 'rails_plugin'] - s.rdoc_options << "--main" << "README" - s.rdoc_options << "--title" << "Asynchronous Processing for Ruby" - s.rdoc_options << "--line-numbers" + p.name = 'ap4r' + p.need_tar = false + p.need_zip = false + #p.rdoc_pattern = + #p.remote_rdoc_dir = + #p.rsync = + p.rubyforge_name = 'ap4r' + #p.spec_extra = + p.summary = 'Asynchronous Processing for Ruby.' + p.test_globs = 'spec/**/*_spec.rb' + p.url = 'http://ap4r.rubyforge.org/wiki/wiki.pl?HomePage' + p.version = Ap4r::VERSION::STRING +end - s.files = PKG_FILES.to_a.delete_if {|f| f.include?('.svn')} - s.require_path = 'lib' - s.autorequire = %q{ap4r.rb} +# Sample release tasks +------------------------------------------------------ +desc 'Make samle tarball (Now only HelloWorld sample).' +task :sample do + FileUtils.mkdir_p('./pkg/samples') + FileUtils.rm_rf('./pkg/samples/HelloWorld') + + FileUtils.cp_r(HelloWorld, './pkg/samples/') + Find.find('./pkg/samples') do |path| + next unless File.file? path + FileUtils.rm_rf(path) if path =~ /\.svn|tmp$|CVS|.rb\~/ end - s.bindir = "bin" # Use these for applications. - s.executables = ["ap4r_setup"] - s.default_executable = "ap4r_setup" - - s.authors = ["Shunichi Shinohara", "Kiwamu Kato"] - s.email = %q{shinohara.shunichi @ future.co.jp, kato.kiwamu @ future.co.jp} - s.homepage = %q{http://rubyforge.org/projects/ap4r/} - s.rubyforge_project = "ap4r" + Dir.chdir('./pkg/samples/HelloWorld') + `rake db:migrate` + Dir.chdir('../../') + + `tar czvf HelloWorld-#{Ap4r::VERSION::STRING}.tar.gz + ./samples/HelloWorld/` + Dir.chdir('../') end -Rake::GemPackageTask.new(spec) do |pkg| -end -# Generate documentation ------------------------------------------------------------------ - -Rake::RDocTask.new { |rdoc| - rdoc.rdoc_dir = 'doc' - rdoc.options << '--line-numbers' << '--inline-source' << '--accessor' << 'cattr_accessor=rw' - rdoc.rdoc_files.include('README', 'CHANGELOG') - rdoc.rdoc_files.include('lib/**/*.rb') - rdoc.rdoc_files.include('rails_plugin/**/*.rb') -} - # Spec tasks ---------------------------------------------------------------- require 'spec/rake/spectask' @@ -123,71 +91,7 @@ end end -# AP4R release ---------------------------------------------------------------- -desc "Make gem" -task :gem_release => [ :make_release_dir, :copy_to_ap4r_from_sample, :gem] - -task :copy_to_ap4r_from_sample do - FileUtils.cp(HELLO_WORLD_DIR + '/db/migrate/001_create_table_for_saf.rb', './lib/ap4r/xxx_create_table_for_saf.rb') - - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/init.rb', './rails_plugin/ap4r/init.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/async_helper.rb', './rails_plugin/ap4r/lib/async_helper.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/ap4r_client.rb', './rails_plugin/ap4r/lib/ap4r_client.rb') - FileUtils.cp(HELLO_WORLD_DIR + '/vendor/plugins/ap4r/lib/message_builder.rb', './rails_plugin/ap4r/lib/message_builder.rb') -end - -desc "Make sample tgz" -task :sample_release => [ :make_release_dir, :make_sample_tgz, :copy_to_release_dir ] - -task :make_sample_tgz => [ :make_temp_dir, :copy_sample, :execute_migration, :make_tgz ] - -task :make_release_dir do - make_dir RELEASE_DIR -end - -task :make_temp_dir do - make_dir TEMP_DIR -end - -def make_dir(path) - if(File.exist?(path)) - FileUtils.remove_entry(path, true) - end - FileUtils.mkdir_p(path) -end - - -task :copy_sample do - FileUtils.cp_r(HELLO_WORLD_DIR, TEMP_DIR) - Find.find(TEMP_DIR) {|f| - if f.include?('.svn') - FileUtils.rm_rf(f) - end - } -end - -task :execute_migration do - Dir.chdir('temp/HelloWorld') - `rake db:migrate` - Dir.chdir('../../') -end - -task :make_tgz do - Dir.chdir('temp/') - `tar czvf HelloWorld.tar.gz HelloWorld/` - Dir.chdir('../') -end - -task :copy_to_release_dir do - Dir.foreach(PKG_DIR) {|f| - FileUtils.cp(PKG_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.gem", f) - } - Dir.foreach(TEMP_DIR) {|f| - FileUtils.cp(TEMP_DIR + '/' + f, RELEASE_DIR) if File.fnmatch("*.tar.gz", f) - } -end - # AP4R misc tools ---------------------------------------------------------------- desc "display code statistics" _______________________________________________ ap4r-devel mailing list ap4r-devel @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel _______________________________________________ ap4r-devel-ja mailing list ap4r-devel-ja @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel-ja _______________________________________________ ap4r-devel-ja mailing list ap4r-devel-ja @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel-ja From shinohara.shunichi @ future.co.jp Sun Jun 24 21:31:07 2007 From: shinohara.shunichi @ future.co.jp (shinohara.shunichi @ future.co.jp) Date: Mon, 25 Jun 2007 10:31:07 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> References: <14CE73B79D552644B7CBEF0428763DF602957FD7@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602957FF4@045MAIL.future.co.jp> リリースはたぶん一緒なので、trunk/ap4r あたりに Rakefile を置いて、 samples/HelloWorld と、ap4r を両方叩くのが楽なんじゃないかと思いました shino > -----Original Message----- > From: Kato Kiwamu(加藤 究) > > - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします > > ここもちょっと迷ったとこです。 (^^; > これまでリリースタイミングは一緒だったのでコマンド一発で両方まとめてリリースしようかとも > 思いましたが、今後の拡張を考えると ap4r と分離しといたほうがよいかもしれないですね。 > From kato.kiwamu @ future.co.jp Sun Jun 24 21:38:32 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Mon, 25 Jun 2007 10:38:32 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602957FF4@045MAIL.future.co.jp> References: <14CE73B79D552644B7CBEF0428763DF602957FD7@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FF4@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602957FFC@045MAIL.future.co.jp> samples/HelloWorld と ap4r をともに hoe 対応しといて それぞれの Rakefile を trunk/ap4r にも用意した Rakfile から 叩くということで認識あってます? 加藤 > -----Original Message----- > From: Shinohara Shunichi(篠原 俊一) > Sent: Monday, June 25, 2007 10:31 AM > To: Kato Kiwamu(加藤 究); 'ap4r-devel-ja @ rubyforge.org' > Subject: RE: [ap4r-devel-ja] FW: trunk/ap4r: Modified > Rakefile with hoe. > > リリースはたぶん一緒なので、trunk/ap4r あたりに Rakefile を置いて、 > samples/HelloWorld と、ap4r を両方叩くのが楽なんじゃないかと思いました > > shino > > > -----Original Message----- > > From: Kato Kiwamu(加藤 究) > > > - HelloWolrd 自体を hoe 化して、自分のリリースは自分で、というほうが良い気がします > > > > ここもちょっと迷ったとこです。 (^^; > > これまでリリースタイミングは一緒だったのでコマンド一発で両方まとめてリリースしようかとも > > 思いましたが、今後の拡張を考えると ap4r と分離しといたほうがよいかもしれないですね。 > > > From kato.kiwamu @ future.co.jp Sun Jun 24 22:09:31 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Mon, 25 Jun 2007 11:09:31 +0900 Subject: [ap4r-devel-ja] =?iso-2022-jp?b?Rlc6IGtpd2FtdRskQiQ1JHMkTkZ8GyhC?= =?iso-2022-jp?b?GyRCNS0kSyUzJWElcyVIJCxFUE8/JDUkbCReJDckPxsoQg==?= Message-ID: <14CE73B79D552644B7CBEF0428763DF60295800C@045MAIL.future.co.jp> 以下のようなアドバイスをいただきました。 原因は、reliable-msg のバグで設定ファイルの DRb の項目が反映されないため ACL(Access Control List) が読みこまれず、IPv6 環境でエラーが起きているのだと思われます。 #最近の Mac のひとはたいがいひっかかる? ひとまず、ホームページの FAQ に原因と対処法記載しておきましたが、 もう少しうまい対処法があれば考えたいですね。 #しのの送ってくれたパッチが早く反映されれば一番いいんだけど。 (^^; 加藤 -----Original Message----- From: はてなダイアリー [mailto:hatena-d-comment @ hatena.ne.jp] Sent: Sunday, June 24, 2007 8:30 PM To: Kato Kiwamu(加藤 究) Subject: kiwamuさんの日記にコメントが登録されました kiwamuさんの日記にコメントが登録されました。 のりお (61.213.96.142) 『daraさんの日記とこちらの日記のどちらに書こうか迷いましたが、とりあえずこちらに書かせていただきます。 ぼくの環境で試したところ、「DRb::DRbConnError (Connection reset by peer)」というエラーが発生してうまく動作しませんでした。 さらにGetting startedの方も同じエラーでうまくいかなったので、環境周りの問題だろうと思い、いろいろ調べました。 結局のところ、http://d.hatena.ne.jp/kiwamu/20070406/1175859018 の記事の「reliable-msg へのパッチをあてる」で解決することができました。 たぶん、ぼくのようにハマる人は少なくないと思うので、Getting startedなどに載せておいた方が良いのではないでしょうか。 ぼくのようなケースは稀で、勘違いだったらごめんなさい。』 http://d.hatena.ne.jp/kiwamu/20070615 From shinohara.shunichi @ future.co.jp Sun Jun 24 22:16:25 2007 From: shinohara.shunichi @ future.co.jp (shinohara.shunichi @ future.co.jp) Date: Mon, 25 Jun 2007 11:16:25 +0900 Subject: [ap4r-devel-ja] FW: trunk/ap4r: Modified Rakefile with hoe. In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602957FFC@045MAIL.future.co.jp> References: <14CE73B79D552644B7CBEF0428763DF602957FD7@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FE5@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FF4@045MAIL.future.co.jp> <14CE73B79D552644B7CBEF0428763DF602957FFC@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602958011@045MAIL.future.co.jp> その通りです shino > -----Original Message----- > From: Kato Kiwamu(加藤 究) > Sent: Monday, June 25, 2007 10:39 AM > To: Shinohara Shunichi(篠原 俊一); 'ap4r-devel-ja @ rubyforge.org' > Subject: RE: [ap4r-devel-ja] FW: trunk/ap4r: Modified > Rakefile with hoe. > > samples/HelloWorld と ap4r をともに hoe 対応しといて > それぞれの Rakefile を trunk/ap4r にも用意した Rakfile から > 叩くということで認識あってます? > > 加藤 > From shinohara.shunichi @ future.co.jp Sun Jun 24 22:25:59 2007 From: shinohara.shunichi @ future.co.jp (shinohara.shunichi @ future.co.jp) Date: Mon, 25 Jun 2007 11:25:59 +0900 Subject: [ap4r-devel-ja] =?iso-2022-jp?b?Rlc6IGtpd2FtdRskQiQ1JHMkTkZ8GyhC?= =?iso-2022-jp?b?GyRCNS0kSyUzJWElcyVIJCxFUE8/JDUkbCReJDckPxsoQg==?= In-Reply-To: <14CE73B79D552644B7CBEF0428763DF60295800C@045MAIL.future.co.jp> References: <14CE73B79D552644B7CBEF0428763DF60295800C@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF602958015@045MAIL.future.co.jp> たしかに、どうにかしたいですね。 > #しのの送ってくれたパッチが早く反映されれば一番いいんだけど。 (^^; あのパッチが反映されるのはあまり関係ないですが、その後、reliable-msg 自体がリリースしてくれないと困ります。 ところが、いくつか API が変わっているため、そしたら AP4R もバージョンアップしなきゃいけないかも、という記憶があります。 ReliableMsg::QueueManager あたりのタイポなメソッド名が変更されていたはず。Queue から使っている分には 問題ないですが、DRb をべたにつかっているところはこける。 ちなみに、設定が読み込まれないバグは CVS head では直っています。 が、上の問題で 1.1.0 との整合性が取れないので一筋縄ではいかない感じ。 というわけで(どういうわけだ?)、AP4R の reliable-msg への依存性を、>= じゃなくて = にしといた ほうが安全かなぁ、と思ったことをいま思い出しました。 > もう少しうまい対処法があれば考えたいですね。 patch 形式のファイルを作って、Wiki に貼り付けておくとか? もしくは、AP4R の中にqueue-manager.rb コピって修正したものを load するくらいかなぁ。 shino From kato.kiwamu @ future.co.jp Sun Jun 24 22:37:07 2007 From: kato.kiwamu @ future.co.jp (kato.kiwamu @ future.co.jp) Date: Mon, 25 Jun 2007 11:37:07 +0900 Subject: [ap4r-devel-ja] =?iso-2022-jp?b?Rlc6IGtpd2FtdRskQiQ1JHMkTkZ8GyhC?= =?iso-2022-jp?b?GyRCNS0kSyUzJWElcyVIJCxFUE8/JDUkbCReJDckPxsoQg==?= In-Reply-To: <14CE73B79D552644B7CBEF0428763DF602958015@045MAIL.future.co.jp> Message-ID: <14CE73B79D552644B7CBEF0428763DF60295801F@045MAIL.future.co.jp> > というわけで(どういうわけだ?)、AP4R の reliable-msg への依存性を、>= じゃなくて = にしといた > ほうが安全かなぁ、と思ったことをいま思い出しました。 これはもう hoe 対応したのにあわせて = にしちゃってます。 > patch 形式のファイルを作って、Wiki に貼り付けておくとか? > もしくは、AP4R の中にqueue-manager.rb コピって修正したものを load するくらいかなぁ。 あるいは、brunch 以下あたりにパッチをあてたものを用意して svn で落とせるようにしておくとか? とりあえず、しのの言うように reliable-msg が新しくリリースされてもいろいろ問題はあるので、 利用者にとって一番手間のかからなそうな方法がよいかな。 となると、queue-manager.rb の修正版を AP4R 内に入れとくか。 加藤 -----Original Message----- From: ap4r-devel-ja-bounces @ rubyforge.org [mailto:ap4r-devel-ja-bounces @ rubyforge.org] On Behalf Of shinohara.shunichi @ future.co.jp Sent: Monday, June 25, 2007 11:26 AM To: ap4r-devel-ja @ rubyforge.org Subject: Re: [ap4r-devel-ja]FW: kiwamuさんの日記にコメントが登録されました たしかに、どうにかしたいですね。 > #しのの送ってくれたパッチが早く反映されれば一番いいんだけど。 (^^; あのパッチが反映されるのはあまり関係ないですが、その後、reliable-msg 自体がリリースしてくれないと困ります。 ところが、いくつか API が変わっているため、そしたら AP4R もバージョンアップしなきゃいけないかも、という記憶があります。 ReliableMsg::QueueManager あたりのタイポなメソッド名が変更されていたはず。Queue から使っている分には 問題ないですが、DRb をべたにつかっているところはこける。 ちなみに、設定が読み込まれないバグは CVS head では直っています。 が、上の問題で 1.1.0 との整合性が取れないので一筋縄ではいかない感じ。 というわけで(どういうわけだ?)、AP4R の reliable-msg への依存性を、>= じゃなくて = にしといた ほうが安全かなぁ、と思ったことをいま思い出しました。 > もう少しうまい対処法があれば考えたいですね。 patch 形式のファイルを作って、Wiki に貼り付けておくとか? もしくは、AP4R の中にqueue-manager.rb コピって修正したものを load するくらいかなぁ。 shino _______________________________________________ ap4r-devel-ja mailing list ap4r-devel-ja @ rubyforge.org http://rubyforge.org/mailman/listinfo/ap4r-devel-ja