That's that sounds like it sounds like, if it's crashing your app. It sounds like you're having some sort of accessing an object that isn't initialized. And so, yeah.
Okay, let's, let's go ahead and start recording.
Okay. Good morning, folks.
We are getting started here which is, you know, answering questions for, you know, for class started.
We're sitting here April six next the last class last class is on April eight.
Today I promised to talk about networking and so that is my plan right now to talk about networking and just ending a poll here. Let's see what the results are.
So the results seem to say that about half of you are well.
1212 of you are done, nine of you are not, but there's only 21 people answering and there's about double that number in the class. So what's a little concerning, um, I will say, today I want to get the tutorials checked off.
Would it be helpful if I had, if I had some special office hours this evening, sometime.
Okay.
I should be able to have.
Yeah, I can do, I can do some office hours like later in the evening like seven or eight or something.
So,
so I will set so I will.
Are you today.
teams
to more tests,
which
would it be better for me to have check off for tomorrow.
I the one thing is I don't want to have it. Basically I mean, you gotta finish your assignment. So, that's actually more of your grade than the tutorial.
So
I kind of want you to need to finish your, your tutorials, then you can finish your assignment. So now I'm not gonna do it tonight. You see that day if it's enough of a deadline.
So, I'm so today I'm planning on doing check offs for people who are, you know, after I'm done talking, but always plan on talking about today was networking so funny you say, but your internet went down, so.
So, um,
so today I want to talk about networking and the internet and kind of trying to connect it to mobile apps because of course, modern mobile apps are mostly nothing unless they're connected I mean yeah standalone games and I think most of the other things
we do with these apps tends to be talking to other computers.
So, how am I gonna cure it.
Let's see, do I actually am kind of curious about this stop sharing I'm going to do the show results I stop sharing that's enough.
Uh, I doing this is an unusual.
Okay, see no more.
Okay.
Let's launch that poll.
Just curious to see how you all are kicking ass here.
Oh, you can't do our ID menu button set text because our ID is a number, you have to do a find by.
Find something by ID, you know, find my idea. So, nor to get the actual object.
Yeah, look at all the code does it can do stuff with just the, I think.
Ok.
Ok so I'm getting all of these you know an IP address but the rest is kind of in.
So that's fine. I'm just more just trying to get up. So, you all know when you all seem to know what an IP addresses.
So what is an IP address.
want to tell you what IP addresses.
So, numbers.
Numbers identify you know you know you see cation happens.
Source
source.
So, I appeared, computers on the internet identified by. Yeah.
So identifies the source and the destination of a computer.
When you're doing communication on the internet because it makes sense.
You want to identify something use numbers, but.
So, when we talk about IP addresses, what we're actually talking about is a.
Let's see if I can find.
Oh, do they actually have a have a thing here let's see I'm just curious to have a nice, but these are.
So typically, when we talk about pockets.
There's some nice diagrams here.
You see this is all.
So we can go
boom can it. So when we talk about what's being sent on in a packet is, you have some number of bytes and we have this arranged. It's arranged in a, you know, this is kind of a funny way, because this is up in terms of number of bits.
But this is a typically supposed to be a fixed length header.
And so you see this 31 bits so I guess that's that's four 812 16 2024 bytes.
And then the rest of it is the payload of a packet so.
so.
classic example for this as opposed is a postcard. So you think of a postcard on the front of it. It has a from a dress in a to address in the back of it, you have some sort of information, maybe you're writing a note to your friend or whatever.
That's, you know what is, although actually.
Actually, that doesn't actually work because the front is actually a picture
postcard with the header being the
address.
So, you think of your network communications, as these. They say the class metaphors these postcards funny these people don't send postcards anymore, but I think most of you know what it is is this piece of paper with, you know, there's a, what was it
from who's the two, And then there's some information in it but the.
It's a postcard not a letter because the information is in public. It's an S exposed to whoever handles it. There is no like, oh this is a novel stuff insights private know it's just there.
No, it's just there. If you want to you're going to, if you want to make it private you're going to have to encode the information on the postcard.
So you have anyone seen The Shawshank Redemption.
I'll see the postcard at the end like it sent me just doesn't have much information on it, but it's encoded so they know what it means.
Actually, yeah definitely millions to billions.
So this is my question now so I'm saying this communication that's happening between all of our computers, there are all these postcards flying around.
And my question is do they all arrive.
And the answer is no.
So when you do.
Modern networking, it's mostly best effort.
It's not.
It's best effort, meaning that for a number of reasons packets can get damaged or dropped on the floor or whatever, they won't get their final destination so if you want reliable communication.
You have to build on top.
us.
There's like the Wi Fi standards are actually 802 11.
Something else that I Tripoli things. There's wired Ethernet.
There's also.
There's actually a very famous April Fool's request for comments. So the internet is built on these documents called RFC, or request for comments and there is a famous request for comment that says internet IP packet transmission via carrier pigeon.
So.
So, if you can speak the Internet Protocol, you can communicate on the internet, by any means, smoke signals carrier pigeons whatever a wired Ethernet Wi Fi, the technology for transmitting the package packets does not matter, except for the speed and
reliability of it but it's still, it will send data.
What makes it allow all these things to talk together is the Internet Protocol IP it's the thing that unifies all of it. So it all these things you have.
So there are protocols always a for.
When people talk about TCP, you've probably heard the term TCP TCP is a.
So when you communicate between two programs, you're normally transmitting via you're talking via TCP and TCP is a protocol built on top of IP and the purpose is to allow for provide reliable transport of information, because you know your packet might
have gotten lost and if you just wanted to send a stream of bytes, this is you know you divided up into 10 pockets.
Only none of them arrived and those nine arrived in a jumbled water.
You know, if you did that with just the IP protocol you're going wrong this isn't quite the information I want and you order it TCP does this and says, Oh you lost packet 10 I'll resend it and all these other packets or the wrong word so let me read shuffle
them, and then your program just sees this nice continuous stream of bytes.
web browser web server talk HTTP.
There's more layers to this, if you're talking about how things actually work.
Go study electrical and computer engineering to see how you know actually get wires to send bits and such. I'm a software guy. I don't think about that stuff, but we, the lowest level stuff, you'll see is either sort of like internet or Wi Fi Wi Fi actually
mostly looks like he's in that with some extra bits of the software level that's used to communicate IP which is used TCP which are used to communicate HTTP, HTTPS is just encrypted HTTP up.
This is what when we talk about
Is that right, Dr Roscoe dolls.
You all know these dolls right.
One that fit your small doll that fits in one that fits in the other that fits in the other that's the other. That's exactly what you're doing with.
Oh, they are classically Russia, yes.
Oh yeah, I was so, so literally a packet is a.
Yeah.
We also use a calculation of encapsulation encapsulation is used all over the place. Yes.
But, but the idea is that literally one is inside the other inside the other and in fact.
So yeah, so there's all this.
Literally different parts of the system have to understand these different parts of things so
one key idea with a modern computers.
So, the idea of a port is.
individual computers identified by IP addresses the programs on those computers identified by ports. So, different programs, you know, because it's abstracted away, the idea of a port, you can have different programs do prolific listening on the same
port at different times, depends up. But when the data comes in and it goes okay here's this packets which program gets it, you, it knows based on which port is there in the packet, it says, Oh, it's for this one.
And these ports.
Oh.
So this idea of a low number port.
Less than 1024.
They can only be used by privilege program so if you see a port number that's higher than that it's by dynamically allocated. Someone got it. But these lower number ports are supposed are well known and this only supposed to be associated with certain
privilege ports.
Yeah, so we normally connect to a server mirror also computers on the internet were originally designed to be multi user systems. So, in fact, and of course, in the cloud, they definitely are.
So when you connect to a server you're connecting to it on a well known port.
So, so like there's a couple of
at.
just important I know off the top of my head. So anyone know what these ports are
not looking them up.
Hope connection No, this is.
So.
so here's a weird thing about the history of networking.
And I'm probably going to, unless there are questions I'll probably stop after this, because I, I could keep talking for a long time but I know you all have your brains fallen you have checked off to do, but
every. You might think, I mean, there's, if you go look up you'll find all kinds of protocols.
If you look up the well known ports.
Most of those are not used so much because increasingly we made protocols that go over web basically go over port at a port for 43 in one form or another.
The reason why this.
It's a stupid story.
The real thing is, if you look at these other ports, if you learn a concept called remote procedure calls, which are allow one program to call another program another computer in a rather seamless way.
Old Style internet protocols are built using a lot of RPC.
They were very easy to write, they were very insecure.
And so there was a lot of problems they were exploited widely and so we put in firewalls which block network connection. But they only block things on unknown ports and they block, most of them except for, except for web traffic because you have to let
web traffic through.
And then, so now we do everything over HTTP and now we need web firewalls to block some of that stuff and it's just
so anyway.
We live in a world right now where this is kind of what's happened it's not a. It's not a question of what would be better or worse, this is what we're stuck with, because now I do think limiting the number of the ports on which programs can access your
network.
I mean, yeah, you're going to have to live who's talking over here in here. Who can communicate with your my computer right here could in principle talk to any computer in the world, and talk to it really fast because I have a gigabit connection here.
So, you know, kind of disarming a walk down.
But anyway, Yeah, it's a, it's a mess.
But I'm, I can if you have people explicit Oh, I, Sorry, I forgot one thing I gotta say.
That's all it is.
It's a higher goal, distributed database really, it's really cool how it works. It's got some really neat scalability features and some neat fault tolerance things and stuff, because it's not controlled by any one entity and stuff it's, it's a pretty
neat thing but that's the set of servers, which translate domain names into IP addresses.
with opening up ports will give you an advantages. The main advantage it would give is would make it easier to do non web protocols.
That would be, but I think that ship is mostly sale at this point.
Okay.
I could explain our DNS works but I think we'll move on.
And