Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Generates Object Pool pattern for PHP 8.5. Creates reusable object containers for expensive resources like connections. Includes unit tests.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Creates Object Pool pattern infrastructure for managing reusable expensive objects.
| Scenario | Example |
|---|---|
| Expensive creation | Database connections |
| Limited resources | HTTP client handles |
| Connection reuse | Socket connections |
| Memory management | Large object caching |
Path: src/Infrastructure/Pool/
PoolInterface.php — Generic pool contract with acquire/releasePoolConfig.php — Configuration value object (min/max size, timeouts)PoolableInterface.php — Contract for poolable objects (reset, isValid, close)ObjectPool.php — Generic pool implementationPooledObject.php — Wrapper tracking usage metricsPoolExhaustedException.php — Exception for exhausted poolInvalidPoolObjectException.php — Exception for invalid objectsPath: src/Infrastructure/{Domain}/
{Type}Pool.php — Specialized pool (ConnectionPool, HttpClientPool)Poolable{Type}.php — Poolable implementation for specific resourcePath: tests/Unit/Infrastructure/Pool/
ObjectPoolTest.php — Core pool functionality tests{Type}PoolTest.php — Specialized pool tests| Component | Path |
|---|---|
| Pool Interface | src/Infrastructure/Pool/ |
| Pool Implementation | src/Infrastructure/Pool/ |
| Specialized Pools | src/Infrastructure/{Domain}/ |
| Unit Tests | tests/Unit/Infrastructure/Pool/ |
| Component | Pattern | Example |
|---|---|---|
| Interface | PoolInterface | PoolInterface |
| Implementation | ObjectPool | ObjectPool |
| Poolable Interface | PoolableInterface | PoolableInterface |
| Config | PoolConfig | PoolConfig |
| Wrapper | PooledObject | PooledObject |
| Specialized Pool | {Type}Pool | ConnectionPool |
| Test | {ClassName}Test | ObjectPoolTest |
/**
* @template T
*/
interface PoolInterface
{
/** @return T */
public function acquire(): mixed;
/** @param T $object */
public function release(mixed $object): void;
public function getAvailableCount(): int;
public function getActiveCount(): int;
public function getMaxSize(): int;
public function clear(): void;
}
interface PoolableInterface
{
public function reset(): void;
public function isValid(): bool;
public function close(): void;
}
final readonly class PoolConfig
{
public function __construct(
public int $minSize = 0,
public int $maxSize = 10,
public int $maxWaitTimeMs = 5000,
public int $idleTimeoutSeconds = 300,
public bool $validateOnAcquire = true,
public bool $validateOnRelease = false
);
public static function default(): self;
public static function forDatabase(): self;
public static function forHttpClients(): self;
}
// Create pool
$pool = new ObjectPool(
name: 'database',
factory: fn() => $connectionFactory->create(),
config: PoolConfig::forDatabase(),
logger: $logger
);
// Acquire and release
$connection = $pool->acquire();
try {
$result = $connection->query('SELECT ...');
} finally {
$pool->release($connection);
}
// Or use helper
$result = $connectionPool->execute(fn($conn) => $conn->query('SELECT ...'));
| Anti-pattern | Problem | Solution |
|---|---|---|
| No Validation | Returning broken objects | Validate on acquire |
| No Reset | State leaks between uses | Call reset() on release |
| No Timeout | Infinite wait | Set maxWaitTime |
| Unbounded Pool | Memory exhaustion | Set maxSize |
| Not Releasing | Pool exhaustion | Use try/finally |
| Wrong Scope | Per-request pools | Use singleton/shared pool |
For complete PHP templates and examples, see:
references/templates.md — All component templatesreferences/examples.md — ConnectionPool, HttpClientPool examples and tests아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Master backend architectures, REST API design, microservices, and server-side development across multiple languages. Use this as a central index to access specialized sub-skills.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
在每次回复中使用固定前缀并列出本次实际参考的指令/文件,便于校验是否遵循上下文与规则。
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Automate 21risk tasks via Rube MCP (Composio). Always search tools first for current schemas.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Automate 2chat tasks via Rube MCP (Composio). Always search tools first for current schemas.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
[00] META. Orchestrate skills into dynamic chains for complex tasks. Analyzes the task, discovers available skills, builds an optimal chain, explains why each skill is needed, and executes step-by-step with user confirmation. Use for any complex task requiring multiple thinking/research/analysis steps. Triggers on "plan this", "how to approach", "what's the strategy", "build a plan", or any multi-step problem requiring skill orchestration.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.