Amazon DocumentDB Review

Gianluca Della Corte | Systems Architect, Hotels.com in London

Originally published on the Hotels.com Technology blog

On January 9th Amazon announced a new database service called Amazon DocumentDB that they described as a fast, scalable, highly available, and fully managed document database service that supports MongoDB workloads”.

Is Amazon DocumentDB a real MongoDB?

While offering a MongoDB-compatible API, DocumentDB is not running MongoDB software, but “Amazon DocumentDB emulates the responses that a client expects from a MongoDB server by implementing the Apache 2.0 open source MongoDB 3.6 API” on top of an undisclosed storage engine. From some information, it looks like it is built on top of the Aurora storage subsystem that is also used by both Aurora MySQL and Aurora PostgreSQL. In fact the following features/limitations are common to both DocumentDB and Aurora:

  • both replicate six copies of data across three AWS Availability Zones
  • both have cluster size limit of 64 TB
  • both do not allow null characters (‘\0’ ) in strings
  • identifiers are limited to 63 letters for both
  • both persist a write-ahead log when writing
  • both don’t need to write full buffer page syncs

High Availability

Amazon DocumentDB is designed for 99.99% availability and replicates six copies of your data across three AWS Availability Zones (AZs). DocumentDB availability goal is lower when you have less instances or when it is deployed in less than 3 AZs:

Fig. 1: DocumentDB availability

An Amazon DocumentDB cluster consists of two components:

  • Cluster volume: cluster has exactly one cluster volume, which can store up to 64 TB of data.
  • Instances: provide the processing power for the database, writing data to, and reading data from, the cluster storage volume. An Amazon DocumentDB cluster can have 0–16 instances:
     – Primary instance: supports read and write operations and performs all data modifications to the cluster volume. Each Amazon DocumentDB cluster has one primary instance.
     – Replica instance: supports only read operations. An Amazon DocumentDB cluster can have up to 15 replicas in addition to the primary instance.
Fig. 2: Deployment scenario

If the primary instance fails, an Amazon DocumentDB replica is promoted to the primary instance. There is a brief interruption during which read and write requests made to the primary instance fail with an exception. Amazon estimates this interruption is less than 120 seconds.
You can customise the order in which replicas are promoted to the primary instance after a failure by assigning each replica a priority, note that it is strongly suggested that replicas should be of the same instance class as the primary. It is also really important to create at least one or more Amazon DocumentDB replicas in two or more different Availability Zones, in this way your datastore can survive a zone failure.

Scalability & Replication

By placing replica instances in separate Availability Zones, it is possible to scale reads and increase cluster availability.

Compute and storage scale independently. It is possible to scale reads by deploying additional replicas. Scalability and storage are scalable up-to 64TB. DocumentDB automatically adds 10GB whenever it reaches capacity.

DocumentDB is also able to automatically fail over to a read replica in the event of a failure–typically in less than 30 seconds. Currently Amazon DocumentDB doesn’t support any kind of multi-region setup.

Amazon DocumentDB does not rely on replicating data to multiple instances to achieve durability, data is durable whether it contains a single instance or 15 instances.
All writes are processed by the primary instance that executes a durable write to the cluster volume. It then replicates the state of that write (not the data) to each active replica. Writes to an Amazon DocumentDB cluster are atomic within a single document.

Consistency

Reads from Amazon DocumentDB replicas are eventually consistent with minimal replica lag (AWS says usually less than 100 milliseconds) after the primary instance writes the data:

  • reads from an Amazon DocumentDB cluster’s primary instance have read-after-write consistency
  • reads from a read replica have eventual consistency

It is possible to modify the read consistency level by specifying the read preference for the request or connection (it supports all MongoDB read preferences):

  • primary: reads are always routed to the primary instance
  • primaryPreferred: routes reads to the primary instance under normal operation, in case of failover a replica is used
  • secondary: reads are only routed to a replica, never the primary instance
  • secondaryPreferred: reads are routed to a read replica when one or more replicas are active. If there are no active replica instances in a cluster, the read request is routed to the primary instance
  • nearest: read preference routes reads based solely on the measured latency between the client and all instances in the Amazon DocumentDB cluster

Operations

It is possible to create an AWS DocumentDB cluster using CloudFormation stack (as described here).

Amazon DocumentDB is a fully managed solution that provides the following features:

  • auto scaling storage (up to 64 TB in 10GB increments)
  • simple compute resource scaling (resources allocated to an instance can be modified by changing instance class)
  • built-in monitoring, fault detection, and failover
  • daily snapshots

AWS DocumentDB vs AWS ElasticSearch

DocumentDB and ElasticSearch have a lot of features in common, in fact you could even use ElasticSearch as a primary datastore. Some of the features they have in common are:

  • document oriented store
  • schema-free
  • distributed data storage
  • high-availability
  • replication

However, they come from 2 different database families and are made for different purposes. DocumentDB is a document store while ElasticSearch is a search engine.

Here are some key differences between the two:

  1. Indexing — ElasticSearch uses Apache Lucene for indexing while MongoDB indexes are based on traditional B+ Tree. Real-time indexing and searching power of ElasticSearch comes from Lucene, which allows creation of indexes on every field of a document by default. In MongoDB, we have to define the index, which improves query performance, but affects write operations.
  2. Writing — ElasticSearch is slower on adding new data. In ElasticSearch indexing semantics are defined on client side. Indexing cannot be optimised as well as with DocumentDB.

In practice, ElasticSearch is often used together with NoSQL and SQL databases. A datastore is used as persistent storage and source of truth, and ElasticSearch is used for doing complex search queries.

Another key consideration while evaluating DocumentDB vs ElasticSearch is the effort/complexity associated with an ElasticSearch domains definition, sizing and maintenance. It is not so straightforward to do it (in fact it is hard to correctly size storage, shards and instance size). AWS provides some good guidelines, but it is more complex than working with DocumentDB which doesn’t require these considerations.

Hotels.com Architecture team’s advice

Currently in Hotels.com we use many different datastores/search engines, so it is good to summarise our advice on when Amazon DocumentDB is or is not a good option.

Amazon DocumentDB is a good solution when you need to store unstructured data that doesn’t require too many indexes or complex search features. 
A good benefit is that you don’t need to care too much about queries upfront. This is particularly useful when you are not the owner/producer of the data you are storing, so you don’t need to adapt your schema to a possible new data structure (like you must do with a SQL database like Amazon Aurora) and you can query data also using new fields (thing that you cannot easily do using another NoSQL solution like Amazon DynamoDB, where your data schema is based on your queries).

It is also a good solution when you don’t need rich indexing capabilities and complex/fast search support (ranked results, full text search with partial matching without using regex, complex geospatial queries with inclusion/exclusion). For these kind of scenarios Amazon ElasticSearch is a better choice.

Currently Amazon DocumentDB has two big drawbacks:

  • no multi-region support
  • just provisioned mode (not available in serverless mode)

References

Women Driven Development Hackathon @ Expedia Group – from the perspective of the host

Jenna Prescott | Recruiting Manager, Hotels.com in London

I heard about the Women Driven Development community through Ada’s List and after my initial call with the dream duo Phoebe and Misa there was no doubt that these were the type of people we at Expedia Group wanted to partner with. I connected with their genuine passion of giving back to the ‘Women in Tech’ community and concurred with their philosophy that sponsorship could make a huge difference when increasing diversity in tech!

Together we planned the amazing 3 part #TechitForward Hackathon that took place at the Expedia London offices over February and March.

No alt text provided for this image

What we considered during the planning and organisation of the Hack;

  • Agile/constant iteration. I loved the way Phoebe and Misa had done a survey after their first Hackathon at Google so this 2nd WDD Hackathon could be even better. The results of that survey were used to make changes. For example, food choices and having a full 1 day hackathon alongside 2 initial evening events rather than a full 2 day conference
  • #TechitForward – we engaged with 6 local Islington charities through the Expedia Group Corporate Social Responsibility team. These charities shared their challenges at the first event and then worked with self-organising groups to hack solutions which were showcased at the end of the full hack day. Attendees loved that they were giving something back through their contribution to the Hackathon.
  • Inclusivity – We wanted the everyone who attended to feel included and comfortable in their surroundings.  We did this by food options for everyone, quiet places and thinking of every eventuality when planning
  • Collaborative, learning environment – we took away the competition environment traditionally part of a hackathon to make it centred around working in collaboration, helping and learning from each other and giving back to the community
  • Communication/Open Source – Slack set up for everyone attending so teams could communicate throughout the 3 events and attendees could also join remotely. All code shared on Github to encourage open source
  • Ensuring it was a special, memorable event – We wanted people to come away from this event feeling good and remembering it as a special fun day. We did this by little extras such as a Barista from Grind all day, a very cool SWAG bag, top quality food (not the normal pizzas and sandwiches!) and a photo booth so they could have a photo to take home and remember the event by!
No alt text provided for this image

What happened at the three events that made up the Women Driven Development Hackathon:

Evening Event 1

6 charities shared their problems and the 90 developers self-managed into groups based on their interests. A self-proclaimed ‘Rebel’ group formed to create something that could be used by all charities.

Event 2 – conveniently the day before International Women’s Day

Now mostly in groups the idea precipitation began. During the event each team did a quick elevator pitch on want ideas they were working on.

#BalanceforBetter
#BalanceforBetter

Event 3 – Full day Hack

No alt text provided for this image

Event kicked off with an inspirational panel sharing their journey from Engineer to Director and the challenges they had faced in their career as an under represented group in tech. Hacking began with a regroup at 2pm for groups to share what they were working on (and call out successes/barriers) and all work was showcased at 6pm followed by food and drinks.

No alt text provided for this image

During the presentations the groups presented amazing work for the charities from building interactive dashboards, a slackbot for event subscriptions to a tinder like app which will match charities with volunteers

There was a lot of action on Twitter during the Hackathon this is what some of our attendees had to say:

No alt text provided for this image

‘First Hackathon done! With the lovliest and most supportive people @WomenDrivenDev. We built a matchmaking app for charities and volunteers. Very well looked after by @LifeatExpedia; Unlimited super nice coffee all day and tasty food. Can’t wait to #TechitForward next time’

‘A wonderful day @womendrivendev – so lucky to have got the chance to work with incredible women in redesigning @Culpepergarden ‘s website. Thank you @ExpediaUK for hosting, and to everyone that was a part of this :star2: #TechItForward’

And what some of the charities shared;

No alt text provided for this image

@BodyandSoul: ‘On Friday Body & Soul took part in @womendrivendev hackathon. What an amazing #womenintech event it was. And this badass team helped us tackle challenges re data & reporting #TechItForward #techforgood’

@LondonVillageNetwork: ‘Thank you to everyone @womendrivendev Hackathon hosted by @Expedia Friday. It was a long fruitful day. Looking forward to catching up with you again soon #TechItForward #womenintech #tech4good’

What’s next:

The projects with the charities will continue.. WDD are planning further evening events where attendees can get together and continue to work on their hacks! And I know some of the hackers have already continued to engage with the charities and their teams to do more since the Hack.

It was an amazing experience being part of the Hackathon across all 3 events and I loved every minute. I look forward to partnering with WDD on future events, as well as working with my lovely Expedia colleagues to organise more Hackathon and events.

If you want to check out more photos from the event you can do so here.

Hotels.com at dotSwift 2019

Lewis Luther-Braun | Hotels.com, London

Photo provided by dotConferences

In the last week of January, two engineers from the Hotels.com iOS team went out to Paris, to partake in the 5th annual dotSwift conference. For those who don’t know what a dot conference is, let me bring you up to speed. dot-Conferences are the equivalent of TED talks but more focused on topics from the tech industry; there are 7 different flavours of dotConferences: dotSecurity, dotScale, dotAI, dotGo, dotCSS ,dotJS and our very own dotSwift conference.

It was a great day to meet with other engineers from across the industry, as well as meeting other engineers that work within the Expedia Group — namely, members of the iOS team from Traveldoo in Paris.

The day was broken into 3 sets of talks with breaks between them.
The talks ranged from the sublime, how ‘pure swift’ apps aren’t really a thing as they all rely on the Objective-C runtime and ways of embracing Objective-C (instead of trying to get rid of any mention of it as fast as possible), to the ridiculous, such as a proposal on why you should use unicode characters in your code for method and variable names.

I feel like I should give this one a bit of explanation: 
The talk was far from suggesting that you do something like this;

⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⛵️⎈ ⬅

to tell your boat object that it should steer left. That notation could probably get away as a contemporary art piece but it’s definitely not useful as a standard for a naming convention. Instead it focused on scientific modelling and using the same notation that equations have, such as using Σ(sigma) for sum and λ(lambda) for wavelength as function and variable names respectively. This makes sense if you’re working with physicists who don’t want to look at long function names (no matter how descriptive they are) and also gives them an opportunity to debug the algorithm as opposed to your code.

Photo provided by dotConferences

It was brilliant to hear ideas from some very talented individuals — we even got to hear talks from people working on open source projects at Apple, such as SwiftNIO (an asynchronous event-driven network framework)— which gave real insight into what problems they were encountering and how they went about solving it.

As well as the main talks there were a number of lightning talks given by members of the Swift community. These were super quick talks that were straight to the point, often providing points of thought or presenting useful approaches to problems or tips.

Photos of the talks are available at https://dotswift.io.
Videos are available to watch: https://www.dotconferences.com/conference/dotswift

I’d highly recommend giving them a watch — maybe you’ll find a solution to an issue that you are currently encountering or learn something new.

Career Check-in: Divya Bhardwaj

Divya Bhardwaj | Supervisor, International Payroll in Gurgaon

What does your typical work day look like?

The beauty of working in a truly global & diverse environment – different time zones – is that there is no “typical” working day. There is a planned itinerary and then there is an unplanned one which spices up the day with new encounters. This is absolutely stimulating to the brain cells. But amidst all this excitement something that’s never off the radar is keeping a pulse of customer satisfaction through Service Now Dashboard.

What have you enjoyed most about working at Expedia Group?

It’s evolving each day – lightning fast! Working on multiple global & regional projects and initiatives sets a prodigious learning ground: “Fasten your seat-belts, we are in for a bumpy ride” – I JUST LOVE IT!

What makes your team unique?

The People! I love the One Team, Group First culture & the appetite for extraordinary customer service advanced from a diet of customer-centric values.

With my team in Tokyo

What accomplishment are you most proud of?

Happy customers make my day and I strongly believe in “First Time Right Philosophy”. I am proud to have lived by both!

Who has influenced you the most?

The list is long & beautiful – all Women leaders starting from my working mother to business leaders like Indra Nooyi to political leaders like Hillary Clinton to my own Expedia Group leaders like Becky and Preet – keeps me going and motivated!!


Cultural day 2018 India

How and where do you find inspiration?

Crazy, but I am inspired by risk. An adventurous trip where the destination is yet not confirmed however the journey is bound to be exciting (full of potential failures & experiments)? That’s what gets my heart and imagination pumping

How did you learn to embrace failure?

Albert Einstein rightly said, “If you’ve never failed, you’ve never tried anything new.” I have witnessed failures, but I am still on my journey to gracefully embrace failures. I believe in assessing potential risks and mitigating them to minimize the chance of failure.

Year end team lunch

What is your favorite piece of career advice?

Avoid being paralyzed by fear – Give wings to your thoughts and you will soar high. It’s a piece of advice I follow, too!

Tell us about your favorite vacation.

One of my most memorable vacation was with my family last year to Andaman and Nicobar Islands. From the multicultural town of Port Blair to picturesque pristine beaches, crystal clear water of Neil and Havelock Islands, Andaman offers a perfect choice for an exciting and peaceful vacation, and the more adventurous deep-sea diving – this place completely bowled me over for the second time.

What is your favorite weekend?

Lazing around in perfect peace in mesmerizing ambiance of my living room with my family (two naughty chirpy girls and a not so naughty husband) with some quick snacking & chit chat is the perfect weekend for me. Sounds cheesy maybe, but this comes as a gift of motherhood to me.

Career Check-in: Faisal Saiyed

Faisal Saiyed | Director, APAC People Services in Gurgaon

What does your typical work day look like?

In general, I have long days since I handle APAC. Being based in India, my first half typically is about engaging with my team, employees and managers in APAC. Evenings are often about hosting/participating in calls from US or other locations and thus I can often be found checking emails late in the night😊

What have you enjoyed most about working at EG?

The encouragement to think wide, to test and learn. There is a hugely supportive environment that allows one to risk failure without any negativity attached to it. Plus, I get to play out my role with a lot of freedom and autonomy.

What makes your team unique?

My team comprises of 6 nationalities and works across multiple time zones in APAC. They are incredibly passionate, driven and highly empathetic. I love their energy and ability to get stuff done.

What accomplishments are you most proud of?

When we started off People Services team in APAC, there were many things that needed to align better. We were expending a lot of effort, but the impact on employees was sub optimal. Over the last 18 months, I am incredibly proud of the team that we have built, the technology interventions we have implemented and process excellence that we have fostered. While we still have a long way to go, we have already started impacting employees in a positive way. Our Employee experience is much improved and that such makes me incredibly excited.

Who has influenced you the mos?

Growing up, my father was a key influence in my life. Then, my wife and my daughter have two big influences on my life and I have learnt so much from them!

How and where do you find inspiration?

I find inspiration in little little things in every day. A kind gesture, a lovely song or beautiful scenery really charge me up. I often turn to poetry to sooth a troubled day. Finally, I am also inspired by how people surmount challenges and demonstrate an incredible will to live and live well.

How did you learn to embrace failure?

I have always taken failure ‘personally’ and often brood on it. Over time, I have pushed myself to ‘let go’ and not let my ego come in the middle. This has been a really tough and learning experience for me and I am still on that journey.

What is best career advice?

My most frequent recommendations in terms of career advice are two (i) strive to be awesome at the role that you are doing such that you are upheld as a role model, and (ii) create a wider spectrum of skills so that one is able to broaden one’s capabilities to take on different roles. That way, we can demonstrate excellence in the current role and have a bouquet of skills to offer that can help us go to new/different roles!

Tell us about your favorite vacation.

This has to be Scotland and Lake Districts in North England. Picture-post card perfect places, great weather and we had a lovely place to stay.

What is favorite weekend getaway?

I love the hills, so whenever I get a chance, I relish going into the mountains and spending some quality time.

Three things I learnt being a scrum master

Giuseppe Sorrentino | User Interface Engineer, Hotels.com in Rome

Originally published on The Hotels.com Technology Blog

Introduction

I am very happy to have had the opportunity to work in the Agile world for almost 4 years, that have been fantastic and challenging.

Being a Scrum master is an invaluable experience and makes you understand and reflect a lot about company processes and software development in general.

It is very hard to discover and address disfunctionalities in teams’ processes. In fact, disfunctionalities are often sneaky. Metrics and surveys can help you but you need to develop an insight to recognize them and this helps you improve a lot as person and professional.

I decided to share with you three thoughts I noted down in these years.

1. Training is not enough, make it real by being assertive (when necessary)

In these four years I did tons of training. Prepared tons of presentations on the various agile practices and artifacts: Kanban, Scrum, backlog and backlog refinement, pair programming are only examples.

One thing I learnt is that while training on agile is valuable, practice is more valuable. The capacity toward making practices real in day to day life is fundamental in the scrum master profession. In order to do that there are two different and antithetic approaches:

  • wait that a practice emerges in the team
  • be assertive and effectively contribute by pushing for the application toward some beneficial practices.

Being able to find the right balance between these two approaches is a fundamental key in a scrum master role. In a perfect world the Scrum master would always choose the first approach. But in the real world, this is not always feasible. For example, there could be situations where it is not possible to wait until the team becomes mature enough to adopt a practice. On these occasions, in my honest opinion, is when the Scrum master needs to be assertive.

2. If you want to go with Kanban, start with Scrum

I am assuming you are familiar with the Tuckman’s stages of group developmenthere.

The Tuckman’s stages of group development

It is harder to start directly with Kanban than starting with Scrum and transitioning to Kanban. In fact, Kanban requires much more discipline from the team than scrum. Pulling stories at the right time, limiting the amount of work-in-progress items, are very challenging tasks, even for a very small group of people. This makes Kanban more functional in the teams that are in the norming or performing phase or however not at their beginning. While scrum being more prescriptive, is perfect for a team in the forming and storming phase.

It is a good idea to start with Scrum and transition smoothly to Kanban when you feel the team is ready, or rather when the team is entering in the norming/performing phase. There are many indicators a team is transitioning toward the norming/performing phase:

  • stability in practices adopted
  • stability in team composition
  • continuous success of sprints
  • self-organization in main scrum ceremonies
  • stability in velocity and throughput.

3. Scrum application outside the software world often is not clear

While scrum is supposed to be an universal framework, in the sense it should be applicable outside of software world, this application is not always immediately clear.

In Hotels.com we give training on Agile to very different functions and we encountered difficulties in recognizing a way to apply scrum to certain realities outside of technology. For example there is not so much literature on how backlog items should be documented. Neither is clear how to manage realities where we have mostly personal work rather than team work.

Conclusion

I had four challenging years as Scrum master and this opportunity make me grow as person as well as IT professional. During these years I had the opportunity to reflect on some aspect of the Scrum master practices.

Particularly I discovered that the Scrum master need to be assertive and effectively contribute by pushing for the application toward some beneficial practices when necessary. The natural emergence of all the team practices is simply a Scrum myth.

I, furthermore, think that Starting directly with Kanban for a new team can be counterproductive. My suggestion here is to evaluate Scrum as bootstrap for Kanban.

The last point: the fact that Scrum universality (its application outside of IT projects) is not crystal clear. Under this point of view a great community effort to make Scrum more accessible is needed.

Thanks to Gayathri Thiyagarajan.

Employee Experiences: Krystyna Waterhouse

From recruitment coordinator to business analyst: how to make a career pivot within Expedia Group

Krystyna Waterhouse | Business Analyst, Lodging Partner Services in Geneva

What is my current role?

My role – as of the past year – is that of a business analyst, based in Geneva. When I moved into Analytics, my specialism was People Analytics. I created capacity planning models, assessed quality of hire, and provided reporting for recruitment. A few months ago, I moved into another team focused on new inventory; supporting analytics for third-party inventory and vacation rentals.

The core of my role is supporting my stakeholders through data to answer business questions. As an analyst, I report on the “what” by looking at metrics linked to performance. But where an analyst adds value is in moving from the “what” to the “why” and the “how”; helping stakeholders understand why we are seeing certain trends and helping them decide which actions to take next.

At the Analytics and Revenue Management offsite

This means that some days I spend hours querying on databases using SQL or doing analysis in Excel to understand a problem, but other times I am focused on visualisations in Tableau or Powerpoint. My work is all about enabling insights and solving business problems, and the tools I need to use to get there vary.

However, just a year ago, my day-to-day looked nothing like this. I was working as a recruitment coordinator in London, scheduling interviews for 50-75% of my office hours. So… how and why did I end up in Switzerland doing analytics?

The path from recruitment to analytics

During my year in recruitment, I was fortunate to have a manager who supported and engaged with me to understand my career aspirations and interests. My role prior to Expedia Group had involved some work with data so I had a vague feeling that I might be interested in working with data and solving business problems.

With 10% of my time allocated specifically to project work, I expressed an interest to my Senior Director about working more with data. He was incredibly supportive, and involved me in his recruitment reporting; the beginning of my tempestuous relationship with Excel. I found myself excited by the results of early analysis, but also itching to dig deeper and ask “so what” about the trends I saw.

I realised that I wanted to spend my entire day answering those “so what?” questions, and that I needed to upskill myself. Alongside my regular work, I started to take on as many projects as possible whilst attending Expedia’s Code Academy (learning basic Python and Java). I also participated in an online Harvard Computer Science course called CS50. Many of my lunchtimes and weekends became focused on getting exposure to new training; I still didn’t quite know where it would take me, but I knew that I had to follow my curiosity.

Next, I started to reach out to different hiring managers within Expedia Group. One of the great features of life in Expedia is the open talent market – this declares that all positions opened must be posted internally, and that an employee can apply for roles without having to let their manager know. However, cross-functional and cross-brand moves are really encouraged at Expedia Group, and so I kept an open dialogue at all times with my manager about how we could make my role more data-focused.

Cupcake decorating is another one of my weaknesses

When reaching out to hiring managers at this point, I wasn’t applying for roles, but looking to build my network and gain some experience. I ended up spending some time shadowing the User Experience Research team in London, and this was a valuable opportunity to assess the kind of work I would enjoy.

In the end, it was actually my manager who pointed out the role in Analytics to me. It would involve my Senior Director becoming my direct stakeholder. I worried I didn’t have all the skills on the job description, but I pushed my doubts aside and sent over my CV.

Within a week I was interviewing and realising just how exciting the position was. I would be answering the same questions that had eaten at me whilst I was creating reports for recruitment, but with the training, infrastructure and tools of the Analytics team in my arsenal. When I was told the role would be in Geneva, Switzerland, I did not hesitate to relocate.

So, how am I finding it now?

In the past year since my relocation, I have had a huge learning curve. I discovered that my Excel skills were quite underwhelming and that my powerpoint decks had room for growth. I had to learn to write complex queries in SQL to access data, design models in Excel using R, and create data visualisations in Tableau.

Yet despite the number of technical skills that I had to develop (still a work in progress!), I felt since day one in the team that this was right for me. I love solving new problems every day; and without doubt, the support of my analytics peers and managers has helped immensely. No matter how many slack messages I send, or how many times I pop up at somebody’s desk, I am never made to feel I am asking too many questions. My team in London were amazing, so I was relieved to find when I moved to Geneva that the team here were just as friendly and welcoming.

Hiking in Arnensee with coworkers at one of the most beautiful lakes in the world

Geneva itself has been great. Like every Expedian, I’m big on travel, and living so near an airport has me leaving the country on average once a month. The lake in Geneva is bright turquoise in summer, and I’ve learnt to paddleboard as well as continuing to attend the Crossfit classes I took in London. Last summer I went hiking frequently with coworkers, and we hit up several Christmas markets in December. The analytics team itself has a ton of social activities; from monthly fast food lunches to cupcake decorating, ice-skating and laser tag. I even learnt to ski with a co-worker, although my skills on that front need some work…

What’s next for me?

I’m enjoying the challenges of new business topics and problems in Analytics. I have got a long list of skills I’m looking to develop this year, and I’m determined to make a little progress in my French. As for the future? I’ve found my joy in analytics and learning, but in Expedia Group, as in life, change is the only real guarantee.

One of my many weekend day-trips to Chamonix

What would I advise to somebody else looking for a career change?

  • Reach out to hiring managers or peers in different teams to find out what they do; shadowing is a great way to understand what a day-in-the-life actually looks like
  • Engage with your manager on personal development goals; set clear objectives and define what steps you will need to succeed
  • Follow your curiosity: what do you enjoy doing, and what really piques your interest at work?
  • Upskill yourself using the resources at hand; there are plenty of free courses online on edx, udemy and coursera

Employee Experiences: David Barmaz

Why Expedia is a special place to work

David Barmaz | Supply Analysis Manager, Lodging Partner Services in Geneva

The comfort of a large corporation with the growth pace of a start up

When I joined Expedia Group Geneva Analytics team 2.5 years back, the team was made of 30 people.

Today, we are over 80. The overall company has been growing strongly in general (10-15% per year), but with the growing push for more data, the analytics function has seen growth outpacing the general company.

The direct consequence of this growth is that Expedia Group offers a huge number of opportunities to take on responsibilities and increase one’s scope.

Most company that see such growth are often of a much smaller scale… but being part of a large corporation has a lot of advantage: global reach, large impact, and also loads of nice smaller perks like desks you can raise, free fruits & coffees, big allowance for sport activities, showers on site etc.

The main Geneva office also happen to be on the street perpendicular to the water jet (Jet D’Eau), so you get to check it out every day when coming and leaving the office; there’s nothing quite like a bike ride along the Rhone and Lake Geneva to get to work!

Morning ride to work

Making Expedia Group the best workplace

One of the most noticeable changes I’ve witnessed over the past 2.5 years is the drive in the Analytics team to make Expedia Group a great place to work.

  • New joiner onboarding has been strongly developed and streamlined.
  • The number of learning opportunities has increased drastically; Analytics now has a dedicated training committee, along with data science classes & code academy.
  • The need for training is also recognized by leadership through a generous training budget to employees.

Our team has probably the most active social committee of the whole enterprise. We have about 5 events each quarter. Last year, some of the activities included an escape room, a baking class, a curling initiation and most recently an ice skating night.

For the first time this year, everyone in the team has a quarterly objective to make life in the office better. We see a lot of beautiful initiatives flourish from this: such as “Lunch and Learn” sessions and language exchange groups.

Volunteering is also dear to many Expedians. Shortly before Christmas 2018, 150 employees gathered to refurbish a block of flats for people in need in Geneva.

Ice skating team event

You thought London was international? Try Geneva!

Prior to joining Expedia Group in Geneva, I worked in London for 5 years. One of the things I loved the most was how international London was, and losing this diversity was one of my main concerns, moving back to my home country.

But Expedia Group’s Geneva office is a special place. The vast majority of employees here are born elsewhere; being Swiss-born, I’m definitely part of a minority!

When I moved back to my country, I expected people to have the same habits as me. I was in for a shock when I started my work days at 7am and had to wait about 2 hours before most of my colleagues arrived.

However, I do feel very lucky to spend my days mingling with people from all over, who have such a rich variety of experiences. The staggered times at which people arrive at the office reflect not only the cultural diversity of Expedia Group in Geneva, but also the Expedia approach to flexible working and work-life balance.

Christmas Party

Now if you’ve read all this, you might be wondering: “how can I be part of this?” We have A LOT of open positions pretty much all the time, so please check out our Career website and feel free to reach out should you have any questions about the Geneva office or the Analytics team.

Looking forward to hearing from you!

Finatra in a Haystack

Originally published on The Hotels.com Technology Blog

Ryan Burke | Software Development Engineer, Hotels.com in London

Haystack is an Expedia-backed open source project to facilitate detection and remediation of problems with enterprise-level web services and websites. Haystack uses tracing data to help locate the source of problems, providing the ability to drill down to the precise part of a service transaction where failures or latency are occurring — and find the proverbial “needle in a haystack”. Once you know specifically where the problem is happening, it’s much easier to identify and understand the appropriate diagnostic data, find the problem, and fix it.

Finatra is a web framework created by Twitter built on top of TwitterServerand Finagle, it is the web framework of choice for the majority of Scala core services at Hotels.com. Recently, we wanted to integrate our services with Haystack in order to have distributed tracing information across service boundaries.

Finatra supports out of the box tracing using standard Zipkin X-B3-* HTTP headers. In order to report this data to Haystack we needed to publish the tracing data to a proxy service we have running which forwards it to both Zipkin and Haystack.


zipkin-finagle

Fortunately for us, zipkin-finagle provides functionality for reporting tracing information over a network. This library allows for tracing information to be sent via HTTP, Scribe, or published to a Kafka topic. Creating a new zipkin tracer is simple once you bring in zipkin-finagle as a project dependency:

val config = HttpZipkinTracer.Config.builder()
.host("zipkin-host:80")
.hostHeader("zipkin-host")
.initialSampleRate(0.0)
.compressionEnabled(true)
.build()
val tracer = HttpZipkinTracer.create(config, statsReceiver)

In the Finatra app’s HttpServer class you have the ability to set the tracer and label to be used in reporting by overriding the configureHttpServer function.

override def configureHttpServer(server: Http.Server): Http.Server =
server
.withLabel(“service-name”)
.withTracer(tracer)

After this, sending tracing headers to the service will result in the data being published to Haystack for visualisation. If you’re using Finagle clients to call other services as part of a request, these will automatically be propagated and all your dependencies will show up too.

Haystack tracing visualisation

Dealing with Futures

Finatra and Finagle are designed to operate in a non-blocking asynchronous way, allowing it to scale and keep the overhead of accepting a new request low. There is no global requests thread pool to configure, just don’t block when you’re handling the request. As such, when we are dealing with asynchronous code we don’t have the concept of a single request thread to do things like MDC, which is how you would normally keep track of per-request state such as tracing information.

When using Scala Future[T] we need some way to manually keep track of the tracing information between thread boundaries. We found there was no elegant way to do this without creating a wrapper around Future which copies a context between execution threads. Alternatively you can create a custom ExecutionContext in which the Future can run that provides the same functionality. Problems arise when you use a third party library or some bit of code that doesn’t allow you to define the ExecutionContext or the return type.

Twitter were an early adopter of Scala and provide a util library which duplicates and builds upon the Scala standard library features. This includes the Twitter Future, a cancellable Future with no ExecutionContext to manage and the built-in ability to keep track of a Context across thread boundaries. The Finatra server uses them at the edge and Finagle clients return Twitter Futures too. If you use them throughout your application instead of the standard Scala Future then you’ll get tracing propagation for free, at the expense of being a little more tied into the Twitter ecosystem.


Twitter Service Loader

One thing to watch out for is the zipkin-finagle library defining a service in the META-INF/services folder. Finatra uses Guice for dependency injection and if a library defines a file in the services folder then it will auto-magically be created for you and registered in the service registry. This can make it easier to integrate with Zipkin, you can ignore all the code changes above and instead set some environment variables to let the library create and register the service for you.

In my team we tend to prefer explicitly defining behaviour rather than relying on magic components of frameworks to do this for us. It’s why we moved away from Spring, manually wire everything, try to avoid internal shared libraries and write our own request filter logic.

Once we manually wired the tracer using withTracer we assumed that this would override the one being created from the service loader, but we were wrong. Both were being created and running at the same time, causing the unconfigured default tracer to throw errors (it defaults to sending data to localhost). In order to disable this we have to modify our Docker file to add an additional Java opt:

ENTRYPOINT [“/bin/sh”, “-c”, “exec java $JAVA_OPTS -Dcom.twitter.finagle.util.loadServiceDenied=zipkin2.finagle.http.HttpZipkinTracer -jar service.jar $0 $@”]

This is a bit nasty, we have a hard coded class name in our Docker file and if it ever changes name then it’ll start loading two HttpZipkinTracer instances again. That’s the cost of being able to define the tracer ourselves.


Shameless plug

We are are hiring! If you’re passionate about software engineering and what we do sounds interesting check out our roles!

Career Check-in: Alex Lieu

What differentiates an analyst from a BI Dev?

Alex Lieu | Director Business Intelligence, Lodging Partner Services in Geneva

Tell me a bit about yourself and how you first joined Expedia

My career with Expedia actually started 12 years ago in Seattle, but I’ve spent the past 8 years in the Geneva office. I initially joined as a financial analyst, moved into regional analytics and managed the team there, before transitioning into my current role leading the BI Dev (Business Intelligence Developers) team.

Having fun with my manager at the Analytics and Revenue Management offsite in Geneva

For somebody who is new to the world: How would you differentiate the role of a BI dev to the role of an analyst?

I’d like to start off by saying that what matters most is the commonality between the two;the problem solving capability.

But when it comes down to it, an analyst is a person who tries to identify business trends and to tell a story. A developer finds ways to explore data, build tools and create efficiencies to enable others.

For an analyst interview, the focus might be on answering questions and telling stories with the data. When interviewing a BI developer, I like to understand what tools they have built in the past. For both, I try to figure out if they truly understood the needs of their clients or just followed instructions.

However, it really is a spectrum; the roles in Expedia aren’t so definite any more, and the profile we want depends on the job that the team is going to carry out. Sometimes a more generalist person might be appropriate for a team, but in other times you need a really technical skill set. And it is key to note that you don’t need four people with the same skillset in a team; it’s more important to be able to leverage different skills across a team.

What defines an “Expedia Group” hire to you?

The best hires I can think back on are curious, focused on the problem being solved rather than the official task itself, and are interested in the human dynamic. This is important as often the root of the issue is not immediately clear from the way a stakeholder explains it. It requires both connection with people and grit to solve problems in such a large organisation.

Applying the core problem-solving competencies at the offsite by trying to build a car out of cardboard

I also think a lot of Expedians combine that grit with humour. Across the multiple teams and groups I’ve worked in, there’s been this sense of humour and a lack of ego that underpins the culture.

Do all the Expedia offices have a different atmosphere or is there a global Expedia vibe?

The offices definitely all have a distinct culture based on the make-up of employees. In the offices where we share space with the Account Management teams there is a particularly social and outgoing vibe; smaller ones, like Geneva, are a little more intimate. If you needed to talk to somebody in Geneva, you would always be able to show up at their desk with a question.

And what would your advice be to anybody thinking about moving to Geneva specifically?

Switzerland is a great location in the centre of Europe; it’s super easy to travel from. Furthermore, the Swiss are a very active and outdoorsy nation, so there are loads of activities to get stuck in with. And Geneva is one of the easiest cities in the world to commute around. It’s definitely a bit quieter than London or Prague, but there’s a strong social culture amongst the Expedians who have relocated.

Walking with lions in South Africa; enjoying the perks of my Expedia Group employee travel benefits

What advice would you give to somebody joining Expedia Group today to succeed?

Approaching everything with a problem-solving mentality has been really important for me. Lots of people are excited about getting the most exciting, glamorous, high-visibility opportunity. I’ve had the best outcomes from going for the “messy” problem nobody else wants to tackle and just making it work.

I’ve also had to learn that when somebody is asking you for something, they’re not asking for the “right way” or whose remit it sits within; they want the problem solved. In a big company like Expedia Group it could be tempting to “pass the parcel” but it’s important to have the drive to solve the tricky problems and to take responsibility for subjects.

I’d also say it’s important to understand your personal motivations and drivers, which might change over time. I like my current role as I really value making the life of the people I work with more effective, and that is validation I receive every day. Knowing I add value to my colleagues is really important for me.

Finally, I have found a lot of value from having a mentor; I would recommend every Expedian to sign up for the available mentorship programs. Leadership are generally very easy to talk to and interested to know that junior people are getting on well, and the visibility a mentor gives you across the organisation can be invaluable.