Hotwire Tech Blog

Scribes from Hotwire Engineering

Introduction

Improving Performance is an important KPI not only at hotwire engineering but also in entire company. For us, it is very important to understand what causes an application to slow down and how we can increase performance of it. To make application useful to user, it has to load fast, be responsive to user interactions and execute quickly. This directly relates to purchase rate increase. This article will walk through some of the client side performance improvement tips that we have implemented which has helped to load pages faster and reliable for various external and internal AngularJS based Single Page Web Applications at…

Read more...

Overview


Our Android application originally started out using AsyncTask to make our api calls. This tightly coupled the networking calls to our Activity lifecycle. Any configuration change would force the Activity to be restarted, and by extension the AsyncTask would be restarted. At Hotwire we wanted to change how we were making and handling our api calls and decouple this from the Activity lifecycle. During the change to a more robust and thought-out architecture for handling our data we wanted to ensure that we built in client-side caching, made the new framework easily expandable to new requirements, abstract away where the source of data was originating, and…

Read more...

Overview

We will look into running Jobs on Spark cluster and configuring the settings to fine tune a simple example to achieve significantly lower runtimes. We will also allude to the trade off between setting number of tasks per executors and number of executors per node given a cluster node configuration.

Spark Cluster Abstraction

This diagram (source) shows the key components of the cluster. Spark driver is the program you write. The Driver program demands for executors from the Master (the Worker nodes lets the Master know how much resource they each have). The Master allocates the resources…

Read more...

Introduction

Typically, when users search for content using Google Search on their mobile devices, they are directed to the corresponding mobile web page or in some cases the actual web page itself.

This often leads to a sub-optimal user experience mainly because mobile users are limited by screen size and processing power. Also web pages have multiple scripts executing on load which sometimes render the screen inactive for intermittent periods of time.

App indexing on the other hand, gets the app into search results. If the app is already installed on the user’s phone, the app is directly launched from the search results or in cases where the user does not have the app,…

Read more...

Introduction

At Hotwire we build machine learning models for various purposes, such as to power our hotel sort or to drive our hotel pricing strategy. We spend our time substituting data-driven machine learning approaches for legacy human curated set of business rules that are difficult to scale as well as to incrementally and systematically improve. However, not all is always without issues with machine learning models as they bring their own unique set of challenges. One of the main difficulties that we have to deal with on daily basis is to understand what changes to expect from a new “black-box” machine learning model. It is quite easy to see that weights in neural network…

Read more...

Problem:

In a service-oriented architecture, often there is a need to cache data. Hotwire Search Team has built a data store for caching static information about hotels such as star rating, neighborhood data, amenities, etc. which is backed by in-memory DB Redis (Elasticache). This cache is exposed via an API called Hotel Static Data Service (HSDS). HSDS was sending a very large response to its clients that needed only a small subset of that information. This caused latencies in critical services that were using HSDS within the search flow.

Current Architecture:

There are a number of services that get called from the time a user enters a search…

Read more...

What is Kotlin?

Kotlin is a new programming language from JetBrains, the maker of the world’s best IDEs.

  • Kotlin compiles to JVM bytecode or JavaScript.
  • Kotlin is a statically-typed programming language.
  • Kotlin is designed to interoperate with Java code and is reliant on Java code from the existing Java Class Library.
  • The syntax is lean and intuitive. It is a lot like Scala but much more comprehensible for Java developers. It does not completely destroy your OOP paradigm vision.
  • It does not enforce you to use only functional or only OOP style, which really simplifies the migration for existing Java…

    Read more...