NYCPHP Meetup

NYPHP.org

[nycphp-talk] Best way to accomplish this task

Gary Mort garyamort at gmail.com
Mon Feb 15 15:02:34 EST 2010


On Mon, Feb 15, 2010 at 9:32 AM, Mitch Pirtle <mitch.pirtle at gmail.com>wrote:

> Keeps your logic clean and simple. Anything more sophisticated than
> this and you might as well look into Amazon Queues. :-)
>
>
Ick..  No, Amazon Queues[and for that matter Amazon SimpleDB] are bad
solutions for this.

Both services run off a group of servers that will "eventually" be in sync.
 When you request data from an element, a sampling of the servers is checked
for the data and anything found is returned.  Next time you check, you get
another sampling.

So it is possible, for example, if you have message #123 and it is stored on
databases A,B,C

First time you request new messages, Amazon checks A,B and returns message
#123, clearing it off A and B

Second time you request new messages, Amazon checks B,C and returns message
#123, clearing it off C

So you can't have, for example, 5 different systems using the queue to find
the next message to process.


Seriously though, I think postfix is a much better "poor mans queue"...
 Send your requests individually by email, they are automatically queued for
delivery.  When you want to have 2 servers, do load balancing on the email.
 And since each message will be processed individually, it's just like
processing one by one on the webpage[PHP script is started
up...processes....ends and memory is reclaimed]..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100215/384a8eb1/attachment.html>


More information about the talk mailing list