Looking for Cloud Services or Professional Support? Check restheart.com

Edit Page


What is RESTHeart?

RESTHeart is a framework for building HTTP microservices that aims to empower developers with intuitive APIs out of the box. It is built for developers, with a focus on simplicity, speed and ease of use.

It provides features commonly needed by applications like authentication/authorization and data management through MongoDB integration.

It has a modular architecture where core functionality is provided by restheart-core, and additional features are implemented as plugins.

In which programming language is RESTHeart written?

RESTHeart is primarily written in Java. Thanks to GraalVM, its SDK extends support to Java, Kotlin, JavaScript, and TypeScript. Implementing Hello World examples in any of these languages is straightforward.

Furthermore, RESTHeart is available and can be built with custom plugins as a binary executable, allowing for additional flexibility.

What are Virtual Threads

RESTHeart is the first framework to fully embrace the use of virtual threads, a groundbreaking feature introduced in Java 21. By leveraging virtual threads, RESTHeart achieves remarkable improvements in performance and efficiency. This innovative model makes RESTHeart faster, more lightweight, and simplifies the development of concurrent code. Virtual threads allow for better resource utilization and significantly reduce the complexity associated with concurrent programming, ensuring that RESTHeart remains at the forefront of high-performance, scalable frameworks.

Is it Open Source?

Absolutely! RESTHeart is released under the AGPL Open Source License, along with an Enterprise License.

The complete codebase is open source, and there are no distinctions in features between the AGPL and Enterprise License.

The Enterprise License is specifically designed for organizations seeking extra assurances and professional support.

How does it support MongoDB?

The MongoDB plugin exposes the full database capabilities through REST, GraphQL and Websockets with no backend code required. This cuts development time significantly.

What security features are supported?

RESTHeart offers comprehensive authentication and authorization services, supporting various security schemes. It enables the management of users and permissions directly in MongoDB collections, eliminating the need for backend code. This streamlined approach significantly reduces development time.

Why restheart is classified as a low code framework?

RESTHeart is classified as a low-code framework because it offers developers customizable APIs that are ready to go. It aims to empower developers with an intuitive framework that encompasses essential features, allowing them to build applications without the need to reinvent the wheel. RESTHeart provides pre-configured APIs that cover a broad range of functionality and are highly customizable to fit specific application needs. This approach reduces the amount of code developers need to write, streamlining the development process and making it easier and faster to build cloud-native HTTP microservices.

How can I extend the API?

A plugin is a software component that extends the functionality of RESTHeart, allowing you to add additional features and capabilities to the basic API. RESTHeart supports the development of plugins in Java, Kotlin, and JavaScript.

To add a plugin to RESTHeart, you need to follow these steps:

  1. Package your plugin as a JAR file for Java or Kotlin plugins, or as a JavaScript file and its companion package.json for JavaScript plugins.

  2. Copy the JAR or JavaScript plugin into the ./plugins directory of your RESTHeart installation.

  3. Restart RESTHeart to apply the changes and load the plugin.

Once the plugin is added and RESTHeart is restarted, it will be automatically detected and integrated into the RESTHeart framework, extending its functionality according to the features implemented in the plugin.

Please note that for JavaScript plugins, you need to run RESTHeart on GraalVM or on RESTHeart native.

What categories of plugins are available?

There are four types of plugins in RESTHeart:

  1. Service: These plugins extend the API by adding web services.

  2. Interceptor: These plugins snoop and modify requests and responses at different stages of the request lifecycle.

  3. Initializer: These plugins execute initialization logic at system startup time.

  4. Provider: These plugins provide objects to other plugins via the @Inject annotation.

Additionally, it is also possible to develop security plugins to customize the security layer.

What about performances?

In RESTHeart performance is a priority with support for huge throughput, horizontal scaling, and GraalVM for better performance in containers.

It is designed for microservices deployment in Docker/Kubernetes and can run as a standalone JAR, native binary or Docker image.

Does the SDK provide a Dependency Injection feature?

Yes! Dependency injection in RESTHeart works by using the @Inject and @OnInit annotations in conjunction with provider classes.

To implement dependency injection, a provider class must implement the Provider interface and be annotated with @RegisterPlugin. The provider class provides the object that will be injected into other classes.

Overall, dependency injection in RESTHeart allows for the easy injection of provided objects into other classes, reducing the need for manual object creation and management.