Day 1 at the Recurse Center

- 2 mins

Today is the first day of RC and as such, the first half of the day or so was spent on meet and greets and setting expectations. It was great! Everyone was super nice and after lunch my batch dove in and started working!

I was feeling a little unsure of what to do, so I decided to just dive in and start learning about how I might go about building the HTTP server part of my web framework. It seemed like an okay place to start.


I ended up learning a lot about sockets. A socket is just an endpoint for receiving information. You can make a system call and create a socket on your system at a defined port where it’s listening, and then just start connecting to it and start communicating! The protocol that I had heard of before is TCP or TCP/IP. TCP/IP is the most well known of networking protocols at least for web developers and it’s what we’re working with under the hood during web development.

A connection requires a server socket, which is listening on a distinct port, and a client socket which is attempting to connect with the server socket.

The interesting bit here is after the connection has been accepted by the server socket, it actually sends back a new socket to begin the actual connection and exchange data. TCP connections define a unique connection with a 4-tuple: (1) local address (2) local port (3) foreign address (4) foreign port. This way the server socket can potentially be communicating with many unique client sockets.

I found this ruby documentation to be really beneficial in helping me to wrap my head around sockets.

This Stack Overflow question was also really great in understanding the difference between server and client sockets.

I came away from today with a really solid start. I don’t expect to come away from this as a networking expert, but I do feel like in a couple hours I have a much better understanding of what is one of the most core parts of the Internet.

Tomorrow I continue my adventures and maybe get to the HTTP part of things!

Andrew Pierce

Andrew Pierce

Software Engineer based in Durham, NC

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora