> We're looking at having in total around 30 or so different actions we'll
> be calling through ap4r, some of these we will want to run within a few
> minutes of being submitted (as soon as possible essentially), others are

If you have divided actions, kind of "priority" can be controlled by a
dispatchers' configuration. You can specify a set of dispatchers as
follows:
===
dispatchers:
  -
    targets: queue.very_busy.*
    threads: 10
    modify_rules:
      url: proc {|url| url.host = "busy.async.host"}
  -
    targets: queue.very_heavy.*
    threads: 1
    modify_rules:
      url: proc {|url| url.host = "heavy.async.host"}
===

This is a clipping from Japanese document. Doesn't this make sense?
# I will document it in rubyforge's wiki later.

Time-sensitive targets can be split (as targets:) and assign appropriate
threads. As options, host in URL can also be modified by modify_rules.
I hope this will be partially of help to you.

> Server-side. Some of all these processes will be client-initiated
> but most we will want to run on schedules ranging from every 10
> minutes to every 24 hours. Obviously we can do this easily enough
> through cron and some small scripts but it would be neat to be able
> to simply load in those messages at init and be confident
> they're going to be run without worrying about another process.

I also feel that scheduling in messaging layer is nice idea.
There is a issue in algorithm in searching message as same as
delayed retry.
# I suppose that many inactive messages exists around head of a queue.

> It is certainly is a complex problem. When you say pitch-and-catch
> are you
> imagining something where client servers poll a central server which

I imagine peer-to-peer (a peer is an AP4R process).
If every AP4R service has carriers and unprocessed messages in queues,
messages may hop (be carried) from one service to next, and then hop
to a former service or to a third service. I call it "pitch-and-catch".
May "back and forth" be adequate?
# I'm not good at English...

Thanks,
shino
_______________________________________________
ap4r-user mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ap4r-user

Reply via email to