Home

What are microservices?


© 2019-2022 rxmicro.io. Free use of this software is granted under the terms of the Apache License 2.0.

Copies of this entity may be made for Your own use and for distribution to others, provided that You do not charge any fee for such copies and further provided that each copy contains this Copyright Notice, whether distributed in print or electronically.

If You find errors or omissions in this entity, please don’t hesitate to submit an issue or open a pull request with a fix.

RxMicro is a modern, JVM-based, full stack framework designed to develop distributed reactive applications that use a microservice architecture.

The RxMicro framework provides developers with a convenient tool to focus on writing an application business logic. Meanwhile, routine and standard operations, which are the prerequisite for launching an application, are delegated to the framework.

The RxMicro framework is small and lightweight. Even though the RxMicro framework is designed to create microservices, a developer can easily use separate RxMicro modules to develop any type of application using a reactive approach.

The RxMicro framework is a framework that uses reactive programming as the main and only approach when designing microservices.

Any blocking operations are not supported!

When developing a project using the RxMicro framework, use only non-blocking drivers to interact with databases, network connections and files. Otherwise Your project will work too slow, and won’t be able to process a large number of clients' requests.

1. RxMicro Features

The RxMicro framework provides the following feature set:

  1. Declarative programming using annotations.

  2. Reactive programming using common libraries:

  3. Configuring using java configuration, annotations, files, system properties and environment variables.

  4. Declarative handlers of HTTP requests to the microservice.

    1. Request routing based on HTTP method, URL path and HTTP body analysis.

    2. HTTP header processing.

    3. HTTP parameter processing.

    4. Path variable support.

    5. Automatic conversion of request data into Java model and vice versa.

    6. Built-in validation of requests and responses.

    7. Static configuration support.

    8. Handler versioning support.

    9. Cross-Origin Resource Sharing (CORS) support.

    10. Support for request identification during inter-service interaction.

  5. Declarative REST client.

    1. HTTP header processing.

    2. HTTP parameter processing.

    3. Path variable support.

    4. Automatic conversion of request data into Java model and vice versa.

    5. Built-in validation of requests and responses.

    6. Static configuration support.

    7. REST client versioning support.

    8. Request timeout.

    9. Automatic redirection support.

    10. Customization option for standard client implementation.

  6. Contexts and Dependency Injection (CDI).

    1. Dependencies can be explicitly managed without using CDI.

    2. Dependency injection by fields, methods and constructors.

    3. Qualifier support.

    4. Factory method support.

    5. Post construct method support.

    6. Class factory support.

    7. Optional injection.

    8. Resource injection.

    9. Multibinder support.

    10. Dependency injection using JEE and Spring style.

  7. Generation of REST-based microservice documentation.

    1. Documenting with annotations.

    2. asciidoc support (widely used and multifunctional documenting format).

    3. Configuration of the project documentation standard sections.

  8. Data Repositories.

    1. Postgre SQL Data Repositories.

      1. SELECT, INSERT, UPDATE, DELETE operation support.

      2. Auto-generated primary key support.

      3. Composite primary key support.

      4. Transaction support.

      5. Variable support in SQL query.

      6. Customized SELECT queries support.

      7. Possibility to customize a standard repository implementation.

      8. Access to a low-level API.

      9. Auto registration of enum codecs.

    2. Mongo Data Repositories.

      1. find, aggregate, distinct, insert, update, delete, countDocuments and estimatedDocumentCount operation support.

      2. Auto-generated entity id support.

      3. Query parameter logging.

      4. Possibility to customize a standard repository implementation.

      5. Access to a low-level API.

  9. Monitoring

    1. Health checks.

    2. Request tracing.

  10. Testing.

    1. Component testing.

    2. REST-based microservices testing.

    3. Integration testing.

    4. Support for alternatives and mocks.

    5. Integration with JUnit 5 and Mockito frameworks.

    6. Integration with DBUnit framework.

  11. Monitoring.

    1. Health checks.

    2. Request tracing.

  12. Integration with other Java libraries and frameworks.

2. RxMicro Benefits

The RxMicro framework provides the following benefits:

  • Declarative programming using annotations.

  • CDI by demand.

  • Human readable generated code.

  • Verifier of the redundant and inefficient source code.

  • Runtime without reflection.

  • Fast startup time.

  • Reduced memory footprint.

These benefits are gained due to:

  • using of Java annotation processors, which generates standard code based on RxMicro Annotations;

  • replacing standard Java libraries that require reflection for their work with analogs that do not need reflection;

  • using of Netty as the primary NIO framework for non-blocking asynchronous IO operations;

  • generation of low-level code avoiding unnecessary abstractions and proxies.

3. Requirements

The RxMicro framework requires JDK 11 LTS or higher.

To succeed in studying this guide, it is assumed that the reader is familiar with the following technologies:

The RxMicro framework uses the following Java modules:

  • Common module(s):

  • The rxmicro.logger module requires the following module(s):

  • REST client and REST based microservice test modules require the following module(s):

  • The rxmicro.data.r2dbc.postgresql module requires the following module(s):

  • Netty requires the the following module(s):

    • jdk.unsupported.

Home

What are microservices?