Building Reactive Java Applications with Spring Framework

If you’re a Java developer who uses the Spring ecosystem, you’ve probably seen the Spring Pet Clinic. In this workshop, we will walk you through a new reactive implementation of the Pet Clinic backend that uses Spring WebFlux and Apache Cassandra® (via DataStax Astra DB).

The cloud-native database-as-a-service built on Cassandra fits the highly concurrent, non-blocking nature of our reactive application. We’ll do all of our work in the cloud with Gitpod’s open-source, zero-install and collaborative development environment.

Tarantool: Speeding Up Development With Rust

As you may know, Tarantool supports any programming language that is compatible with C and can be compiled to machine code. Among other things, it is possible to implement stored procedures and modules in Lua and C. Nevertheless, we have already used Rust in two of our projects, and in one of them, we converted the Lua code to Rust entirely, thus achieving a 5x performance improvement in comparison with the Lua version and about the same output as the C version.

I am Oleg Utkin from Tarantool, and my main expertise is in data-intensive storage systems. I will cover the two projects mentioned above and the reason why we find Rust so good — it has long had various bindings for the Tarantool API and for Lua modules writing. For example, you can write Rust code for Tarantool right away, along with stored procedures and third-party modules that can be used without Lua. Are you interested? Then let's roll!

Raft in Tarantool: How It Works and How to Use It

Last year, we introduced synchronous replication in Tarantool. We followed the Raft algorithm in the process. The task consisted of two major phases: so-called quorum writing (i.e., synchronous replication) and automated leader election.

Synchronous replication was first introduced in release 2.5.1, while release 2.6.1 brought the support of Raft-based automated leader election.

Why Choose FastAPI over Flask?

Article Image To help you quickly get started with Milvus, the open-source vector database, we released another affiliated open-source project, Milvus Bootcamp on GitHub. The Milvus Bootcamp not only provides scripts and data for benchmark tests, but also includes projects that use Milvus to build some MVPs (minimum viable products), such as a reverse image search system, a video analysis system, a QA chatbot, or a recommender system. You can learn how to apply vector similarity search in a world full of unstructured data and get some hands-on experience in Milvus Bootcamp.

We provide both front-end and back-end services for the projects in Milvus Bootcamp. However, we have recently made the decision to change the adopted web framework from Flask to FastAPI. This article aims to explain our motivation behind such a change in the adopted web framework for Milvus Bootcamp by clarifying why we chose FastAPI over Flask.

Web Frameworks for Python

A web framework refers to a collection of packages or modules. It is a set of software architecture for web development that allows you to write web applications or services and saves you the trouble of handling low-level details such as protocols, sockets, or process/thread management. Using a web framework can significantly reduce the workload of developing web applications as you can simply "plugin" your code into the framework, with no extra attention needed when dealing with data caching, database access, and data security verification. For more information about what a web framework for Python is, see Web Frameworks.  

There are various types of Python web frameworks. The mainstream ones include Django, Flask, Tornado, and FastAPI.
  • Flask

Flask is a lightweight micro-framework designed for Python, with a simple and easy-to-use core that allows you to develop your own web applications. In addition, the Flask core is also extensible. Therefore, Flask supports an on-demand extension of different functions to meet your personalized needs during web application development. This is to say, with a library of various plug-ins in Flask, you can develop powerful websites.

Flask has the following characteristics:


  1. Flask is a microframework that does not rely on other specific tools or components of third-party libraries to provide shared functionalities. Flask does not have a database abstraction layer and does not require form validation. However, Flask is highly extensible and supports adding application functionality in a way similar to implementations within Flask itself. Relevant extensions include object-relational mappers, form validation, upload processing, open authentication technologies, and some common tools designed for web frameworks.
  2. Flask is a web application framework based on WSGI (Web Server Gateway Interface). WSGI is a simple interface connecting a web server with a web application or framework defined for the Python language.
  3. Flask includes two core function libraries, Werkzeug and Jinja2. Werkzeug is a WSGI toolkit that implements request, response objects, and practical functions, which allows you to build web frameworks on top of it. Jinja2 is a popular full-featured templating engine for Python. It has full support for Unicode, with an optional but widely-adopted integrated sandbox execution environment.
  • FastAPI

FastAPI is a modern Python web application framework that has the same level of high performance as Go and NodeJS. The core of FastAPI is based on Starlette and Pydantic. Starlette is a lightweight ASGI (Asynchronous Server Gateway Interface) framework toolkit for building high-performance Asyncio services. Pydantic is a library that defines data validation, serialization, and documentation based on Python-type hints.

FastAPI has the following characteristics: