what's up y'all this is Hussein Nasser from IGeometry hopefully I can give
you a decent audio here I'm wearing my earpiece we're here today in beautiful
Big Bear California today today I wanted to record a vlog a quick vlog to be
posted tomorrow I'll be Sunday reason is like usually on Sundays I I post the
archives for JavaScript series but this week I was so busy in getting crazy a
work so I didn't have chance to record a new episode for JavaScript so that's all
joyous for JavaScript I'm cranking up a lot of content for other kind of content
like JavaScript by example doing a lot of other vlogs too so yeah so just
wanted to do a quick vlog just to be posted on Sunday because every every
Sunday we have to have a video YouTube algorithm otherwise we'll get punished
so yeah so today's topic is I wanted to talk about it's actually very very very
important topic is about databases and networking and how clothes show your
client B to the database and by distance I mean here the network bandwidth to
your databases this is this is very important and I noticed a lot of people
architect on writing programs making a lot of mistakes in this aspect and the
reason is basically if you are a client and by client I mean someone who writes
reads to the database directly so your
database could be Oracle sequel server or Oscar s and traditionally these
relational databases was designed so they can run run in proximity with the
with a client itself so so so there are a lot of chattiness between the client
and database hey are you there keep alive acknowledgments buffering and so
many things yeah I even I don't know about right but I'm not a database it's
per se but I know that database all right guys I think I got disconnected
there for some reason I think the phone is very cold I don't know what's the
temperature air it's no really it's just early December but yeah so yeah what
we're talking about we're talking about that client has a lot of chattiness
between the database so having your client talk to the database over Wi-Fi
for instance will just degrade your performance to two pieces you know well
you you'll you'll feel the slow performance because of you know a number
of client number of requests going on left and right ECD connections right so
so what should you do in this case so a client should always be as close to the
database as possible but the problem is that we can't always guarantee that my
my database could be in a server somewhere right and in a cloud so this
this is the worst thing you can do put your database on the cloud and and
and your client on your laptop where you're connecting through different
hoops and switches to hit your database and that will just butcher the
performance right so what you do is is usually you
have some sort of a Citrix environments or Citrix is is as a as an application
the farm based application where you can install your application there and sits
very very near to the database it usually it's a one gigabit or ten
gigabits per second network directly connecting to the database and then
actual clients so that's a client right couldn't connect into the database but
it's a the center it's a server where you will remote kind of remote
connection to that citrus form and then you will use that that software but what
you do here is is you're way way far from that Citrix form and that's okay
because the communication between you as as a fan kind let's call yourself a fan
Klein mobile laptop or just surface Microsoft servers and your Citrix server
is very minimal you're just sending few bytes but the actual heavy lifting is
done at the database are we gonna wrap up real soon so that's what we just did
here is this is called a three-tier architecture where you put stuff push as
as deep as possible next to the database right right keep them at close as
possible some people put the database and application in the same server
although this might be sometimes bad because database and the application
shares the same resources and memory oh my god reason beautiful and what I want
to retire I want to retire
all right back I'm not gonna cut any of that it's just to see how difficult is
to record alright so yeah yeah so yeah yeah I want to retire this I want to buy
one of these houses there I just said they're right my novel
you know I don't know what it what it will be about but yeah all don't just
sit there you know just all right back to topic all right so that's another way
another another approach to this is using services
it's a beautiful architectural services architecture and obviously the micro
services architectures we can tackle and another topic maybe another vlog but
yeah so push your service the actual service very close to the database so
they can communicate with each other but but the client makes a small risk
request hey give me all my users so that's just slash server name slash get
users or user slash one that's like a Twitter API right and then what happens
is you literally send that small small packet of requests right very cheaply
sent the server and it doesn't matter if you're like across the globe well
doesn't matter a little bit but it's like the closest the better but it
doesn't it's not as chatty as between the database on getting the users all
those sounds like just a this is a query give me the database or give me the
users but it's more than like that right you have to you have an open connection
or close the connection if you if you have if you don't want to use the
persistent model so a lot of topics to discuss here but I just want to discuss
this the database proximity three tiers and Citrix environments services
and the idea that the ER database should be very close to your client sorry for
the hair sir guys all right guys that was a quick vlog about this topic hope
you enjoyed it I'll guys see you in the next one good
bye don't forget to subscribe click here I think it'll be here or here I'm not
sure subscribe like this video it means a lot so keeps me going
alright guys before I froze to death signing out