- 授权协议: MIT
- 开发语言: ErLang
- 操作系统: 跨平台
- 软件首页: https://github.com/g-andrade/maestro
软件介绍
maestro 是 Erlang 池管理程序。
为什么?
短暂 I/O 任务(比如数据库访问)的大型 worker 池会因为太多迁入和迁出活动而拖垮单个 poolboy 管理器。
怎样做?
使用简单的方法,启动多个池;随机迁出。maestro 需要了解每个池的工作流,当每个池都是同一类型的加载模式时,将会提升复杂性,降低性能,没有什么明显的优势。
使用:
MaestroName = many_pools,
Conf = [% maestro options
{name, MaestroName},
{pool_module, poolboy},
{pool_count, 3},
{use_named_pools, false},
% poolboy options
{worker_module, fabulous_worker},
{size, 100},
{max_overflow, 50}],
{ok, _} = maestro:start(Conf),
{SomePool, Worker1} = maestro:checkout(MaestroName),
thing_done = gen_server:call(Worker1, do_your_thing),
ok = maestro:pool_checkin(SomePool, Worker1),
also_done = maestro:transaction(
MaestroName,
fun (Worker) -> gen_server:call(Worker, do_your_other_thing) end),
ok = maestro:stop(MaestroName).
Pragmatic Thinking and Learning
Andy Hunt / The Pragmatic Bookshelf / 2008 / USD 34.95
In this title: together we'll journey together through bits of cognitive and neuroscience, learning and behavioral theory; you'll discover some surprising aspects of how our brains work; and, see how ......一起来看看 《Pragmatic Thinking and Learning》 这本书的介绍吧!
