Welcome to 'This is My Architecture.'
I'm Don, and I'm joined by Emily with PureWeb.
Hi Don. Hi.
Tell us a little bit about PureWeb.
So PureWeb allows developers to distribute 3D immersive experiences.
And the really cool thing is that their end users
can view those experiences in browsers.
So they never have to download or install anything,
and they can view them on any device from anywhere in the world.
Right, that sounds very frictionless.
Do you wanna walk us through the architecture?
Yeah, sure.
So the end user is going to have their web browser open.
And they're going to connect to some kind of experience.
So it could be something like an architecture walkthrough for a house,
it could be something like a product configurator,
or even a virtual event.
So they're in their web browser,
and they press the big button.
And the moment they do that,
we're going to send a request to our REST API Gateway.
And that is going to include all of the details
about the project and the model that we want to launch,
as well as any details that the system will need to get that game up and running.
And any other information that it will need
to be able to connect back to the user at the very end.
Okay, so how did the Lambdas play into this?
So once we've made that request to the API Gateway,
we've got a little bit of work to do.
So we're going to go through a couple of Lambdas.
The first one is we're going to send it to regional routing.
So this includes things like the latency, where you are in the world,
as well as the system load.
So if you're in an area that has really high load right, now,
it might be better to send you somewhere further away,
and to direct your launch to run somewhere further away.
It also includes things like project specifications.
So certain projects run really well, on certain kinds of backends,
and others run better on other backends.
So we're going to take all of those decisions and try and make a choice
about the best virtual resources to handle this request.
After we've made that decision,
we're going to move on to another Lambda, called the virtual connection Lambda.
So each of these groups of virtual resources,
whether it's a region or a particular project configuration type,
they're all going to be fronted by a Fargate cluster.
And this Lambda has the information required
to communicate with that Fargate cluster.
So we are using a second API Gateway,
but this one is WebSocket.
That allows us to go back and forth between the two.
So the cluster can give us updates about how the system is doing,
what models are running, what the load is like.
And we can give it requests to launch certain games.
Okay, so essentially, the Fargate cluster here is representative of kind of the brain of the system,
specific to a region.
Exactly.
And so when this request comes in,
what's the next step as far as virtual resources as you described it?
So I'm assuming that EC2 is going to be the next step?
Yeah, exactly.
So we've got a whole bunch of EC2 nodes that are gonna be running in the back.
Those are auto-scaling up and down based on load.
And once Fargate gets our request,
it's going to attempt to find us an EC2 instance, that will work for our launch.
So on startup, the EC2 instance
will register itself in ElastiCache
and say, "Hey, I'm online, I'm able to run these kinds of models."
And Fargate will check that cache to see if we have an instance that's a good fit.
Once it's found one, it will send our launch details to that cluster.
Okay. So essentially, this is your control plane,
if you need new resources, those resources can be allocated,
they register themselves,
you can reuse those resources as sessions in.
And then where does S3 come into play?
So there are a couple of things on the EC2 instance.
So first, we have the service manager.
It's responsible for everything that's running in the instance,
as well as responsible for registering an ElastiCache.
And on startup, the service manager is going to go out to S3
and grab any game binaries or other resources
that it's going to need to run these launches.
Once our launch request has hit the instance,
the service manager will be responsible for starting up
that game that we pulled from S3.
Now I also mentioned at the beginning,
that the launch request includes some details about how to get back to the end user.
That's a second microservice that we're also going to start up.
So this one is the game and this one is the streaming agent.
The streaming agent is able to talk to the game.
It's also able to go all the way back around,
and talk to that browser.
Once it's got both in communication,
it can set up a WebRTC stream,
and you've got your game.
Excellent. So a couple of observations,
everything over to the right here, virtualization,
you can change up your whatever, whether it's EC2 instances,
or Fargate cluster, anything could be on this other side.
And also the ability to have different games or different modules.
Models that can be part of this architecture
to extend it beyond the current experience.
Yeah, for sure.
So the power of using this Fargate cluster talking over the WebSocket,
is that we can build out a virtualization back end
that runs on EC2 or ECS, or any other service.
And as long as we have this Fargate cluster that's able to talk back with the rest of the system,
we can swap them out based on different project needs.
We also have the ability to, to have more than just games running.
So the streaming agent is kind of the representative for the game.
And the browser is the representative for the user.
But you can imagine that you could have all kinds of different representatives
joining into the same collaborative environment,
making contributions, talking with one another.
So you could have an IoT device,
you could have AI or a chatbot.
And that makes the system really powerful.
Beyond just streaming a game, you could do things like digital twins.
And there are a lot of really cool use cases that we see our customers using.
Excellent.
This is a very innovative architecture.
Thanks for showing us the control plane,
the ability to dynamically allocate resources and locate resources,
the abstraction that you've created here with your resource groups,
and your virtual resources, very impressive.
And the ability to extend the models and the agents
that you can actually have collaborating in this environment.
Thank you for joining us.
Thank you.
And thank you for watching 'This is My Architecture.'