- 授权协议: Apache
- 开发语言: Java
- 操作系统: 跨平台
- 软件首页: https://github.com/gresrun/jesque
- 软件文档: https://github.com/gresrun/jesque
软件介绍
jesque 是 Resque 的Java语言实现版。
使用示例:
// Configuration
final Config config = new ConfigBuilder().build();
// Add a job to the queue
final Job job = new Job("TestAction",
new Object[]{ 1, 2.3, true, "test", Arrays.asList("inner", 4.5)});
final Client client = new ClientImpl(config);
client.enqueue("foo", job);
client.end();
// Add a job to the delayed queue
final Job job = new Job("TestAction",
new Object[]{ 1, 2.3, true, "test", Arrays.asList("inner", 4.5)});
final long delay = 10; // in seconds
final long future = System.currentTimeMillis() + (delay * 1000); // timestamp
final Client client = new ClientImpl(config);
client.delayedEnqueue("fooDelay", job, future);
client.end();
// Start a worker to run jobs from the queue
final Worker worker = new WorkerImpl(config,
Arrays.asList("foo"), new MapBasedJobFactory(map(entry("TestAction", TestAction.class))));
final Thread workerThread = new Thread(worker);
workerThread.start();
// Wait a few secs then shutdown
try { Thread.sleep((delay * 1000) + 5000); } catch (Exception e){} // Give ourselves time to process
worker.end(true);
try { workerThread.join(); } catch (Exception e){ e.printStackTrace(); }高性能Python
(美)戈雷利克、(英)欧日沃尔德 / 东南大学出版社 / 2015-2
你的Python代码也许运行正确,但是你需要运行得更快速。通过探讨隐藏在设计备选方案中的基础理论,戈雷利克和欧日沃尔德编著的《高性能Python》将帮助你更深入地理解Python的实现。你将了解如何定位性能瓶颈,从而显著提升高数据流量程序中的代码执行效率。 你该如何利用多核架构和集群?或者你该如何搭建一个可以自由伸缩而不会影响可靠性的系统?有经验的Python程序员将会学习到这类问题的具体解......一起来看看 《高性能Python》 这本书的介绍吧!
