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).
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);
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: