{"id":15103686,"url":"https://github.com/shawnjeffersonwang/netty","last_synced_at":"2026-01-27T23:49:54.733Z","repository":{"id":235970895,"uuid":"790804781","full_name":"ShawnJeffersonWang/netty","owner":"ShawnJeffersonWang","description":"This project focuses on Java NIO (Non-blocking I/O) and its three main components: Channels, Buffers, and Selectors. It includes examples of network programming, zero-copy techniques, I/O models, and the Netty framework.","archived":false,"fork":false,"pushed_at":"2024-06-08T12:09:13.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T10:14:12.500Z","etag":null,"topics":["bio","java","multithreading","netty","network-programming","nio","selector","zero-copy"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShawnJeffersonWang.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":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-23T15:02:01.000Z","updated_at":"2024-07-20T11:58:57.000Z","dependencies_parsed_at":"2024-04-25T06:23:30.903Z","dependency_job_id":"1c549ebd-100e-43ce-9d73-cf081533dc52","html_url":"https://github.com/ShawnJeffersonWang/netty","commit_stats":{"total_commits":8,"total_committers":2,"mean_commits":4.0,"dds":0.125,"last_synced_commit":"c6346846eb4911c9ffcfe3897db2267cfc2b0054"},"previous_names":["shawnjeffersonwang/netty"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnJeffersonWang%2Fnetty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnJeffersonWang%2Fnetty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnJeffersonWang%2Fnetty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShawnJeffersonWang%2Fnetty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShawnJeffersonWang","download_url":"https://codeload.github.com/ShawnJeffersonWang/netty/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247318746,"owners_count":20919483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bio","java","multithreading","netty","network-programming","nio","selector","zero-copy"],"created_at":"2024-09-25T19:41:30.402Z","updated_at":"2026-01-27T23:49:54.706Z","avatar_url":"https://github.com/ShawnJeffersonWang.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java Network Programming Practice\n\nThis repository contains examples and exercises related to Java's NIO (Non-blocking I/O). It covers the three main components of NIO, network programming, zero-copy techniques, I/O models, and the Netty framework.\n\n## Features\n\n- **NIO (Non-blocking I/O)**: Advanced I/O operations for high scalability.\n- **Zero-Copy**: Efficient data transfer techniques to minimize CPU usage.\n- **I/O Models**: Implementation of different I/O models including synchronous and asynchronous models.\n- **Netty Framework**: Exercises and examples using the Netty framework for building network applications.\n\n## NIO Components\n\nJava NIO introduces three primary components that are key to its non-blocking I/O capabilities:\n\n1. **Channels**: Channels represent open connections to entities such as hardware devices, files, or sockets. They are similar to streams but provide more versatile functionality and can be both readable and writable.\n\n2. **Buffers**: Buffers are containers for data that is being transferred between a channel and an application. Unlike streams, buffers can be read from and written to, making them essential for handling data in NIO.\n\n3. **Selectors**: Selectors allow a single thread to manage multiple channels, enabling non-blocking I/O operations. A selector can monitor multiple channels for events (such as data arrival or connection requests), facilitating efficient resource utilization.\n\n## Example: MultiThreadServer\n\nThe `MultiThreadServer` example demonstrates how to use these NIO components to create a scalable, multi-threaded server that can handle multiple client connections efficiently.\n## Getting Started\n\n1. **Clone the repository:**\n\n   ```sh\n   git clone https://github.com/ShawnJeffersonWang/Netty.git\n   cd Netty\n   ```\n\n2. **Build the project:**\n   Ensure you have Java and Maven installed. Then run:\n\n   ```sh\n   mvn clean install\n   ```\n\n3. **Run the examples:**\n   Navigate to the example you want to run and execute it using your preferred IDE or command line.\n\n## Dependencies\n\nThis project relies on the following dependencies:\n\n- **SLF4J:** For logging.\n- **Netty:** For advanced network programming examples.\n\nEnsure these dependencies are properly configured in your project setup before running the examples.\n\n## Usage\n\n1. **Explore the examples:** Browse through the different packages to find examples related to BIO, NIO, zero-copy, and Netty.\n2. **Run and modify the code:** Execute the examples and experiment with the code to deepen your understanding.\n3. **Refer to the documentation:** Use the comments and documentation within the code to guide your learning process.\n\n## Contributing\n\nContributions are welcome! If you find any issues or have suggestions for improvements, please submit a pull request or open an issue on this repository.\n\nWhen contributing, please adhere to the existing code style and follow the established guidelines.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE). You are free to modify and distribute the code as per the license terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawnjeffersonwang%2Fnetty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshawnjeffersonwang%2Fnetty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshawnjeffersonwang%2Fnetty/lists"}