what's up y'all this is Hussein Nasser from IGeometry where we discuss
software engineering by example today's topic is scalability and rest I got a
lot of question from you guys asking to explain why is wrist really scalable so
some of you read the Wikipedia article and it's just filled of theoretical
examples right so what we did what we do here and I geometries basically try to
come up with the concrete examples to illustrate this concept so let's get to
it how about that guys so yeah we're gonna take two examples to explain how
wrist is really scalable to two concrete examples hopefully so let's go back so
the first one let's go back in 2000 the year 2000 2005 of 2004 where the
client-server architecture was very popular so you would basically have your
database and let's say this is Oracle 11g right version 11 G right and then
you have you all your fancy clients here correct these are your Windows machine
or your Linux machine desktop clients back in 2004 this was a very popular
architecture maybe still used right so you have all these machines and then
those guys basically connect to the Oracle database this is some sort of a
LAN setup right so this is all of these exist in the same network essentially
and then you have this scales like this there's a lot of clients maybe 20 of
them maybe 30 I know there's a like an Oracle application in stolen or and in
each of them and let's say you build an application that basically connect to
the database and does something right so that you built an application and
desktop application and on top of that application there is obviously you would
need to talk to the Oracle right in order to do that you would need
the Oracle client so your client need to understand how to talk to the database
so you would need the correct Oracle client or and if you are raising
another database you need to for example sequel server you need the sequel server
client libraries kind of in your friends and in your project this is a very it
was a very popular at that time so let's say you would need Iraq or 11g client
live at the libraries right and that's your application and applications using
that and then you can store do stuff on your application like write records read
records and all that and all these guys basically do the same thing right so all
of them uses the Oracle client 11g and you can see the coupling here so not
only that everybody basically connects to this Oracle database so I say this is
a LAN so what is this is the original client-server architecture correct so
what is the problem with this design the problem is as you may have noticed like
what if now a few years later I want to upgrade my database and I heard that 12c
is the thing now so I want to upgrade to Oracle 12c but guess what that client
which our Oracle 11g client LED libraries are not compatible with Oracle
12c Oh main you have to go into each machine and then upgrade this client to
the Oracle 12c client right you have to go through each machine uninstall and
reinstall then you client so what this again this in a big enterprise this
could be like hundreds of machines this is Camargue this comes really
becomes really ugly and to a point that it's almost impossible to do right it's
almost very very hard to do because first you have to bring the database
down and you have to bring all these clients
on you can gradually upgrade one by one and this could take weeks in order to do
that so this could slash some more your time productive productive time and this
could really become really problematic so what do you do right there's there is
no solution you have to do it on by one and the problem was because the server
was tied to the client or the other way around the server is very very very
coupled to the client right because of this component that you have to install
on the client and that wear wrist came and okay said I'm going to do something
there representational state fault I'll forget permanent state transfer protocol
what it did is it says okay I'm gonna separate the concerns from the server of
a client the server is alone and the client is alone and there is one single
protocol that communicates you cannot use your own fancy protocol here like
this in this case where it requires coupling and certain libraries to be
installed in the actual machine in order to know how to connect to a database
right so what race did it says okay you can still have your Oracle 11g here but
you have to do is install a server on top of that could be the same machine
could be another machine it doesn't really matter right you have to do that
web server and then these guys you have to rewrite your application to not use
the the Oracle client libraries but instead to use pure beautiful ash data
bear that's what you do that's the separation of concern here and that's
how how rest is scalable in this scenario only right oh I'm not even
talking about stateless at all here and who now needs to understand how to talk
the best this guy needs to that's the only guy that needs to understand so
that you need to that Erico 11g client libraries only here okay and then
obviously there's the communication between the web server and the database
so what we do is like these guys this is like you could build a web application
essentially right and it could be a browser could be a desktop application
doesn't really stop you from doing it you can use this to application to
communicate through HTTP right and then all these guys connect to the web server
and then this web server connects to the Oracle database so why is this useful we
separated the server from the client kind right so there's this huge
separation there is a huge decoupling that we did now if I want to upgrade my
database guess what I only upgrade my database and guess what few servers
that's it right and you can basically create a testing environment here where
you replicate that thing right you can keep those as 11g you can basically make
the new environment 12c as a testing environment then you create replication
all these cool stuff and then once you're ready for production you
basically point all your guys to the new server and you retire the old server
just like that you you are really you scaled up right so this is this becomes
a very easy method of scalability the server can scale independently off the
client and the client can those guys can uninstall the windows and install a new
windows it doesn't really matter because it's the the communication is done at
the HTTP whereas here even the client is locked if your enterprise said
hey guys we want to try windows 10 so I thought I thought it's really cool but
it says oh I don't think we can do this because I don't think Oracle 11g client
libraries in is compatible with the Windows 10 so you run into all these
problems and weird scenarios right so all kind of couplings couplings is in
general bad I don't know how much time we left but I think I'm gonna leave the
second example for another episode where we talk about stateless guys there is
another video that I made comparing stateless versus stateful
architecture and that also allow high ability high availability and high
scalable solution so check out that video I'm gonna link it here it was a
really popular videos my channel doesn't have really most subscribers but people
were finding this video because they were searching stateless versus stateful
and I think we became really popular I think people really found it useful
alright guys that is all for me today I hope you enjoyed this video if you if
you are new to this channel consider subscribing I are on time to time I make
some examples like that we talk about software engineering by example here on
this channel alright guys stay awesome I'm gonna see
on the next one have a good day