Chapter 4. AI Architectures for Applications
Unlike traditional applications, AI-powered systems introduce new challenges in data handling, model integration, security, and performance. Developers must integrate new components and patterns like RAG, vector databases, function-calling agents, and dynamic caching. For an experienced Java developer, the concepts of access control, discovery, and data pipelines are not new. You have spent years applying these principles to build secure, scalable, and reliable systems.
We are going to take a deeper look at what it means to apply these same enterprise patterns to our new set of resources: models, prompts, and data. This chapter examines the core architectural elements of AI-infused applications and the factors developers need to address when they want to implement these elements.
Beyond Traditional Architectures: Why AI-Infused Systems Require a New Approach
Building enterprise applications that use AI is not about adding a new library or calling a different API. The process requires a shift in thinking. While the principles of good software design, modularity, scalability, and maintainability still apply, AI-infused systems introduce new challenges that need to be addressed via different perspectives and slightly adapted solutions. Traditional architectures, built for deterministic logic, are often not equipped to handle the probabilistic and data-centric nature of AI-infused applications. This has significant implications for the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access