Live data from Hacker News

Understanding IP, TCP, and HTTP

objc.io

51–60 of 62 posts

Re: Understanding IP, TCP, and HTTP

#51

If you want to learn about IP, TCP, UDP and some of the protocols below this I would highly recommend reading Richard Stevens book TCP/IP Illustrated, Volume 1: The Protocols. For two reasons: It's probably one of the best introductions to the subject that has ever been written, and it's a model example of how a technical book should be written. I'd be hard pressed to find a reason not to go this route at least once…

"I'd be hard pressed to find a reason not to go this route at least once in your life. I know the material pretty well but I still re-read Stevens books every few years just because it is so good."

Then again, that's a lot of effort to spend on something that the vast majority of us don't need to know in much detail. The main reasons for knowing all the details are

- to write a new networking stack, or working on an existing one;

- to write or maintain server software or routers or caches or other software directly involved in networking;

- to break or exploit existing software.

(obviously 'because it's interesting' is a valid, but not practical reason to know)

Re: Understanding IP, TCP, and HTTP

#52

Earlier quoted context omitted.

It's the way I learn, too.. But it doesn't make me write things as a guy who's knowledgeable. I'm a total noob, yet the first few paragraphs made me cringe because I felt there were some odd things. I had a weird feeling about it. It wouldn't have bothered me if there wasn't this "A periodical about best practices and advanced techniques in Objective-C".. Or using the word "great contributors", etc. I mean, one has t…

Could you post an example of the "I'm learning and journaling my progress" writing style? I'd like to start doing this and I don't want to come off as an expert on things I'm just learning.

Julia Evans at http://jvns.ca has a distinctive style that I enjoy.

Re: Understanding IP, TCP, and HTTP

#53
post #43

I'm still curious about an explanation why do we have both TCP and UDP. For example if you do peer to peer, you need low latency, and UDP is best for that. I think it's because TCP is hardware optimized, but it's designed to transmit a file in a stream, so if a packet is corrupt, it just waits to send that packet. In that fashion, TCP tend to be slower, but on average it's more efficient for single files or webpages.…

Bittorrent is also peer to peer, and it doesn't need low latency. Really, it's about latency, nothing to do with peer to peer. TCP has head-of-queue blocking, as it guarantees complete and in-order delivery, so when a packet gets lost in transit, it has to wait for a retransmit of the missing packet, whereas UDP delivers packets to the application as they arrive, including duplicates and without any guarantee that a…

you made some very interesting posts. what I'm missing from this is 0mq. I believe it introduces layering mechanisms, so that one can re-use patterns to build cool stuff (anything really), without knowing specific details. do you have a email where I can reach you?

Re: Understanding IP, TCP, and HTTP

#54
post #51

If you want to learn about IP, TCP, UDP and some of the protocols below this I would highly recommend reading Richard Stevens book TCP/IP Illustrated, Volume 1: The Protocols. For two reasons: It's probably one of the best introductions to the subject that has ever been written, and it's a model example of how a technical book should be written. I'd be hard pressed to find a reason not to go this route at least once…

"I'd be hard pressed to find a reason not to go this route at least once in your life. I know the material pretty well but I still re-read Stevens books every few years just because it is so good." Then again, that's a lot of effort to spend on something that the vast majority of us don't need to know in much detail. The main reasons for knowing all the details are - to write a new networking stack, or working on an…

If you write anything that communicates over a network (e.g. anything using HTTP), you need to know at least some of this stuff, otherwise you're not going to be able to explain why (for example) your service call latencies have a big spike around 200ms.

Re: Understanding IP, TCP, and HTTP

#55

Earlier quoted context omitted.

It's the way I learn, too.. But it doesn't make me write things as a guy who's knowledgeable. I'm a total noob, yet the first few paragraphs made me cringe because I felt there were some odd things. I had a weird feeling about it. It wouldn't have bothered me if there wasn't this "A periodical about best practices and advanced techniques in Objective-C".. Or using the word "great contributors", etc. I mean, one has t…

Could you post an example of the "I'm learning and journaling my progress" writing style? I'd like to start doing this and I don't want to come off as an expert on things I'm just learning.

Hey,

This is a project I did a couple of years ago

http://www.electro-tech-online.com/threads/pcb-etching-tank-...

This is another project :

http://www.electro-tech-online.com/threads/first-pcb-stepper...

There was an update on the site, so images are not available there.. Here they are:

http://www.mediafire.com/view/uu4vsqq8e1yq8/PICTURES#6qj25tt...

Bear in mind that this is what my first attempt with PCB design was [PDF] in French, but you can see how ugly it was:

http://docs.com/GH41

I was on the forum chat, and I'd send pictures and they'd help me see, they'd open my eyes and explain things. Why 90° tracks are a no-no, etc.

People are tremendously generous with their time as long as your attitude is okay. I learned orders of magnitude more on the internet than in college, and still do every minute I'm online.

Re: Understanding IP, TCP, and HTTP

#56
post #42

Earlier quoted context omitted.

Could you post an example of the "I'm learning and journaling my progress" writing style? I'd like to start doing this and I don't want to come off as an expert on things I'm just learning.

One thing is to not publish it -- a learning journal is probably much more important for you to write than for anyone to read. Then give yourself a couple of years or decades of learning time, and if you still want to write about it, what you wrote as a beginner will give you valuable insights into the beginner's mind, things you have probably forgotten. And of course you can publish it (might be good for feedback),…

Great idea. I have a notebook where I write down ideas for companies, things I think about. I think it is a really, really good practice to write it down..

The reason I'm saying that is that human beings have selective memory. They tend to remember things they did the right way, they remember their good ideas, times they were right, etc.

I used to note my ideas that would seem genius.. And then I'd look at them a couple months later and it's humbling. How stupid could I be.

But there is a good thing about this: It taught me a valuable lesson.. It taught me to focus on real needs, and not some fancy thoughts I have at 3AM. Like real needs.

And I know that at an early stage, one needs to let go of critical things and be open and not dismiss ideas, etc.. But it's just that some ideas are plain stupid and I had plenty of those.

I write them down, then cross things. Not a real need, not a problem. Now I'm thinking about an idea that I'd use if it were available. And I'm not the only one.

Re: Understanding IP, TCP, and HTTP

#57

How I love it when people without deep knowledge of some subject write authoritative sounding articles. Without guarantee of completeness, to avoid the spread of misinformation: - IPv6 fragmentation has nothing to do with some "minimum payload size" (whatever that is) - there simply is no fragmentation being done by routers, the sender still can fragment however it pleases, and presumably will do so whenever it has t…

I love it when people without deep knowledge of a subject try to learn about it and explain themselves to others.

When it comes to complicated subjects like internals of TCP/IP, they may make more harm than good. Volume 1 of "TCP/IP Illustrated" is, I think, 700 pages long, not without reason. When one writes condensed articles like this it makes sense to stay high-level, because the moment you get into discussing SYN/ACK handshake, you are in danger of leaving large gaps in your explanation or making unreasonable stretches to complete the picture.

On a side note, it's funny to see that most of the paragraphs in the original article end with a link to Wikipedia — as a reader, I can go there myself, what good those articles do to me?

Re: Understanding IP, TCP, and HTTP

#58

How I love it when people without deep knowledge of some subject write authoritative sounding articles. Without guarantee of completeness, to avoid the spread of misinformation: - IPv6 fragmentation has nothing to do with some "minimum payload size" (whatever that is) - there simply is no fragmentation being done by routers, the sender still can fragment however it pleases, and presumably will do so whenever it has t…

What an unpleasant attitude. The author clearly made a lot of effort and as far as I know it's all accurate. If you know better then say so pleasantly.

Re: Understanding IP, TCP, and HTTP

#59
post #6

It's nice to see this recent increased emphasis on Web/mobile developers understanding the technologies that link it all together. The next thing I would add is a high level overview of the sockets API. While these topics aren't critical to most day-to-day lives of developers, they are certainly useful to understand.

This is a very readable online book on networking and sockets: http://beej.us/guide/bgnet/output/html/multipage/index.html Talk about understanding the sockets API ;-) here's the content section for chapter 5: 5.1. getaddrinfo() — Prepare to launch! 5.2. socket() — Get the File Descriptor! 5.3. bind() — What port am I on? 5.4. connect() — Hey, you! 5.5. listen() — Will somebody please call me?

Beej's guide is great! Thanks!

Re: Understanding IP, TCP, and HTTP

#60

Earlier quoted context omitted.

It's the way I learn, too.. But it doesn't make me write things as a guy who's knowledgeable. I'm a total noob, yet the first few paragraphs made me cringe because I felt there were some odd things. I had a weird feeling about it. It wouldn't have bothered me if there wasn't this "A periodical about best practices and advanced techniques in Objective-C".. Or using the word "great contributors", etc. I mean, one has t…

Could you post an example of the "I'm learning and journaling my progress" writing style? I'd like to start doing this and I don't want to come off as an expert on things I'm just learning.

http://jvns.ca/blog/categories/kernel/
Post reply on HN