Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vert-x3/vertx-sync
https://github.com/vert-x3/vertx-sync
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vert-x3/vertx-sync
- Owner: vert-x3
- License: apache-2.0
- Created: 2015-05-30T09:49:51.000Z (over 9 years ago)
- Default Branch: 4.x
- Last Pushed: 2024-11-12T17:46:10.000Z (3 months ago)
- Last Synced: 2024-11-12T18:35:51.494Z (3 months ago)
- Language: Java
- Size: 1.29 MB
- Stars: 97
- Watchers: 35
- Forks: 37
- Open Issues: 14
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.txt
Awesome Lists containing this project
- vertx-awesome - Sync - Synchronous but non-OS-thread-blocking verticles. (Sync Thread Non Block)
README
[CAUTION]
====
This project is now deprecated with the https://github.com/puniverse/quasar[Quasar project] being effectively abandoned in Vert.x 4 and removed in Vert.x 5.Use https://github.com/vert-x3/vertx-virtual-threads-incubator/[Vert.x virtual thread instead].
===== Synchronous but non-OS-thread-blocking verticles
image:https://github.com/vert-x3/vertx-sync/workflows/CI/badge.svg?branch=master["Build Status", link="https://github.com/vert-x3/vertx-sync/actions?query=workflow%3ACI"]
*Love scalability?*
*Hate blocking kernel threads?*
*Hate callback hell?*
*Want to squash the pyramid of doom?*
*Well, now you can have your cake and eat it...*
Vert.x lets you write code without blocking kernel threads for i/o by offering non-blocking implementations of common operations. However, these operations are necessarily asynchronous, meaning that for complex processing pipelines, it is necessary to either nest callbacks (leading to "callback hell" or use a library such as Rx to enable composition). Wouldn't it be nice if you could write asynchronous code that just looked like synchronous code?
Vertx-sync allows you to deploy verticles that run using *fibers*. Fibers are very lightweight threads that can be
blocked without blocking a kernel thread.This enables you to write your asynchronous verticle code in a familiar synchronous style (i.e. no callbacks or promises or Rx). Consider it syntactic sugar over asynchronous processing. (Note, it cannot magically convert code which will block, such as synchronous JDBC operations, into non-blocking asynchronous code, so you will need to avoid using blocking libraries. If you do use a blocking library, you will block the event loop, which is to be avoided at all times).
As no kernel threads are blocked your application retains the scalability advantages of a non (kernel thread) blocking
application.Please see the in source asciidoc documentation or the main documentation on the web-site for a full description
of vertx-sync* Web-site docs
* link:src/main/asciidoc/index.adoc[Java in-source docs]