Last Christmas I Gave You My Heart But Couldn’t Plan My Time Off

Or Seidman
Fiverr Tech
Published in
4 min readOct 5, 2021

Before we start, let me walk you through the short history of the “Unavailable“ feature (aka Vacation Mode) on Fiverr ( one of the world’s biggest online freelancer marketplace). This feature was born to provide a solution for Fiverr Sellers who wanted to take some time off and go offline without it affecting their reputation. During this away time, the Sellers would be unavailable to receive orders or messages. In the early days of Fiverr, when it was a small, fast growing start up, things were moving fast and features had to be released quickly, so it’s not surprising that the heavy-lifting of this feature was done in a 3-day Hackathon back in 2014.

But the years have passed, the marketplace grew immensely, many new sellers have joined, and so my former product manager (Oz Radiano), was asked to come up with a new and improved “unavailable” feature — one that would support scheduled time off and allow sellers to set future dates to plan their unavailability in advance. Although I’m a senior BE engineer, with this feature I was taking my first steps into end-to-end development — from client to server. And as if that on its own wasn’t challenging enough, I also had to write the server side while getting myself familiar with a new language — “Kotlin” a modern JVM based language.

I had to start somewhere, and the best place to start is the beginning. So I set up a design review, came up with ideas on how to tackle the challenge (rewriting the current feature using the existing language, Ruby) and they got rejected. The main reason for the rejection was the addition of new code to a legacy service, and language (Fiverr R&D is working on deprecating Ruby services). Re-writing the entire legacy code was not an option due to the product timeline. So, I had another DR the day after. This time I suggested we’d use the current mechanism as a “blackbox”, while the new part (supporting planned time off) will be written in a new service in “Kotlin” ,with its own DB. The FE solution was trivial — change UI to support “Start date” and send both fields to the server.

Before I could start writing the code, there were two architecture issues to tackle:

1 — Schedule an “unavailable” mode

2 — Support hybrid mode for the rollout and test period

We integrated both into a single solution. We’ve decided to go with a new “sellers microservice” (monolith, if you insist) that will be managing all scheduling approaching the current product (go on ‘unavailable’ mode immediately), as a single use case. The user story goes like this: User asks to become unavailable starting at X. If X is today, call the old service and mark the user as unavailable. Otherwise, put the request in the scheduling queue. For the Scheduling queue, we used our in-house “boomerang” service. This service gets a message by POST HTTP request, specifying the name, payload and the desired time for the callback (in our case, the unavailable day at midnight) and returns to you as a RabbitMQ msg (routing key of the queue is specified in the request) at the specified time. The alternative (and less elegant) solution was to create a queue by having a cron job running on a planned time off DB and handling the request.

This was the first step taken towards refactoring this feature. In addition to supporting unavailable requests, we also supported deleting planned off modes through our service (which became a proxy service for now). The mentioned blackbox started moving part by part into the new “Kotlin” service, and is soon to be deprecated.

Retrospectively , deeper thinking of the architecture might have eased the process management, mainly around knowing that having a proxy object can increase the response time, sometimes drastically. Using “Kotlin” as a programming language has many pros — strongly typed (unlike ruby), has a strong and robust web infra, and is easy to run. The main cons of using “Kotlin”, in my opinion, is having a big boilerplate when creating a new service.

Along with the challenges and tight schedule, we ended up with a shiny product that has been shipped on time and made our sellers happier. This year, we saved them from tears :) Can’t end up without thanking my team who contributed to this effort — Shiran, Michelle and Nir.

Fiverr is hiring in Tel Aviv and Kyiv. Learn more about us here.

--

--