简体   繁体   中英

Non blocking API - Spring Reactor or Express (NodeJS) or Something else

We have a Java backend (JPA based data access mostly) and as the next phase of the application want to build a non blocking API layer that will be accessed by our user interface layer and need to finalize the stack.

We are split between Spring Reactor and Express. Our team has expertise in Spring but has never worked in Spring Reactor. They're pretty comfortable with Express though and love the simplicity of Express.

Does anyone have experience in evaluating the two frameworks? Or should we be looking at something totally different? Any pointers will be really helpful.

Since your backend uses Spring it's better using homogeneous tech stack. Coming back to Non-blocking IO this can be done by multiple ways

  1. Use asynchronous calls from UI or client
  2. Use websocket for communication. Fire the event and forget. Once data is available it will be pushed to the client. For this approach use SockJS for cross-browser support.
  3. Reactive programming using Spring Reactor or RxJava
  4. You can consider RxJS as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM