2

I have a website that requires a shared priority queue with objects that store the IP of the user and other important user posted values.

I figured I could use a sql database, but since the priority queue isn't that big and is frequently updated, something like a cache would be more appropriate.

What tools could I use from the Zend framework? I want the shared priority queue to be consistent, of course, without data races and other concurrency related problems. Yet I still want a good performance.

Any ideas?

0

1 Answer 1

3

APC, Memcache, or an actual queuing solution, like beanstalkd. Not sure zf has something particular for this except perhaps a pre-built client for some or all of these tools. Of course you could use the filesystem as well, but you need to determine if that will work, for example if you have multiple servers behind a load balancer a filesystem approach on one webserver is probly insufficient.

Sign up to request clarification or add additional context in comments.

2 Comments

Excellent, I'm thinking of using Memcache. So I'm guessing I'll have to initialise this unique global variable in Application.ini, as discussed here: stackoverflow.com/questions/4986123/…. Am I right?
@mieli - not at all. Just use Zend_Cache with whatever back-end you want (files would even work, but if you want memcache, more power to you). application.ini is for configuration, which is not what you want here. You just want to store a cache entry.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.