-: In the last section,
we spoke about some big issues
that kind of came up as we were going
through a single container deployment.
In this section, we're gonna start talking about
the application that we're gonna make,
to give you more experience
on building a multi-container application.
So, one application that uses many different containers
or many different services,
to achieve whatever its goal is.
Now, to show you what we're gonna build,
I wanna first give you a very quick overview
on a side topic.
So, this right here is a diagram
of the Fibonacci sequence.
The Fibonacci sequence is a sort of, computer science topic.
You'll see this very commonly come up in computer science
or programming interviews.
The Fibonacci sequence is a series of numbers.
So, the sequence goes 1, 1, 2, 3, 5, 8, 13, 21, and so on.
So, it continues on much further than this.
Any value, or any index inside the Fibonacci sequence
can be calculated by taking the previous two values
and adding them together.
So, for example, to calculate this value right here,
we will look at the previous two values of, 1 and 2.
If you add together 1 and 2, that gives you 3.
And so, that gives us the next value in the sequence.
Then to calculate the next value,
we would do, 2 plus 3,
add those together and you get 5.
The next value would be 3 plus 5, that gives you 8.
5 plus 8 gives you 13, 8 plus 13 gives you 21, and so on.
In a computer science or a programming interview,
a very common question that you might get is,
write a function that calculates the Fibonacci value
at a particular index.
So, for example, if I asked you to give me the value
of the Fibonacci sequence at index 7,
you would have to calculate the number 21.
And if I asked you to give me the value at index 5,
you would need to calculate 8, and so on.
So, the application that you and I are going to be making
is essentially going to be a
fancy Fibonacci sequence calculator.
And we're going to build this, in a just,
absolutely over-the-top complicated fashion.
You could absolutely build a function, like,
just three or four lines of code
that will calculate any number in the Fibonacci sequence.
But again, to give you an example of a
multi-container deployment,
we're going to make a crazy, crazy, over-the-top,
way overcomplicated version of a Fibonacci calculator.
Just to give you more experience
with a multi-container deployment.
All right.
So, let's take a look at the mock-up for our application.
All right. So, here's the app right here.
We're going to present the user
with a little form at the top, that's gonna ask them
what index they want us to calculate.
So, for example,
a user might enter in right here 7,
and then they would click on submit.
When the user clicks on submit,
we're gonna take that index
and then we're gonna have some,
back-end processes or some servers
that's going to calculate
the Fibonacci value at index 7.
And so eventually, our application for index 7,
will need to calculate out the value 21.
After the user submits that number right there,
we would add the number 7 onto this list of indices
that our application has seen.
So, I would expect to see 7 added on there,
and then we should eventually also
calculate the appropriate value for index 7.
And so eventually,
I should see some line entry here of,
for index 7, I calculated 21, like so.
All right. So, that's the application,
essentially a fancy Fibonacci calculator.
And again, we're gonna make this just,
over-the-top complicated,
way more complicated than it needs to be,
to give you a good example of a multi-container deployment.
Now, the reason that we're doing a
Fibonacci calculator here, as opposed to like,
a blog, or like a Twitter application,
or something like that,
is that I didn't want you to have to focus on
the actual application implementation details.
I didn't want you to have to worry about
learning JavaScript, or learning authentication,
or any of that stuff.
And I just wanted you to be able to focus
a hundred percent on the
docker and deployment side of things.
And so, that's why we are using a rather, kind of,
simplistic topic here as a subject of our application.
Now, let's take a quick pause right here.
Now that we've got a better idea
of the application that we're gonna make,
we'll come back to the next section,
and we'll start talking about the overall architecture
of this application.
So, another quick break,
and I'll see you in just a moment.