如何使用 Zend Framework 在用户之间实现共享变量?

发布于 2024-12-23 08:43:19 字数 201 浏览 3 评论 0原文

我有一个网站,需要一个共享优先级队列,其中包含存储用户 IP 和其他重要用户发布值的对象。

我想我可以使用sql数据库,但由于优先级队列不是那么大并且经常更新,所以像缓存这样的东西会更合适。

我可以使用 Zend 框架中的哪些工具?当然,我希望共享优先级队列保持一致,没有数据竞争和其他并发相关问题。但我还是想要有好的表现。

有什么想法吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

忘年祭陌 2024-12-30 08:43:19

APC、Memcache 或实际的排队解决方案,例如 beanstalkd。不确定 zf 有什么特别的东西,除了可能为某些或所有这些工具预先构建的客户端。当然,您也可以使用文件系统,但您需要确定这是否可行,例如,如果负载均衡器后面有多个服务器,则一台 Web 服务器上的文件系统方法可能不够。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文