The Birth of Toynet

By: Tay Nishimura (Co-founder)

ToyNet is a tool we built to help incarcerated veterans transition into tech jobs. It is also a pet project of mine that helped my own transition from software engineer to site reliability engineer. At Project Reclass, we mean it when we say we want to positively impact the careers of all of our members. Here is my story!

Depending who you ask, site reliability engineers (SREs) have different responsibilities. Most SREs monitor and improve the health of applications and agility of software development. This might mean automating away time consuming and error prone tasks such as deploying infrastructure, provisioning systems or virtual networks, and rolling out new code. It’s exactly what I want to do next, but speaking with peers, I discovered knowledge gaps to fill before landing a job. It turned out several of my friends were already passionate in the areas I wanted to develop; they recommended books and system utility tools and reviewed my notes with me when I felt stuck.

Sample Mininet Construction Code (visit original repository)

After spending several months studying the OSI model and DNS, one of my best friends, Blaze Bissar, encouraged me to look at a library called Mininet that he used in school to emulate an entire enterprise network on one virtual machine… I was excited by the idea, but I struggled to comprehend what these virtualized devices were doing through the command-line interface. I am a visual learner, applying colors to concepts to learn them faster. I wanted to use Mininet, but would sketch out the topologies I was emulating each time; the tool was unintuitive without the real-world experience.

ToyNet

This February I was laid-off from my web development job. I was fairly worried as the economy tanked daily, my friends were also laid off, and recruiters seemed to need two years of AWS, certifications, or on-the-job experience building out a CI/CD pipeline to move me forward in the interview pipeline. I worked on cloud migration projects using Terraform at work, but the two months were not sufficient. There was so much to learn…

I needed to find a way to make job-hunting sustainable. I thought about Project Reclass which, until then, was an in-person class Kunal was teaching at Rutledge State Prison, a medium-security prison near Fort Benning, GA. I prepared slide decks of my visualization of the roles of routers and switches in transmitting data using IP over Ethernet, the differences between UDP and TCP, and how DNS servers work in levels. Kunal developed ways to reinforce the learning through self-assessments, Jeopardy-style games, and group missions. It was clear that COVID would not go away soon, and more and more prisons were shutting down their vocational services.

Overview of my proof of concept for network visualization

What if… instead of splitting my time, I could build something for Project Reclass that helps our students and also my career? I wanted to show how my background in software development allows me to build a tool that makes networking intuitive to others so hiring managers would consider my five years as a software developer an asset rather than overlook it.

Sample Mininet construction Code (visit original repository)

I realized that by repurposing a cloud visualization library I could build a program, which I named ToyNet, that receives a network configuration as an XML file and produces a network diagram. By visualizing the networks, it became much easier for me to interface with Mininet. I built out an internal graph structure and depth-first traversed it to deduce subnets. After writing recursions, unit tests, and class hierarchies, I found the coding questions during my interviews a tad easier with rarely any algorithm preparation.

Sample Mininet construction code (visit website)

A cool learning opportunity that came up while testing ToyNet putting two hosts on the same subnet with different network identifiers. The network established itself, but I was unable to ping one device from the other because the host forwarded the ping to the gateway router when it realized that the destination IP address did not reside in its subnet. When I picked an IP address with the same network ID, the ping worked. It may seem trivial, but I was beyond excited to troubleshoot a real rookie mistake through this simulation by myself, and have access to the inner workings of a network at the tip of my fingers for the first time!

A Summer of Progress

I shared this project with hiring managers to explain my intention of getting more computer networks experience, infrastructure experience, as well as my drive to create tools that help other technologists. I started getting onsite interviews! The possibilities for this project were beyond our capabilities as a small team, so we recruited more members this summer to help bring ToyNet to life. The proof of concept was not intuitive enough to deploy to multiple prisons with multiple instructors. We also had dreams of deploying this to the cloud for all veterans to benefit, incarcerated or not.

Wireframe sketches from Design Week

The new team created a GitHub organization and held a design week to define the future of ToyNet. It quickly evolved from a few rough sketches for a command-line program into a learning platform similar to ones our new team members used to learn how to code. I genuinely did not expect this kind of product when I first learned coding through books and PowerPoint lectures back in college. I drafted some mock-ups of our ideas and we performed user experience testing during a meeting to gather feedback on the interface from Reclass members who are not engineers.

Refined wireframe sketches from Design Week

During that meeting, we were lucky enough to meet Cecil Green, who evolved our makeshift wireframe into a full-featured wireframe using his background in design thinking and user interactions. It looks so much better!

Cecil’s high-fidelity wireframe of ToyNet emulator

Throughout the summer, we built out an end-to-end implementation of adding, deleting, and linking devices from ToyNet’s configuration tab. We used React with TypeScript for the frontend and Django REST framework for the backend API. ToyNet is just one type of module we will offer in our holistic curriculum as Project Reclass continues to grow. We are currently designing what quizzes and lectures look like inside our platform, and what are the best ways to store our curriculum data. In the fall, Scott Richardson and I will be leading the effort to complete our platform from the frontend and backend respectively.

Simple end-to-end system design

On the infrastructure side, we also had to solve the challenge of building this tool to work on an instructor’s laptop in prisons, but also reuse the code in the cloud. We wanted to avoid too many branching statements and complex control flow; I also had concerns about integrating Mininet into the backend as I had read that it is finicky on operating systems other than Ubuntu (the default package of Mininet is an Ubuntu VM image). Although I never had an opportunity to use it at my jobs, we identified Docker as a good fit due to its claims of being platform agnostic. So far, Docker has worked out well as it also allows us to test different combinations of frontend and backend implementations locally in a development environment. I am currently working with our cloud engineer, Theo Lindsey, to deploy everything to AWS using Elastic Container Services.

Deploying docker images using Docker Compose and AWS Elastic Container Registry

What’s Next

It turns out DataDog was excited to know what Project Reclass is up to, and all my studying paid off. After five months of rigorous preparation, I signed with them as an SRE! I am extremely grateful for this opportunity to learn, grow, and give back to their incredible engineering organization. I’m also excited to keep enabling Project Reclass to allow our volunteers to explore new technologies or career paths.

Programming

Our team still has many additional features to code. Our visualizer is complete, but Mininet still needs to be hooked into the emulator. On top of this, we want to replace the PNG visualization with a canvas widget where users can place devices directly. Aside from the emulator, we want to be a holistic learning platform, but ToyNet is the only module we’ve completed. Additionally, we will be working in the next quarter on a curriculum overview screen where users can see how they are doing with all of their modules and click in to navigate to individual submodules. We are still trying to design the basic data structures for this as well as sort out data storage for the web (we are currently looking at AWS Simple Storage Service).

Feature list for Learning Platform

Infrastructure

Not into coding? The biggest challenge we have yet to tackle is how to scale our web platform as we get more users. Mininet defines its network as a set of files and processes, and this makes isolation of sessions challenging. A switch, for example, may have an interface called s0-eth0. If you run another Mininet in the same context with another switch, the file name collision will cause undefined behavior. We plan to run Mininet inside a finely tuned Kubernetes cluster separate from the Django services in order to balance scalability and cost-effectiveness. However, our current team does not have experience using Kubernetes, so we are looking for a new member to lead this initiative.

Rough sketch of long-term distributed design in the cloud

Join Us

Are you excited about vocational programs for veterans? Does the unique challenge of bringing a platform to web scale while keeping the code flexible and compact for no-internet environments excite you? Do you want to make an impact, and learn a bunch of awesome technologies along the way? If these questions resonate, join us at HackDay for a live tour of the current state of ToyNet and to apply to our Q4 2020 volunteer program!

Tay Nishimura is a Site Reliability Engineer in New York City with five years of industry experience as a software engineer at cutting-edge technology firms. A believer in grassroots efforts, Tay also serves as an officer for NYPD Auxiliary unit and a mentor for American Corporate Partners.



About the Author

You may also like these