kato | 3 Mar 05:59
Favicon

[937] trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/ async_helper.rb: Added fault tolerance on connection to ap4r servers.

Revision: 937
Author:   kato-k
Date:     2009-03-02 23:59:08 -0500 (Mon, 02 Mar 2009)

Log Message:
-----------
Added fault tolerance on connection to ap4r servers.

Modified Paths:
--------------
    trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/async_helper.rb

Modified: trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/async_helper.rb
===================================================================
--- trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/async_helper.rb	2009-02-20
11:17:12 UTC (rev 936)
+++ trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/async_helper.rb	2009-03-03
04:59:08 UTC (rev 937)
@@ -20,12 +20,28 @@
       DRUBY_PORT = ENV['AP4R_DRUBY_PORT'] || '6438'
       DRUBY_URI = "druby://#{DRUBY_HOST}:#{DRUBY_PORT}"

+      @@druby_uris = [DRUBY_URI]
+      @@druby_uri_options = { :rotate => false, :fail_over => false, :fail_reuse => false }
+      @@druby_uri_retry_count = 0
+
       @@default_dispatch_mode = :HTTP
       @@default_rm_options = { :delivery => :once, :dispatch_mode => @@default_dispatch_mode }
       @@default_queue_prefix = "queue."

(Continue reading)

kato | 3 Mar 06:35
Favicon

[938] trunk/ap4r/spec/local/message_builder_spec.rb: Modified expectation of url-encoded hash value.

Revision: 938
Author:   kato-k
Date:     2009-03-03 00:35:09 -0500 (Tue, 03 Mar 2009)

Log Message:
-----------
Modified expectation of url-encoded hash value.

Modified Paths:
--------------
    trunk/ap4r/spec/local/message_builder_spec.rb

Modified: trunk/ap4r/spec/local/message_builder_spec.rb
===================================================================
--- trunk/ap4r/spec/local/message_builder_spec.rb	2009-03-03 04:59:08 UTC (rev 937)
+++ trunk/ap4r/spec/local/message_builder_spec.rb	2009-03-03 05:35:09 UTC (rev 938)
@@ -96,7 +96,7 @@
     end

     it "should return the urlencoded body." do
-      @message_builder.format_message_body.should == "key1=value&key2=1"
+      @message_builder.format_message_body.should == "key2=1&key1=value"
     end

   end
kato | 3 Mar 06:46
Favicon

[939] trunk: Moved async_helper.rb from plugin to ap4r core.

Revision: 939
Author:   kato-k
Date:     2009-03-03 00:46:00 -0500 (Tue, 03 Mar 2009)

Log Message:
-----------
Moved async_helper.rb from plugin to ap4r core.

Modified Paths:
--------------
    trunk/ap4r/Manifest.txt
    trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/ap4r_client.rb

Added Paths:
-----------
    trunk/ap4r/lib/ap4r/async_helper.rb

Removed Paths:
-------------
    trunk/samples/hello_world_for_rails2/vendor/plugins/ap4r/lib/async_helper.rb

Modified: trunk/ap4r/Manifest.txt
===================================================================
--- trunk/ap4r/Manifest.txt	2009-03-03 05:35:09 UTC (rev 938)
+++ trunk/ap4r/Manifest.txt	2009-03-03 05:46:00 UTC (rev 939)
@@ -13,6 +13,7 @@
 config/queues_pgsql.cfg
 fresh_rakefile
 lib/ap4r.rb
+lib/ap4r/async_helper.rb
(Continue reading)

kato | 4 Mar 11:13
Favicon

[940] trunk/ap4r/lib/ap4r/async_helper.rb: Fixed bugs on fail over.

Revision: 940
Author:   kato-k
Date:     2009-03-04 05:13:00 -0500 (Wed, 04 Mar 2009)

Log Message:
-----------
Fixed bugs on fail over.

Modified Paths:
--------------
    trunk/ap4r/lib/ap4r/async_helper.rb

Modified: trunk/ap4r/lib/ap4r/async_helper.rb
===================================================================
--- trunk/ap4r/lib/ap4r/async_helper.rb	2009-03-03 05:46:00 UTC (rev 939)
+++ trunk/ap4r/lib/ap4r/async_helper.rb	2009-03-04 10:13:00 UTC (rev 940)
@@ -23,6 +23,7 @@
       @@druby_uris = [DRUBY_URI]
       @@druby_uri_options = { :rotate => false, :fail_over => false, :fail_reuse => false }
       @@druby_uri_retry_count = 0
+      @@druby_uris_size = 1

       @@default_dispatch_mode = :HTTP
       @@default_rm_options = { :delivery => :once, :dispatch_mode => @@default_dispatch_mode }
@@ -30,7 +31,7 @@

       mattr_accessor :default_dispatch_mode, :default_rm_options, :default_queue_prefix, :saf_delete_mode

-      def druby_uris(uris, options)
+      def druby_uris(uris, options = {})
(Continue reading)

kato | 4 Mar 11:14
Favicon

[941] trunk/ap4r/spec/local/async_helper_queue_put_spec.rb: Added spec for fail over on queueing message to ap4r servers.

Revision: 941
Author:   kato-k
Date:     2009-03-04 05:14:52 -0500 (Wed, 04 Mar 2009)

Log Message:
-----------
Added spec for fail over on queueing message to ap4r servers.

Added Paths:
-----------
    trunk/ap4r/spec/local/async_helper_queue_put_spec.rb

Added: trunk/ap4r/spec/local/async_helper_queue_put_spec.rb
===================================================================
--- trunk/ap4r/spec/local/async_helper_queue_put_spec.rb	                        (rev 0)
+++ trunk/ap4r/spec/local/async_helper_queue_put_spec.rb	2009-03-04 10:14:52 UTC (rev 941)
@@ -0,0 +1,418 @@
+require File.join(File.dirname(__FILE__), "../spec_helper")
+
+require "reliable-msg"
+require "ap4r/async_helper"
+
+module Ap4r::AsyncHelper::Base
+  module_function :__queue_put
+end
+
+class Target
+  include Ap4r::AsyncHelper::Base
+  def initialize
+    @@logger = Logger.new(STDOUT)
(Continue reading)

kato | 13 Mar 02:29
Favicon

[942] trunk/ap4r/Manifest.txt: added spec to manifest file.

Revision: 942
Author:   kato-k
Date:     2009-03-12 21:29:28 -0400 (Thu, 12 Mar 2009)

Log Message:
-----------
added spec to manifest file.

Modified Paths:
--------------
    trunk/ap4r/Manifest.txt

Modified: trunk/ap4r/Manifest.txt
===================================================================
--- trunk/ap4r/Manifest.txt	2009-03-04 10:14:52 UTC (rev 941)
+++ trunk/ap4r/Manifest.txt	2009-03-13 01:29:28 UTC (rev 942)
@@ -53,6 +53,7 @@
 script/mongrel_ap4r
 script/start
 script/stop
+spec/local/async_helper_queue_put_spec.rb
 spec/local/dispatcher_base_spec.rb
 spec/local/message_builder_spec.rb
 spec/local/send_message_handler_spec.rb
kato | 23 Mar 07:30
Favicon

[944] trunk/ap4r/History.txt:

Revision: 944
Author:   kato-k
Date:     2009-03-23 02:30:20 -0400 (Mon, 23 Mar 2009)

Log Message:
-----------

Modified Paths:
--------------
    trunk/ap4r/History.txt

Modified: trunk/ap4r/History.txt
===================================================================
--- trunk/ap4r/History.txt	2009-03-23 06:22:09 UTC (rev 943)
+++ trunk/ap4r/History.txt	2009-03-23 06:30:20 UTC (rev 944)
@@ -1,5 +1,9 @@
 == 0.3.x
-* Fixed: qdb connection via PostgresPR etc.
+
+==- 0.3.7 (March 23, 2009)
+* Added: fault tolerance on connection from Rails to AP4R servers. (fail over and round robin connection etc.)
+* Changed: async_helper.rb was moved from rails plugin to ap4r core (ap4r/lib directory).
+* Fixed: bugs of queue database connection via PostgresPR etc.
          Based on a patch from cypher256 <kashihara at gmail.com>

 === 0.3.6 (February 6, 2008)
kato | 23 Mar 07:22
Favicon

[943] trunk/ap4r: Modified: spec tests to be free from side effects and etc .

Revision: 943
Author:   kato-k
Date:     2009-03-23 02:22:09 -0400 (Mon, 23 Mar 2009)

Log Message:
-----------
Modified: spec tests to be free from side effects and etc.

Modified Paths:
--------------
    trunk/ap4r/lib/ap4r/async_helper.rb
    trunk/ap4r/spec/local/async_helper_queue_put_spec.rb
    trunk/ap4r/spec/local/message_builder_spec.rb

Modified: trunk/ap4r/lib/ap4r/async_helper.rb
===================================================================
--- trunk/ap4r/lib/ap4r/async_helper.rb	2009-03-13 01:29:28 UTC (rev 942)
+++ trunk/ap4r/lib/ap4r/async_helper.rb	2009-03-23 06:22:09 UTC (rev 943)
@@ -154,7 +154,7 @@
           druby_uri = @@druby_uris.first
           logger.debug "Trying to connect to #{druby_uri} (druby uri list : #{@@druby_uris.join(", ")})."

-          q = ReliableMsg::Queue.new(queue_name, :drb_uri => druby_uri)
+          q = __queue_get(queue_name, druby_uri)
           q.put(queue_message, queue_headers)

           logger.debug "#{druby_uri} was connected and message was enqueued successfully."
@@ -180,6 +180,10 @@
         end
       end
(Continue reading)

kato | 23 Mar 08:57
Favicon

[945] trunk/samples/hello_world_for_rails2: Supported rails-2.3. 2 for HelloWorld sample application.

Revision: 945
Author:   kato-k
Date:     2009-03-23 03:57:30 -0400 (Mon, 23 Mar 2009)

Log Message:
-----------
Supported rails-2.3.2 for HelloWorld sample application.

Modified Paths:
--------------
    trunk/samples/hello_world_for_rails2/config/boot.rb
    trunk/samples/hello_world_for_rails2/config/environment.rb
    trunk/samples/hello_world_for_rails2/config/environments/production.rb
    trunk/samples/hello_world_for_rails2/config/environments/test.rb
    trunk/samples/hello_world_for_rails2/config/initializers/new_rails_defaults.rb
    trunk/samples/hello_world_for_rails2/db/development.sqlite3
    trunk/samples/hello_world_for_rails2/doc/README_FOR_APP
    trunk/samples/hello_world_for_rails2/public/HelloWorld.txt

Added Paths:
-----------
    trunk/samples/hello_world_for_rails2/app/controllers/application_controller.rb
    trunk/samples/hello_world_for_rails2/config/initializers/backtrace_silencers.rb
    trunk/samples/hello_world_for_rails2/config/initializers/session_store.rb

Removed Paths:
-------------
    trunk/samples/hello_world_for_rails2/app/controllers/application.rb
    trunk/samples/hello_world_for_rails2/next_migration_file_name

(Continue reading)

kato | 23 Mar 09:38
Favicon

[946] trunk/ap4r: Modified release task for sample hello world application and so on.

Revision: 946
Author:   kato-k
Date:     2009-03-23 04:38:39 -0400 (Mon, 23 Mar 2009)

Log Message:
-----------
Modified release task for sample hello world application and so on.

Modified Paths:
--------------
    trunk/ap4r/Manifest.txt
    trunk/ap4r/Rakefile

Modified: trunk/ap4r/Manifest.txt
===================================================================
--- trunk/ap4r/Manifest.txt	2009-03-23 07:57:30 UTC (rev 945)
+++ trunk/ap4r/Manifest.txt	2009-03-23 08:38:39 UTC (rev 946)
@@ -47,7 +47,6 @@
 rails_plugin/ap4r/lib/ap4r/queue_put_stub.rb
 rails_plugin/ap4r/lib/ap4r/service_handler.rb
 rails_plugin/ap4r/lib/ap4r_client.rb
-rails_plugin/ap4r/lib/async_helper.rb
 rails_plugin/ap4r/tasks/ap4r.rake
 script/irm
 script/mongrel_ap4r

Modified: trunk/ap4r/Rakefile
===================================================================
--- trunk/ap4r/Rakefile	2009-03-23 07:57:30 UTC (rev 945)
+++ trunk/ap4r/Rakefile	2009-03-23 08:38:39 UTC (rev 946)
(Continue reading)


Gmane