Skip to content

mariadb-developers/reactive-programming-java-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reactive programming with Project Reactor and R2DBC

License

Learn about Reactive Programming in Java (watch the webinar):

  • Start with reactive-programming and see how one thread can successfully serve 10 users.
  • Take a look at blocking-service to see a typical REST web service with JDBC connections.
  • See how to use the Flux class and R2DBC to build a fully reactive service.
  • Compare throughput using Artillery. See how many HTTP 200 OK responses you get on each service (test scripts included on each service project).

Setting up the MariaDB database

To run the experiments in this repository, you'll need a MariaDB database running on your machine with the following database and table:

CREATE DATABASE reactive;
USE reactive;

CREATE TABLE `word` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `text` varchar(64) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=Aria;

Note: Aria is a storage engine for read-heavy workoads, but it has some limitations. See this blog post.

Insert or import test data into this table. For example, download this CSV file and import it as follows:

LOAD DATA LOCAL INFILE '/path/to/words_pos.csv'
    IGNORE INTO TABLE word
    FIELDS
    TERMINATED BY ','
    LINES TERMINATED BY '\n'
    IGNORE 0 LINES
    (@dummy, text) SET text = UPPER(text);

Support and Contribution

Please feel free to submit PR's, issues or requests to this project directly.

If you have any other questions, comments, or looking for more information on MariaDB please check out:

Or reach out to us directly via:

Releases

No releases published

Languages