Posts

Sharing the Network: From Circuit Switching to Packet Switching (The Hitchhiker's Guide to Computer Networks)

Prelude ... From Circuit Switching to Packet Switching The simplest approach for two people to communicate over long distances is to connect them through a dedicate physical wire. However, how would we scale that model to a million people that individually want to be able to communicate with everyone else? One approach is to extend wires between all pairs of users, requiring hundreds of billions of wires.  This is definitely not a good way to design a network. So what's wrong with that design? First, it is unlikely that every single person in that network will want to talk to everyone else at the same time. This means that we can use fewer wires. Second, not all connections are created equal. Longer wires cost a lot more money than short ones. Our design should have short wires whenever possible. Also it will be nice if the cost of extending long wires is shared between multiple users at the same time. Let's revisit our connection strategy. Rather than extending wires betwe...

Video on Demand: Part 1 (The Hitchhiker's Guide to Computer Networks)

Image
Data from the 2019 Global Internet Phenomena Report Video is the dominant type of traffic on the Internet. In 2019, video on demand constituted 60% of the total global Internet traffic. The image to the right shows the huge gap between the bandwidth demand of video streaming and the second highest application which is web traffic (think email, blogs, and news). This means that if you are in the computer networks business, you are pretty much in the business of video delivery. So the biggest question here, what is the best way to deliver video?  The "best" in this context can mean a couple of different things. It can mean delivering the best quality video for the user. Video quality does not only refer to whether a video is in HD or UHD but also whether it freezes and hangs or not. The "best" way to deliver video can also mean the most cost efficient way. If we can save 1% of the cost of delivering all videos on the Internet, we can save tens of millions of dollars i...

The Hitchhiker's Guide to Computer Networks

Image
Introduction One of the few reliable things that didn't crumble under the pressure of quarantining and working from home is our digital infrastructure. It remains largely unaffected as we conduct most of our business activities online. This is no accident. It is the result of 40+ years of continuous research to make that infrastructure faster, cheaper, and more reliable. My goal writing this series is to shed some light on the different hidden aspects of our digital infrastructure. In doing so, I hope that I will help the reader get a behind the scene's view of what we take for granted when we are watching HD videos, buying our groceries online, and chatting online with people on the other side of the planet.  A typical Internet user pays for their Internet and online services (Netflix, Amazon Prime, Spotify, iCloud) with some expectations of the quality of experience they will receive. Users also expect that the way they interact with the digital world will keep improving. Th...

My PhD coping mechanism (or how speaking my mind out loud helps me maintain my sanity)

Image
Getting a PhD can easily become a lonely where students get depressed, feel out of place, thrown away alone with a mild to a sever sense of the imposter syndrome. There is no wonder that "graduate students are more than six times as likely to experience depression and anxiety as compared to the general population" . Almost all my friends in graduate school face some sort of mental health struggle. This prompted me to write a post on my personal approach to dealing with my own issues and they all have to do with talking. Personally, I find it very hard to talk to strangers, so I focus all my talking to people I know. I talk to different people because defeating imposter syndrome, self doubt, angry thoughts, and most importantly the depression spiral requires multiple perspectives, especially with the highly logical PhD student. Talking with advisors One of the challenges of being a graduate student is feeling at loss when it comes to assessing my own progress, strength...

The evolution of Internet routing

Image
If you ask "how do I get a video from Netflix to my TV screen?" you will probably get a variety of answers depending on whom you ask. Here are a TL;DR of the answers you are most likely to get: the home setting answer "your access point gets the video from the Netflix over the Internet and sends it over wifi to your TV"  the smart apps and video encoding answer "the Netflix app creates an HTTP request specifying your account and some chunks of the video you are about to watch and the Netflix server replies with HTTP responses that contain the chunks" the Internet Protocol (IP) answer "your smart TV creates packets addressed to the Netflix server by its IP address. Based on the IP address, the packets are first sent to the access point which sends it over fiber or telephone landlines to the Internet Service Provider (ISP), like AT&T, the ISP then sends it to other networks which eventually deliver it to Netflix (the ISP can also directly deliv...

Extending wpa_supplicant for kernel mac80211 control

wpa_supplicant is a popular cross platform tool for wifi network configuration. On linux kernel, wpa_supplicant can use NetLink ( nl80211 ) to pass commands and arguments to the configuration API of IEEE 802.11 (cfg80211). In this post, I will go through the different edits needed to pass arguments from userspace to mac80211 through wpa_supplicant. I will use my work on WiFi augmentation which allows wpa_supplicant to configure mac80211 to control its medium access control behavior. wpa_supplicant has two main components: wpa_supplicant daemon and the wpa_cli client program. The edits I will present will be in both the daemon and the client. My edits assumes the existence of some functions in kernel that the user of wpa_supplicant is attempting to invoke. The edit starts with the wpa_cli (client) code. The wpa_cli code maintains an array of all commands it can process mapped to callback functions that should be executed on the invocation of that command. The array can be foun...

On Proposing Research Ideas

I spent the last month assisting my advisors on writing an NSF research proposal. It was one of my most exhausting and educational experiences ever. It all happened slowly through some random tasks I got assigned. Some tasks seemed trivial and even useless at the time, but it all made sense when we worked on the complete proposal draft.  It started with writing a "brain dump" of all ideas we have been iterating over the past 4-6 months. Then, it got interesting. The Interesting Platform (Motivation, use cases, existing problems) The brain dumb is often too technical as I spent time going through related work and defining interesting problems, what people are working on, and where I stand in all of that. This all does not cut it unless there is a clear use case. A scenario where all proposed research ideas are employed to make something "cool" happen. The idea of how such use cases look like went through several phases: 1) When I started working on the proje...

DARPA Robotics Challenge

Image
DARPA Robotics Challenge Finals 2015 took place at Fairplex (Pomona, California). The event included an expo with tons of robotics shows and even some booths where you can play around with the robots. The competition took place on 4 tracks each with a replica of the challenge stage.  The tracks: The winners: Team KIAST making it look way too easy with Hubo Running man, a robot with an attitude and a large cheering squad, walking on rubble for the win.   Chimp leaving at its own terms .. like a true champion. Random moments: The expo and the demos:

Attaching a WiFi Dongle to an AR Drone 2.0 (a.k.a. Compiling Drivers for ARM Based Devices)

Correction (4/24/2014): for your driver to work the AR Drone 2.0 you have to compile the kernel version provided by Parrot which can be found here https://devzone.parrot.com/projects/show/oss-ardrone2 One of the down sides of "out of the box" AR Drone 2.0 is that you can't control multiple drones from the same machine. Another down side is that you can't attach USB devices except flash memories and some other predefined devices due to the limited nature of the busybox deployed on the drone. To over come the first down side without manipulating the WiFi configurations of the built-in WiFi card (i.e. you don't want to mess up your new drone), you will need to overcome the second problem (i.e. install a WiFi dongle and its driver manually). In this tutorial, I try to walk you through the steps to do just that. I assume that you are working a Linux machine (seriously we are not going to compile drivers on Windows). Ubuntu is preferable ! Because the Drone has a...

Next Generation TV Ratings Systems

Image
TV ratings conventionally depend on focus groups and/or set top devices that keep track of the channels and shows viewed. This approach has been the main source of information for rating TV shows, sports, news, etc and it has been an integral part of the economics of the TV industry . But with the growing sources of viewing TV programmes either live (using TV sets or online streaming) or later (using video on demand either through set top devices or online portals) and with the growing number of TV viewers posting their opinions about what they are viewing, TV programmes rating is become a more challenging task that requires innovative solutions. On the other hand, recently booming terms like "Connected Viewers" and "Two Screen Viewing" describe TV viewers that use their smart phones or tablets while watching TV. These smart devices forms a rich source of information on the TV viewing habits of the device's owners. This information can help both the TV ind...

Integrating Click Router and GNURadio

Recently, I have been working on integrating Click Modular Router to work with both WiFi cards and USRPs to facilitate the development of cognitive radio testbeds. I am using GNURadio to control N210 USRPs . I found that developing routing hops to be interesting and worth sharing as it requires the USRP to simultaneously send and receive. This requires the transmission and reception to be on separated frequencies.  For transmission, first a client socket must be created in the click configuration code. Socket(TCP, localhost, 4002, Client true) Then, I used a thread to constantly listens on that socket and transmits the data once a new packet is received. This allows for the separation of tasks and good visibility of the transmission code. I noticed that there is a trend to include the transmission code within the main function which degrades the code readability. The thread takes as a parameter the top_block describing the data path on the USRP. clas...

Open Science - SFD 2011

Image
For the third year I was invited to give a talk at Software Freedom Day @ Alexandria University 2011 and I wanted to talk about something that links what I am doing now (I am a research assistant at E-JUST) and open source so I started researching Open Source Science. Starting from the fact that I use a lot of open source modules and packages in my work developed by others and put on the internet for everyone to use. I began to understand the wider concept of open science which aims at enabling everyone who is willing to participate in any scientific endeavor to have a part in it. Facilitated by the internet, ideas, tasks, documents, code, scientific data and even videos of experiments are shared by the project's coordinator for anyone to participate in anyway and every way possible. And the results are amazing !! My main goal from the presentation and this post is to show how openness can boost research either by using the collective intellige...