How should I abstract the LLM provider (Ollama → Bedrock/OpenAI)?
Build one narrow complete(prompt, opts) interface with three implementations picked by config, and treat context window, latency and cost as config.
Just Ask
Ask me anything about software architecture, careers, PHP, Go and the craft of building software; I answer here, in the open, for everyone. (Page 8/8)
Whatever's on your mind, don't hold back. Questions reach me directly; I answer the good ones and publish them on this page. Your email is never published.
Build one narrow complete(prompt, opts) interface with three implementations picked by config, and treat context window, latency and cost as config.
Don't make EFS the interim step; switch to a Flysystem s3 disk, route reads and writes via Storage::disk(), and migrate with dual-read for zero downtime.
For heavy Laravel-Go traffic pick Protobuf plus a schema registry, keep JSON Schema for light traffic, and deserialize into a typed DTO at the boundary.
Turn on Fluent Bit's filesystem buffer first; move to Kafka once 40k/s is permanent, and keep a Redis list only for logs you can afford to lose.