算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
serpapi-reference-architecture【设计与创意】Design a governed SerpAPI search service with engine adapters, policy enforcement, caching, capacity management, observability, and privacy boundaries. Use when conducting architecture review. Trigger with "design a SerpAPI architecture".
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Place SerpAPI behind an application boundary that controls identity, parameters, data, allowance, and failure behavior for every engine.
Use Read, Glob, and Grep to ground the design in repository and infrastructure topology, WebFetch to verify current vendor contracts, and Write or Edit for diagrams, decision records, interfaces, threat models, and rollout evidence.
SerpAPI has engine-specific requests and variable response sections, private-key authentication, account-level search and throughput capacity, optional async/archive processing, one-hour exact-query server caching, and Enterprise ZeroTrace. Async depends on archive retrieval, while ZeroTrace intentionally prevents stored search records.
Keep SERPAPI_KEY in a server-side secret boundary. Authenticate application callers independently and enforce use-case authorization before the gateway maps input to allowlisted vendor parameters.
Do not provision infrastructure, expose routes, create secrets, enable account features, or send production searches from an architecture exercise.
Return context and container diagrams, trust/data flows, gateway and adapter contracts, cache/capacity design, privacy decision, failure model, test/rollout plan, risks, and decision owners.
| Condition | Response |
|---|---|
| Gateway is a generic parameter pass-through | Replace it with use-case schemas and allowlists. |
| Capacity is managed per instance only | Add shared admission control across credential-sharing workers. |
| ZeroTrace path requires replay | Redesign the diagnostic and recovery model. |
| Search results become a system of record | Define provenance, refresh, deletion, and reconciliation explicitly. |
caller -> authenticated policy gateway -> engine adapter -> capacity limiter -> SerpAPI
\-> semantic cache
search metadata -> redacted telemetry; normalized results -> governed consumer
Validate the design with security, product, finance, and reliability owners before creating an implementation tranche.