我正在寻找关于如何正确格式化队列消息的模式和最佳实践,以及在PHP中执行作业的方法.我应该使用JSON,序列化对象,文本,URL还是XML?我应该发送什么信息?工作者是否有一个开关($job [‘command’]){}(或类似的东西)的方法,或者是否有任何已建立的模式来实现工人?
非常感谢!
> http://sourceforge.net/projects/beanstalk/
A PHP Client Library for beanstalkd. BeanStalk allows PHP developers to make use of the beanstalkd in-memory workqueue server (07002).
> http://kr.github.com/beanstalkd/
Beanstalk is a simple,fast workqueue service. Its interface is generic,but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously.
Apache ActiveMQ is the most popular and powerful open source messaging and Integration Patterns provider. Apache ActiveMQ is fast,supports many Cross Language Clients and Protocols,comes with easy to use Enterprise Integration Patterns and many advanced features while fully supporting JMS 1.1 and J2EE 1.4. Apache ActiveMQ is released under the Apache 2.0 License
> http://memcachedb.org/memcacheq/
Memcachedb is a distributed key-value storage system designed for persistent. It is not a cache solution,but a persistent storage for high-frequency writing and reading. It conforms to memcache protocol(not completed,see below),so any memcached client can have connectivity with it. Memcachedb uses Berkeley DB as a storing backend,so lots of features including transaction and replication are supported.
> http://www.zend.com/en/products/server/
Zend Server 5.0 incorporates Job Queue,providing full support for creating,executing and managing jobs to optimize application performance and reduce server load,minimizing application bottlenecks and improving the end-user experience.
dropr is a distributed message queue framework written in PHP. The main goals are:
- reliable and durable (failsafe)-messaging over networks
- decentralized architecture without a single (point of failure) server instance
- easy to setup and use
- modularity for queue storage and message transports (currently filesystem storage and curl-upload are implemented)
Gearman provides a generic application framework to farm out work to other machines or processes that are better suited to do the work. It allows you to do work in parallel,to load balance processing,and to call functions between languages.
ØMQ (also spelled ZeroMQ,0MQ or ZMQ) is a high-performance asynchronous messaging library aimed at use in scalable distributed or concurrent applications. It provides a message queue,but unlike message-oriented middleware,a ØMQ system can run without a dedicated message broker. The library is designed to have a familiar socket-style API.