I asked chat GPT to design an architecture diagram
for a web application this is what it created. This made me think about the future of solutions
architecture, and how AI can make Architects more productive. By now, we know that AI can
code. We also know that programmers are not being replaced by LLMs. We've been talking a lot
about coding automation and software development disruption by AI, but I didn't read much about
the impact on design and architecture of systems and applications. This doesn't mean that solution
architects are immune to AI disruption. I did an experiment with ChatGPT-4. I started with
a basic high level requirements prompt: Design a simple architecture for an analytics
dashboard Web application, where the front end is built with React.js, backend is microservices
based, and the database is PostgreSQL. I was pleased by the answer for the front end it
suggested using rest APIs or GraphQL, Redux, and even D3 and Chart.js. For the back end
it's recommended each microservice have its own schema within the database which is good advice.
However, using MQTT is not the database should only be accessed via the backend microservices
good then it continues with some other useful stuff like an API Gateway security logging and
monitoring it even explains how the flow works that's nice then I wanted to generate a diagram
for this architecture diagrams is an awesome python package that lets you draw architecture
diagrams with code you should check it out ChatGPT knows how to generate diagrams code copy and run
the code this is the generated diagram what's interesting is that ChatGPT made some opinionated
architecture decisions and choices like using an API Gateway and running Services inside Docker
containers without Kubernetes I asked it to refine the architecture by specifying that the
back end is composed of two microservices users management and data analytics the analytics
service should be fast and use caching Notice the choice of Redis for caching. I am not
sure about the combination of a load balancer and API Gateway. Let's see what ChatGPT thinks
about this. Good thinking. We can just use a load balancer but we lose some API Gateway features
that must be implemented within each service now let's see what this looks like in AWS it basically
replaced the different components by AWS specific products I did some tweaking removed the load
balancer and added a database replica this looks nice as the first draft iteration of a high
level architecture I finally asked ChatGPT to tell me the pros and cons of this architecture it was
thorough enough someone could definitely include this in an official architecture document it would
be a big productivity gain let's tell it in new information and see how it could help minimize
cost huh yes Lambda but it also proposed other interesting ideas I wasn't thinking about here is
the updated diagram sure Hallucination is an issue ChatGPT tried to import the imaginary libraries
and confidently generated some strange surrealist architectures now what if Cloud providers like
AWS Google cloud and Azure provided LLM-based assistance to help Architects design Solutions
these Cloud providers have access to hundreds of solutions Architects and architecture diagrams
and documents that they can use to fine-tune LLMs with human labeled data GCP released last
year an architecture diagramming tool that helps Architects build on top of reference architecture
templates I think that we'll see generative AI integrated in such tools very soon these
smart assistants will help Architects navigate options fine-tune ideas and select the best
products and solutions for the requirements but I also think that that is just the beginning
of how we think design and Implement software applications and systems. I Envision a future
where autonomous agents will be able to gather requirement architect Solutions Design Systems
code deploy and maintain them autonomously without human intervention I think that we
may also see AI building and maintaining and evolving architectures on the fly a simple example
could be an AI deciding to migrate a microservice from container to serverless Lambda function
because it noticed that it is scarcely used and that this modification will save cost without
impacting performance this is not too far-fetched I think it is possible and necessary to create
Auto-Adaptive Architectures. We will have to carefully think about how to box and control such
AI, certainly. But I think they are inevitable. [Music]