{"id":32486828,"url":"https://github.com/inqwise/inqwise-async","last_synced_at":"2026-04-06T06:03:05.252Z","repository":{"id":319532453,"uuid":"878062444","full_name":"inqwise/inqwise-async","owner":"inqwise","description":"Inqwise Async bridges Java’s blocking I/O with Vert.x’s non-blocking APIs. It wraps classes like InputStream, OutputStream, Reader, and Writer, allowing seamless integration of existing Java code into Vert.x reactive applications without blocking the event loop. Enhance efficiency and scalability in high-performance, event-driven environments.","archived":false,"fork":false,"pushed_at":"2026-03-23T09:23:30.000Z","size":192,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-24T06:54:05.431Z","etag":null,"topics":["async","blocking","bridge","java","reactive","vertx"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/inqwise.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-10-24T17:59:45.000Z","updated_at":"2026-03-23T09:23:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"826ea95a-05b1-44e5-91ba-98ad28edfc33","html_url":"https://github.com/inqwise/inqwise-async","commit_stats":null,"previous_names":["inqwise/inqwise-async"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/inqwise/inqwise-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inqwise","download_url":"https://codeload.github.com/inqwise/inqwise-async/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inqwise%2Finqwise-async/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31461534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","blocking","bridge","java","reactive","vertx"],"created_at":"2025-10-27T06:00:42.380Z","updated_at":"2026-04-06T06:03:05.247Z","avatar_url":"https://github.com/inqwise.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Inqwise Async - Blocking to Vert.x Non-Blocking Bridge\n\n[![CI](https://github.com/inqwise/inqwise-async/actions/workflows/ci.yml/badge.svg)](https://github.com/inqwise/inqwise-async/actions/workflows/ci.yml)\n[![Release](https://github.com/inqwise/inqwise-async/actions/workflows/release.yml/badge.svg)](https://github.com/inqwise/inqwise-async/actions/workflows/release.yml)\n[![CodeQL](https://github.com/inqwise/inqwise-async/actions/workflows/codeql.yml/badge.svg)](https://github.com/inqwise/inqwise-async/actions/workflows/codeql.yml)\n[![Codecov](https://codecov.io/gh/inqwise/inqwise-async/branch/master/graph/badge.svg)](https://codecov.io/gh/inqwise/inqwise-async)\n[![Snyk Security](https://github.com/inqwise/inqwise-async/actions/workflows/snyk.yml/badge.svg)](https://github.com/inqwise/inqwise-async/actions/workflows/snyk.yml)\n[![Maven Central](https://img.shields.io/maven-central/v/com.inqwise/inqwise-async.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.inqwise%22%20AND%20a:%22inqwise-async%22)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Java Version](https://img.shields.io/badge/Java-21%2B-blue.svg)](https://openjdk.java.net/projects/jdk/21/)\n[![Vert.x](https://img.shields.io/badge/Vert.x-5.0.4%2B-purple.svg)](https://vertx.io/)\n\nInqwise Async bridges standard Java blocking I/O structures with Vert.x's asynchronous, non-blocking APIs. By providing robust wrappers for traditional Java classes such as [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html), [`OutputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/OutputStream.html), [`Reader`](https://docs.oracle.com/javase/8/docs/api/java/io/Reader.html), [`Writer`](https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html), and more, Inqwise Async enables developers to integrate existing Java codebases into Vert.x-based reactive applications without disrupting the event loop. This bridge ensures efficient and scalable I/O operations by managing back-pressure and flow control, facilitating the modernization of legacy systems for high-performance, event-driven environments.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installation](#installation)\n  - [Maven Dependency](#maven-dependency)\n- [Usage](#usage)\n  - [Stream Package](#stream-package)\n- [Examples](#examples)\n  - [Wrapping an InputStream as a ReadStream](#wrapping-an-inputstream-as-a-readstream)\n  - [Wrapping an OutputStream as a WriteStream](#wrapping-an-outputstream-as-a-writestream)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nInqwise Async is a Java library designed to seamlessly integrate standard blocking I/O operations with Vert.x's non-blocking, asynchronous framework. It provides wrappers for Java's traditional I/O classes, allowing developers to incorporate existing blocking code into reactive applications without compromising the performance and scalability that Vert.x offers. This integration is crucial for modernizing legacy systems and ensuring efficient resource management in high-throughput environments.\n\n## Features\n\n- **Seamless Integration**: Wraps standard Java I/O classes (`InputStream`, `OutputStream`, `Reader`, `Writer`) as Vert.x `ReadStream` and `WriteStream`.\n- **Non-Blocking Operations**: Ensures that blocking I/O does not hinder the Vert.x event loop, maintaining application responsiveness.\n- **Back-Pressure Management**: Handles flow control to prevent overwhelming the system with data.\n- **Thread-Safe Execution**: Utilizes `ExecutorService` to manage blocking operations in separate threads.\n- **Easy to Use API**: Provides intuitive methods for wrapping and interacting with I/O streams.\n- **Extensible Design**: Can be extended to support additional I/O classes and functionalities as needed.\n\n## Installation\n\n### Maven Dependency\n\nTo include the Inqwise Async library in your Maven project, add the following dependency to your `pom.xml` file:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.inqwise\u003c/groupId\u003e\n    \u003cartifactId\u003einqwise-async\u003c/artifactId\u003e\n    \u003cversion\u003e${latest.version}\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nEnsure that your project's repositories are correctly configured. If the library is available on [Maven Central](https://search.maven.org/), no additional repository configuration is required.\n\n**Note**: Replace the version number with the latest version if a newer one is available.\n\n## Usage\n\nInqwise Async provides straightforward methods to wrap Java's blocking I/O streams into Vert.x's non-blocking streams. Below is a guide on how to utilize these wrappers effectively.\n\n### Stream Package\n\nThe `stream` package within Inqwise Async offers classes that encapsulate Java's I/O streams and expose them as Vert.x `ReadStream` and `WriteStream`. This allows for asynchronous data processing and integration with Vert.x's reactive pipelines.\n\n#### Key Classes:\n\n- `AsyncReadStream`: Wraps a standard `InputStream` and exposes it as a Vert.x `ReadStream\u003cBuffer\u003e`.\n- `AsyncWriteStream`: Wraps a standard `OutputStream` and exposes it as a Vert.x `WriteStream\u003cBuffer\u003e`.\n\nThese classes manage the execution of blocking operations using a dedicated `ExecutorService`, ensuring that the Vert.x event loop remains unblocked.\n\nWhen chaining stream configuration methods, register `exceptionHandler(...)` and `endHandler(...)` before invoking `handler(...)` so that error and completion logic is ready before data emission begins.\n\n## Examples\n\n### Wrapping an InputStream as a ReadStream\n\n```java\nimport com.inqwise.async.stream.AsyncReadStream;\nimport io.vertx.core.Vertx;\nimport io.vertx.core.buffer.Buffer;\nimport io.vertx.core.streams.ReadStream;\n\nimport java.io.FileInputStream;\nimport java.io.InputStream;\n\npublic class ReadStreamExample {\n    public static void main(String[] args) throws Exception {\n        Vertx vertx = Vertx.vertx();\n        InputStream inputStream = new FileInputStream(\"example.txt\");\n        ReadStream\u003cBuffer\u003e readStream = new AsyncReadStream(vertx, inputStream);\n\n        readStream\n            .exceptionHandler(err -\u003e {\n                System.err.println(\"Error: \" + err.getMessage());\n            })\n            .endHandler(v -\u003e {\n                System.out.println(\"Stream has ended.\");\n                vertx.close();\n            })\n            .handler(buffer -\u003e {\n                System.out.println(\"Received data: \" + buffer.toString());\n            });\n    }\n}\n```\n\n**Explanation:**\n\n1. **Initialization**: Create a Vert.x instance and an `InputStream` pointing to your source file.\n2. **Wrapping**: Instantiate `AsyncReadStream` with Vert.x and the `InputStream`.\n3. **Handlers**:\n   - **Data Handler**: Processes incoming data asynchronously.\n   - **Exception Handler**: Handles any errors during the read operation.\n   - **End Handler**: Notifies when the stream has been fully read or closed.\n\n### Wrapping an OutputStream as a WriteStream\n\n```java\nimport com.inqwise.async.stream.AsyncWriteStream;\nimport io.vertx.core.Vertx;\nimport io.vertx.core.buffer.Buffer;\nimport io.vertx.core.streams.WriteStream;\n\nimport java.io.FileOutputStream;\nimport java.io.OutputStream;\n\npublic class WriteStreamExample {\n    public static void main(String[] args) throws Exception {\n        Vertx vertx = Vertx.vertx();\n        OutputStream outputStream = new FileOutputStream(\"output.txt\");\n        WriteStream\u003cBuffer\u003e writeStream = new AsyncWriteStream(vertx, outputStream);\n\n        writeStream.exceptionHandler(err -\u003e {\n            System.err.println(\"Error: \" + err.getMessage());\n        });\n\n        Buffer data = Buffer.buffer(\"Hello, Inqwise Async!\");\n        writeStream.write(data).onComplete(ar -\u003e {\n            if (ar.succeeded()) {\n                System.out.println(\"Data written successfully.\");\n            } else {\n                System.err.println(\"Failed to write data: \" + ar.cause().getMessage());\n            }\n        });\n\n        writeStream.end(ar -\u003e {\n            if (ar.succeeded()) {\n                System.out.println(\"Stream closed successfully.\");\n            } else {\n                System.err.println(\"Failed to close stream: \" + ar.cause().getMessage());\n            }\n            vertx.close();\n        });\n    }\n}\n```\n\n**Explanation:**\n\n1. **Initialization**: Create a Vert.x instance and an `OutputStream` pointing to your destination file.\n2. **Wrapping**: Instantiate `AsyncWriteStream` with Vert.x and the `OutputStream`.\n3. **Handlers**:\n   - **Exception Handler**: Handles any errors during the write operation.\n   - **Write Operation**: Writes data asynchronously and notifies upon completion.\n   - **End Handler**: Closes the stream and notifies upon successful closure or failure.\n\n## Contributing\n\nContributions are welcome! If you'd like to contribute to the project, please follow these steps:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bug fix.\n3. Commit your changes with clear commit messages.\n4. Submit a pull request describing your changes.\n\nPlease ensure that your code adheres to the project's coding standards and includes appropriate tests.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\nIf you have any questions or need further assistance, feel free to open an issue or contact the maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finqwise%2Finqwise-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finqwise%2Finqwise-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finqwise%2Finqwise-async/lists"}