Behind the technical scenes of Pl@ntNet: an interview with Mathias Chouet on backend, data and infrastructure

Can you introduce yourself?

I am Mathias Chouet, an engineer at Cirad. Within Pl@ntNet, I am responsible for part of the software development, mainly the backend and databases.

What does your work at Pl@ntNet involve?

Essentially, I develop software and manage a database.

I work on part of the software suite that ensures Pl@ntNet functions properly. I develop parts of the software known as the backend, meaning not the interfaces that users see, but the components that connect the database, the hardware infrastructure and the higher-level software layers.

In addition, I also work on data management, as there is a huge amount of data, and on making this data available quickly, efficiently, sustainably and reliably for millions of users.

On a daily basis, I contribute to ensuring that everything happening behind the application works properly. Users see the mobile application or the website. I work more on the services that allow them to access the data. It is work that is largely invisible to users, but it is essential for the platform to function.

You work on Pl@ntNet’s databases. What is a database?

A database is software that makes it possible to store large amounts of data in a computer system in an organised, robust and sustainable way, so that it can be retrieved very quickly by performing what are called queries.

A query is simply a request made to the system to retrieve data, sometimes by combining many different criteria. The goal is for the system to be able to respond within a fraction of a second.

In Pl@ntNet, there is a major component that is the central database. It is the oldest and the main one. It contains all user data: shared observations, votes, discussions, user accounts and most of what keeps the platform alive.

When we talk about databases, we sometimes hear the term Data Access Layer. What does that mean?

What is called the Data Access Layer, or DAL, is literally the data access layer. It is the software layer located just above the database and certain hardware resources. It is a common component shared by several applications. Whether we use the mobile application, the Web application or the paid API, all these applications query the same layer to access the data.

The DAL can be seen as a set of common functions, whose code is shared and reused by several applications. Its main purpose is to centralise data access at a single point.

The DAL acts as an intermediary between applications and data. It retrieves the necessary information, then prepares it by selecting, organising and adapting it so that it can be directly used by applications. The applications simply use data that has already been prepared according to a common format.

Several programming languages are used in Pl@ntNet. Why?

We mainly use JavaScript, both on the server side with Node.js and in some interfaces. There is also C++ for the artificial intelligence part, Python for some research developments, as well as a few system administration scripts written in BASH. In addition, there are the languages used for interfaces, such as HTML and CSS.

In the end, this represents five or six main languages. Each language has advantages depending on the use case.

JavaScript, for example, was a rather bold choice at the time, but it proved to be a relevant one. It offered very good performance for everything related to the Web: APIs, interfaces and asynchronous processing on the server side.

For other components, other languages are simply better suited. Each part of the platform therefore uses the tools that best meet its technical requirements.

You mentioned infrastructure. This is a term we hear often, but it is not always very clear. What do you mean by that?

For me, infrastructure, in the broad sense, is the structure underneath, quite literally.

If we take the example of a city, it would be the roads, water pipes, sewers, electricity… Everything that makes it possible to build things on top of it. Infrastructure does not exist for its own sake, but it provides the foundation that allows us to create what we want to create.

In computing, it is the same idea. Infrastructure consists of machines, but also the network that connects them, data storage and, more generally, all the hardware resources that allow software to operate.

Since Pl@ntNet has many users and a huge amount of data, we need an infrastructure that is powerful, fast and reliable. We need to be able to store large volumes of data, access it quickly and ensure that the system continues to operate even if a machine fails.

What does Pl@ntNet’s infrastructure look like today?

It consists of physical machines and virtual machines.

Virtual machines are work environments that appear as independent machines, even though several of them actually run on the same physical machine.

Physical machines are reserved for processes that require particularly high performance. This is notably the case for the database, GPU inference, or other processes requiring significant computing resources.

Today, we have around a dozen large physical machines and about fifty virtual machines.

There are more and more users, more and more data and more and more processing tasks to perform. Capacity requirements are constantly increasing, and the infrastructure has evolved to keep pace with this growth.

We therefore make use of the infrastructure provided by Cirad’s Information Systems Department (DSI). It provides virtual machines, server rooms and very high-speed network connections. It also provides essential services such as backups, part of the security infrastructure, firewalls and the administration of certain systems.

Where are all Pl@ntNet images stored?

For storage, we use ISDM-MESO. The Montpellier Institute of Data Science (jointly managed by Cirad, INSERM and the University of Montpellier) is what is known as a mesocentre. In short, it is a shared platform that provides computing resources (high-performance computing, massive data storage, data processing and cloud services) to a community of users, here serving the needs of research.

It is a regional infrastructure distributed between Montpellier and Toulouse. It is particularly well suited to storing very large volumes of data and also provides backup mechanisms.

This is where all Pl@ntNet image files are stored.

What are the current orders of magnitude of the data handled by Pl@ntNet?

At the moment, we have around one and a half billion images and associated metadata (generally one image for each identification request, rarely two or more).

In terms of storage, we use more than 200 terabytes of data.

There is not only the images. There are also databases, maps, workspaces, temporary data… Everything that is needed for the platform to operate.

If you look five years ahead, how do you imagine Pl@ntNet evolving?

It is always difficult to answer this kind of question, but, as both a Pl@ntNet user and a developer, there is one direction that I would be very interested in: improving data qualification.

Pl@ntNet collects a huge number of observations from its users; it is a citizen science project. This is an enormous asset, but all this data does not have the same level of quality. I think we could go further by progressively enriching observations with more descriptive information.

I strongly believe in collaborative annotations. Today, users mainly share observations. But we could also imagine them progressively enriching these observations, or the species themselves, with additional information.

For example, the morphological traits of species: describing the shape of leaves, the colour of flowers, the size of the plant, whether it is a tree, a shrub or a herbaceous plant… All this information is not always visible in a photograph, but it can be very useful.

We could also provide information about habitat, whether a plant is cultivated or wild, or other ecological information that would then help with identification.

How would this improve species identification?

Identification is mainly based on image comparison. It is very effective, but there are cases where several species look extremely similar.

Let us take a deliberately simplified example: a white flower with a yellow centre. Several species can have this appearance. However, some may have flowers five centimetres in diameter, while others have flowers only five millimetres wide.

In a photograph, this difference is not necessarily visible. If the application could provide these additional characteristics, the user would immediately have an extra criterion to help choose between several proposed species. In my opinion, combining images with naturalist knowledge could help Pl@ntNet make further progress.

A final word?

We have talked a lot about technology, but Pl@ntNet is not only about software, databases or servers. It is also about a team. Everyone works in a different area and contributes their own expertise. Ultimately, it is the combination of all these skills and professions that allows the project to move forward.