Intern Series: Learning from the Experts on MongoDB's Query Team - Meet George Wangensteen

Joshua Fayer

#Culture#EarlyTalentRecruiting

George Wangensteen is a rising senior at Brown University studying Computer Science. He was a Software Engineering Intern this summer at MongoDB on the Query team. During his internship, he learned a new programming language and improved his skills as an engineer with the help of his mentors and the talented engineers he had the chance to work with.

"George Wangensteen"

Josh Fayer: What team do you work on as a Software Engineering intern and what does your team do?

George Wangensteen: I interned on the Query team, which is a part of the Database Engineering Team at MongoDB. I worked on the core database product, and specifically, on the part that receives, optimizes, and comes up with execution plans for a user's queries of their data.

As a team, we own the code responsible for query optimization and query execution. When a user runs a query against their data, the server generally receives this request from a MongoDB driver which generated a BSON object encoding the user's query. The most interesting requests for the query team are the find commands and aggregation pipelines. For an aggregation request, we will build a pipeline that can execute the user's request, and then spend extensive time optimizing it to make it more efficient.

There are a ton of things we can do to optimize at this stage, but at a high level, we attempt to rearrange and/or rewrite the user's pipeline to make it equivalent but more efficient. For a query request, we build some canonical representation of the query and then begin plan generation, where we produce "query plans" (sequences of actions we can take to fulfill the query request) that will satisfy the given request. This involves planning how we will access data from storage, as well as how we filter and reshape the data. We then do plan selection, where we evaluate the generated plans and select the most optimal one to execute the user's query.

JF: What is one of your favorite projects you worked on this summer?

GW: The work I enjoyed most was optimizing specific aggregation pipelines running against sharded collections. I really enjoyed this work because it was both very technically interesting, and had a real impact on the product. Implementing these optimizations involved reasoning about sharded and distributed clusters, the layout of the underlying collections, and the queries themselves, to help rewrite/rearrange aggregation pipelines more efficiently while maintaining correctness. In addition, making aggregations run faster is highly impactful to our users.

JF: How is your experience as an intern at MongoDB different than your experiences as a student?

GW: While the theoretical knowledge you pick up in school came in handy, as an intern, I did so much more of the actual engineering work. This work was done with the guidance of people who are really talented at it and working with these experts has helped me improve my skills as an engineer. I really appreciated the culture at MongoDB — their people were very nice and always willing to help.

It was also really cool to see how many engineering decisions are made based on conversations about what our customers want or expect from our products, which I didn’t get to experience as a student in a classroom.

JF: How has the work at MongoDB challenged you, and what have you learned here?

GW: When I began my internship, I didn’t have any experience using the programming language C++. Ramping up to being able to write production-quality code was difficult but I had a lot of help and support along the way. My mentors answered a lot of questions during my first week, and in my second week, the company-sponsored several days of C++ training in the office. I'm very grateful for the opportunity to learn a new language in a production environment with so much support.

I also had not worked on the internals of a database before — understanding the many layers of the query system was a big challenge, and I learned a ton about strategies for executing user queries quickly.

I had meetings once a week with my mentors, which gave us an opportunity to talk about what I was doing well and what I could be doing better so that I could focus on growing and improving. Working with my team made me a much better programmer and it also really improved my ability to reason about software on a high level. One thing that I think is unique about interning at MongoDB is that while you're given a lot of support, you're also given a lot of responsibility to work on impactful problems.

JF: What was your favorite part about interning at MongoDB?

GW: The people and culture were my favorite parts about interning at MongoDB. There is a great combination of people who are committed to developing an amazing product and doing good work, but who are also kind and always willing to help someone who wants to learn. Asking a lot of questions when you're new is expected and encouraged. While you’re encouraged to investigate things on your own, if you get to a point where you need help understanding something, the culture here really encourages asking others, which I really appreciated.

Interested in pursuing an internship at MongoDB? We have several open roles and would love for you to grow your career with us!