Tio-Boot is a new generation Java web development framework that is faster, smaller, and simpler! It offers 2 to 3 times higher concurrency, saves 1/3 to 1/2 of memory, starts up 5 to 10 times faster, and reduces package size by 1/2 to 1/10. Built on Java AIO, Tio-Boot enables a 2-core 4G Linux server to handle tens of thousands of concurrent connections.
- Based on Java AIO and T-IO: Utilizes Java asynchronous I/O and T-IO for high efficiency.
- Incorporates Spring-Boot Configuration Principles: Supports commonly used Spring-Boot annotations without using Spring's IOC and AOP.
- Integrates JFinal AOP: Supports DI, IOC, and AOP for dependency injection.
- Includes JFinal Enjoy Template Engine and Active Record: Provides support for database operations and template engine.
- Supports Common Web Components: Includes interceptors, WebSocket, handlers, and controllers.
Simplicity, ease of use, rapid development, and fast execution.
Striving for simplicity, returning to basics, staying lightweight, and developing efficiently.
- No Servlet: Uses Java AIO for network connections, supporting asynchronous, non-blocking, and high performance.
- Multi-Protocol Support: Supports UDP, TCP, HTTP, and WebSocket on a single port.
- Compatible with Embedded Devices: Can run on Android systems.
- Fast Startup and Small Size: When providing HTTP service only, the packaged JAR file is 3MB, with a startup time of 300ms.
- Hot Reload Support in Development Environment: When used with
hotswap-classloader
, it enables reloading within 20ms without restarting the application, significantly improving development efficiency. - Supports Compilation into Binary Files: Can be compiled into binary files using GraalVM.
- Memory Usage Halved
- Server Count Halved
- Performance Test 1: 1.9G memory stably supports 300,000 TCP long connections. Details
- Performance Test 2: T-IO achieves 10.51 million chat messages per second. Details
- Performance Test 3: Comparison test results between Netty and T-IO. Details
- High Learning Curve: Requires a solid programming foundation to understand related concepts.
Tio-Boot offers developers a high-performance and efficient development tool. However, due to its complex concepts and steep learning curve, a deep programming background is necessary to fully leverage its advantages.
Tio-Boot is available in the Maven repository: Tio-Boot
Add the following to your pom.xml
:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
<maven.compiler.target>${java.version}</maven.compiler.target>
<tio-boot.version>1.6.2</tio-boot.version>
<jfinal-aop.version>1.2.7</jfinal-aop.version>
</properties>
<dependencies>
<dependency>
<groupId>com.litongjava</groupId>
<artifactId>tio-boot</artifactId>
<version>${tio-boot.version}</version>
</dependency>
<dependency>
<groupId>com.litongjava</groupId>
<artifactId>jfinal-aop</artifactId>
<version>${jfinal-aop.version}</version>
</dependency>
</dependencies>
package com.litongjava.tio.web.hello;
import com.litongjava.jfinal.aop.annotation.AComponentScan;
import com.litongjava.tio.boot.TioApplication;
@AComponentScan
public class HelloApp {
public static void main(String[] args) {
long start = System.currentTimeMillis();
TioApplication.run(HelloApp.class, args);
long end = System.currentTimeMillis();
System.out.println((end - start) + "ms");
}
}
package com.litongjava.tio.web.hello;
import com.litongjava.tio.http.server.annotation.RequestPath;
@RequestPath("/")
public class IndexController {
@RequestPath()
public String index() {
return "index";
}
}
If you encounter any issues while using Tio-Boot, feel free to reach out using the contact information provided below.
Feel free to fork the repository and submit a pull request.
- WeChat: jdk131219
- Email: litongjava@qq.com