Coder Social home page Coder Social logo

spring-webflux-reactive-jdbc-sample's Introduction

spring-webflux-reactive-jdbc-sample

This is an example program for demonstrating How do we integrate the inherently blocking JDBC API to the world of reactive programming.

The point is to have a dedicated, well-tuned thread pool and isolate the blocking code there.

functionality

A simple city table which consists of id(auto-generated pk), country and name columns is used.

Blocking version

URL functionality
http://localhost:8080/ list all cities
http://localhost:8080/one get one city(for simplicity, a fixed city is queried)
http://localhost:8080/add add a city with a random name

Non-blocking version.

URL functionality
http://localhost:8080/rx/ list all cities
http://localhost:8080/rx/one get one city(for simplicity, a fixed city is queried)
http://localhost:8080/rx/add add a city with a random name

Reference:

  1. https://www.changchao.me/?p=795
  2. http://musigma.org/java/2016/11/21/reactor.html
  3. https://stackoverflow.com/questions/42299455/spring-webflux-and-reading-from-database
  4. https://github.com/spring-projects/spring-boot/tree/master/spring-boot-samples/spring-boot-sample-data-jpa
  5. http://www.grahamlea.com/2014/07/rxjava-threading-examples/
  6. https://spring.io/blog/2016/07/20/notes-on-reactive-programming-part-iii-a-simple-http-server-application

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.