π Tab Pooling β Legacy (Under Review) β
β οΈ IMPORTANT: Tab Pooling is currently under review and may become legacy.
We strongly recommend using the official Tabs API instead for multi-tab management.
Tab Pooling will be maintained for backward compatibility but new features will not be added.
β οΈ Status: Under Review / Legacy Candidate β
| Aspect | Status |
|---|---|
| Recommended replacement | tabs API |
| Maintenance | β Bug fixes only |
| New features | β No |
| Deprecation planned | Possibly in v0.2.0 |
Why? The official tabs API is simpler, more flexible, and covers all use cases that Tab Pooling was designed for. Use tabs.new(), tabs.list(), and tabs.close() instead.
Overview (Legacy) β
Tab pooling was originally designed to give each site a pool of tabs for concurrent requests. However, the official Tabs API now provides a cleaner, more explicit way to manage multiple tabs.
ts
// β Legacy approach (not recommended)
await piggy.register("amazon", "https://amazon.com", { pool: 4 });
// β
Recommended approach
const tabs = await Promise.all([
piggy.tabs.new(),
piggy.tabs.new(),
piggy.tabs.new(),
piggy.tabs.new()
]);Migration Guide β
Instead of { pool: N }, use explicit tabs: β
ts
// Old (pooling)
await piggy.register("amazon", "https://amazon.com", { pool: 4 });
await piggy.amazon.api("/search", handler); // automatically pooled
// New (explicit tabs)
await piggy.register("amazon", "https://amazon.com");
const tabs = await Promise.all(Array(4).fill().map(() => piggy.tabs.new()));
// Use tabs directly
await piggy.amazon.navigate("https://amazon.com", tabs[0]);
await piggy.amazon.navigate("https://amazon.com", tabs[1]);
// ...If You Must Use It (Legacy) β
ts
// β οΈ Not recommended for new code
await piggy.register("amazon", "https://amazon.com", { pool: 3 });
// Check pool status (still works)
const stats = amazon.poolStats();
// { idle: 2, busy: 1, queued: 0, total: 3 }But please migrate to tabs API.
Next Steps β
- Tabs API (Recommended) β Official multi-tab management
- Multi-Site Parallel β Multiple sites, not multiple tabs
- API Server β Build APIs with explicit tab control
Nothing Ecosystem Β· Ernest Tech House Β· Kenya Β· 2026