JavaScript at Uber

Mahek Batra
4 min readJun 24, 2021

JavaScript:

JavaScript is a scripting language that can be used in multiple contexts. It can be used in a web browser, and thus gives life to the web pages. Remember it can also run outside a browser as well, like in a server backend or like in node.js.

For software, there are many which uses JavaScript module or a plugin to achieve a certain functionality. Node.js is your friend here. Eclipse, brackets, many IDE use these.There are so many companies which use javascript for any web development,web applications, server applications,etc. Uber is one of them.

There are way too many open source projects very actively progressing like JQuery, Angular, Ember, Backbone which are libraries/frameworks built on top of javascript to achieve a different perspective in using it.

What is Node.js?

Node.js is an open-source JavaScript runtime environment that executes JavaScript code outside of a browser. It was built on Chrome’s V8 JavaScript engine with scalability in mind. It is perfect for lightweight and fast real-time web applications. So what is so interesting about Node.js that attracts more and more companies? Well, it’s amazing for creating collaboration tools, chats, social media applications and many more.

About Uber:

Uber Technologies, Inc., commonly known as Uber, is an American technology company. Its services include ride-hailing, food delivery (Uber Eats), package delivery, couriers, freight transportation, and, through a partnership with Lime, electric bicycle and motorized scooter rental. The company is based in San Francisco and has operations in over 900 metropolitan areas worldwide.It is one of the largest firms in the gig economy.

What was behind the Uber idea

In the year 2008,there was snowy evening in Paris,two young men Travis Kalanick and Garrett Camp were in need for a taxi, but they couldn’t find one. They came up with a brilliant idea. What if people could request a car ride from their phone? One year later, Travis and Garret created UberCab, a smartphone app that lets people get a ride just with the help of a button. In 2010, the first car ride was made possible in the city of San Francisco. On the next year, just 3 years after the young men came up with the idea, everybody in Paris were able to find a taxi with the click of a button. Astonishing, isn’t it?

What Technology is behind the Uber App?

The application is based largely on JavaScript and Objective-C. The same is also used to calculate supply and predict demand. For the real time dispatch systems the application uses Node JS and Redis. Text messages are available due to the cloud communication platform, Twilio. Regarding push notifications, they are based on Apple Push Notifications Service for iOS and Google Cloud Messaging (GCM) for the Android App

How Uber uses JavaScript/Node Js

Uber needs to handle loads of data in real time. They have millions of requests coming in continuously, and that’s not just hits on a page. Uber needs to track driver locations, rider locations, and incoming ride requests. It has to seamlessly sort that data and match riders as fast as possible.

All of that plays to NodeJS’s and JavaScript’s strengths. Node is designed to handle requests and hand off data quickly. It’s asynchronous capabilities are a huge part of that. Node is central to Uber’s user facing stack for just that reason.And quite frankly, Node.js was exactly what they needed.

Let’s see in more details…

  1. Marketplace Platform: Marketplace Platform is dispatch service this is like a brain of uber. This matches with supply to demand and determines which car get to you and how you get to destination.
  2. Web Platform: Web platform is all based on node js on the backend and react in the frontend.
  3. Visualizing data : Every city is unique so to understand how cities work Uber gather and visualize lots of data to allow city managers to understand how traffic flows in a city how supply and demand works, etc.
  4. Developer Platform:Node js is used as an interface to all the external API for developer platform.
  5. Uber’s core trip execution engine was originally written in node js because of it’s asynchronous primitives and simple, single threaded processing.
  6. The core of web tech stack is built on top of Node.js, which has a large and vibrant community of web engineers. Node.js allows to share JavaScript code between client and server to create universal web applications. It uses Browserify for the client-side bundling because of its Node.js-style module requirements.

Thanks for reading!!

--

--

Mahek Batra

BE 3rd year || Information Technology|| Dedicated|| Passionate||