The English version of quarkus.io is the official project site. Translated sites are community supported on a best-effort basis.

Cytech uses Quarkus to save Greek Tourism

cytechLogoLarge

Tourism and Covid-19

It’s not new that tourism is one of the most affected industries from the Covid-19 pandemic. Hotels, restaurants, airlines, cruises are some of the businesses that had a really tough time this summer. Many countries, especially those whose economies rely on tourism, were looking for solutions to open up the borders for tourists while not imposing their citizens to a significant health risk. There are no magic solutions here, but there is always room for doing your best to satisfy both requirements.

The Greek government decided at some point to open up the borders to help the economy, but it would be too reckless to do it without precautions and measures. That’s why they decided to build a system based on advanced technology that would choose the right travelers for Covid-19 testing. The idea is the following: if you cannot afford to test everyone, you should test those who are more likely to be positive to a Covid-19 test. This way, the Greek state can use its resources wisely and, at the same time, save money for tests.

The question is: how. And this is the part that we entered the scene. A team of scientists already proposed an AI and machine learning algorithm. Its ambition was to cover precisely the need described above by efficiently choosing the right people to be tested. But these algorithms need data, and at that point, detailed data from the passengers entering the country were not available in any digital and organized form.

The basic idea

The Greek government assigned our company, Cytech, to build a software that would gather the information from the passengers, filter it and pass it to all involved parties so they can do their job. One of them was the machine learning system called EVA. But the list with the parties needing this information is much longer: it includes the civil protection agency, the ministry of health, border agents, airlines, etc. At the same time, it would send an email to each of the passengers to inform them that their application is under review. When EVA would come up with the result, it would send it back to us to email passengers the final document. Without it, their entrance into the country would not be permitted. To make a long story short, our job was to build a demanding web form to gather all passenger’s data. Still, the most important part was to create a Data Broker capable of exchanging the right data with all the other information systems emphasizing speed, robustness, and resilience.

Technical challenges and solutions

The requirements of the Broker platform for the Passenger Locator Form project’s backend mainly revolved around exposing REST API endpoints for the UI to consume, as well as interconnect with government-related 3rd parties for required data exchange, such as EVA, EODY (National Public Health Organization), GGPP (the General Secretariat for Civil Protection) and the Greek COVID19 patient’s registry. Also, to be delivered within the extreme deadlines we had, as well as being able to cover the large-scale needs of the project, we also required our tools to be mature and proven and provide us with developer productivity, (horizontal) scalability, and maximum efficiency/performance with the minimum possible resources.

We had a positive experience with Quarkus in the past with small scale projects, but we were already impressed with its features for ease of use and increased productivity. Since Quarkus is based on industry standards (Microprofile and Jakarta EE APIs), it was straightforward for our developers to get up to speed very quickly and within the very tight deadlines. Also, the Guides section on Quarkus’s website helped to get immediate feedback on the few parts that did not auto-magically work as expected.

Live reload, and very fast startup felt like a very fresh start on developing enterprise-quality, very-large-scale applications in Java. Any change on the backend application was immediately reflected in the next request. Given that our choice for the application’s UI was Vue.js, offering the same functionality, every change across the application was reloaded live as it happened!

Quarkus: a game changer

An application with such a critical impact is required to be robust. There was simply no room for outages of any kind, which would mean people being rejected entering our country, or even being deported at the borders! Testing is a first-class citizen in the Quarkus development lifecycle, and that enabled us to increase robustness and confidence in the application in minimal time. Testing the application under production circumstances was as easy as annotating the test class with @QuarkusTest and handling the database using @QuarkusTestResource and TestContainers. We were able to achieve very high code coverage and (most importantly) not only on the easy paths but deep down to every part of the application. This played a huge role in the application’s 100% uptime and availability, from the moment it was first deployed and exposed to the public.

We valued the versatility of a Quarkus application’s configuration, based on the Microprofile Config API, which uses a unified configuration convention and offers the ability to plug in dynamic configuration sources easily. It assisted us a lot with our project, which included many dynamically and rapidly changing parts, such as cap limits for specific country entry points or requirements from passengers coming from particular countries to carry a negative RT-PCR test with them. One of our platform’s primary functions was the accurate, on-time data dispatch to concerned government parties. Using the dynamic configuration capabilities, we could quickly isolate, pause, and resume on demand the integration parts that started accumulating failures due to 3rd party handling errors.

A website that must be visited by every person entering Greece, especially during the tourist season, is - as can be easily guessed - quite high traffic. There were thousands of concurrent unique users at any point in time, with many thousands of forms submitted per day. We needed the application to handle most of the traffic with minimal resources, as well as being able to scale out if/when required, such as during midnight, when the results from EVA came in and the platform needed to process with extreme urgency the final form for each passenger, generating the QR code and the accompanying PDF file with all the form information and submit it via email. Quarkus minimal resource usage allowed us to scale to 2 c5.large (2 vcpus and 4GB memory) AWS EC2 instances for the vast majority of the time, with CPU usage usually under 10%. During QR code generation time, the platform scaled out to 4 c5.large EC2 instances, with CPU usage around 80%, while handling more than 10000 QR codes/PDF/emails per minute.

We served about 4M PLFs - from July to September - from travelers coming from almost every country of the world. The forms were accompanied by their respective email notifications, PDFs, and QR codes during the high summer season providing tourists with low-risk access to the country, efficient risk management and optimal allocation of covid-19 test resources, locking in at high-risk countries as fast as possible, as well as providing early warnings for destinations. At the same time, we communicate with ten different information systems feeding them valuable information about passengers, without downtime or performance degradation. We supported the difficult job of health experts. Hence, they got the right decisions for the country, and we were there when the information was necessary to confine the spread of the virus to the community. It was and still is an exciting and, at the same time, a stressful journey that shows the unique role technology can play for solving very crucial problems for society.

About Cytech

Cytech is a software house with 20 years of experience focusing in the telecoms sector. We develop our own products and services in the area of mobile messaging, marketing, and payments. Cytech has been the trusted technology partner for companies in 10+ countries (Europe, Asia, South & North America, Africa, and Australia). We are recognized for our high quality and professional results, so we often undertake demanding and challenging software projects by the state or big organizations.