Internet Protocols: Peer-To-Peer & Video Streaming

Peer-to-Peer (P2P):

Peer-to-Peer is an architecture that allows arbitrary end systems to directly communicate. Although they are known mostly for illegal activity, the architecture makes up the backbone of VoIP, and other legitimate services.

P2P distribution time is logarithmic relative to the number of users on the P2P application. Where as the client-server structure would be grow linearly relative to the number of users.

BitTorrent: uses a tit-for-tat system so that people must contribute to the network. It will re-evaluate the top 4 best peers to download from every 10 seconds.

Coupon Collector Program:

Say there are n coupons. To receive a prize you must collect all unique coupons. For your first coupon, it is unique. The next coupon we have a N-1/N probability of finding a coupon we have already gotten before. We need to use a Bernoulli random variable to see what the probability of getting a coupon we currently have. Therefore, we need: 1 + N/N-1 + N/N-2 +… + N.

Because of the increased difficulty as we collect more coupons, BitTorrent and other P2P networks use a “rarest first” system, that allows users to download the rarest packet first, then it will go to sending the more common packets and end with the most common packet.

P2P differs from typical client-server applications in that the service is shared jointly among the peers rather than provided by the servers. P2P doesn’t contain anything illegal, merely the use is known for distribution of copyrighted content.

Skype:

Skype is inherently P2P: pairs of users communicate, but it is a proprietary application layer protocol that we can infer by reverse engineering.

Video Streaming:

There are roughly ~1 Billion YouTube users, and ~75 Million Netflix users. These services account for about 16% of downstream residential ISP traffic.

Videos are stored with a ton of redundancy, because if you look at most videos there is a large amount of colors and intensities that are the exact same from frame to frame.

There are different encoding protocols that can reduce the size of the video, but there is still a lot of redundancy.

Dynamic, Adaptive Streaming over HTTP (DASH):

MPEG-DASH is a popular algorithm. The client adjusts the rate at which it is downloading chunks from the servers. The servers break up the video into chunks.

Content Distribution Networks (CDNs): are responsible for directing a user to a nearby copy of the content and then the client will connect to that server to retrieve the content. Large companies like Google and Netflix have their own CDNs because of how much content they own.

MATLAB 2017b Installation

MATLAB 2017b

Installing MATLAB 2017b

Here are some helpful notes on installing MATLAB 2017b, based on my own experience and issues.

Associate your License and Download MATLAB

If you are at a university, like me, you will likely have a license key that you are able to use to download and install MATLAB. After copying this 25 character code, log into or create a Mathworks account.

Then go to the License Center and paste your license code. After this a download link for the different versions of MATLAB will appear; however, before downloading, disable your real-time protection security. I have Windows Defender, so I had to disable the real-time protection, save, then download.

If you don’t do this your files may not download correctly and you will get an error stating Zip damaged ... Bad CRC 5095867a (should be 5b6408b2). Possible cause: file transfer error.

Installation

Most of the install is fairly automated, but you do need to log into your Mathworks account to associate the license you created in your Mathworks account. After selecting the license, you will be able to choose its installation directory, and the toolboxes you would like to have installed.

I usually prefer to install all of the toolboxes I can, because often I end up using functionality from those toolboxes in a way I might not have thought about while initially installing MATLAB.

After this you will have a long wait. The program is very large so get working on something else and come back in an hour or so, follow the prompts and you should be up and running.

For more information and pictures of the installation prompts see this link here.

 

Electrical Engineering Textbooks

My Favorite Electrical Engineering Textbooks

Here are the books that I have found,┬áduring my EE education, to be really good. I will never suggest something I did not use or find well written. I don’t want you to waste your time and money.

Semiconductor Physics and Devices by Donald A. Neamen (4th Ed.)

This book was very well written! I would not have been able to understand the fundamentals behind transistors without this book. The examples are clear, concise, and relatively simple. There are very few books that all EE students agree are worth the money, but this is one of them.

We covered from chapter 1, 3-8, and 12. Chapter 2 was review and we ran out of time for the other chapters, but it is so helpful that I will read through them during winter break.

I should also mention, I have never skipped a class my entire college education, until this quarter. Frankly, our teacher just reads off the slides and really doesn’t put much into it, and I don’t blame him. It is fundamental things that he probably finds so easy it’s boring; however, when I was strapped for time I didn’t worry about it, because a few hours with the book and I knew exactly what was going on. That said, go to lecture when you can. It is usually helpful.

Physics Books