Skip to main content

ionet: Distributed Network Communication for Java

A lightweight, lock-free, event-driven framework for high-performance distributed network communication.

 ionet possesses the capability of "write once, connect everywhere," and it provides code generation assistance for clients, which can help client developers reduce a significant workload.

You only need to write Java code once, and you can generate unified interaction interfaces for projects such as Godot, UE, Unity, CocosCreator, Laya, React, Vue, Angular... and more.

Supported languages: C#、TypeScript、GDScript、C++、Lua.
 

Client requests _server

Java Action

public async Task TestLoginVerify()
{
var loginVerifyMessage = new LoginVerifyMessage { Jwt = "10" };

// code style: callback. Advantages: simple, integrated.
// cn: 编码风格:回调。 优点:简洁,一体化。
MyAction.OfLoginVerify(loginVerifyMessage, result =>
{
var userMessage = result.GetValue<UserMessage>();
result.Log(userMessage);
});

// code style: async await. Advantages: Avoid callback hell.
// cn: 编码风格:async await 机制。 优点:可避免回调地狱。
var result = await MyAction.OfAwaitLoginVerify(loginVerifyMessage);
var userMessage = result.GetValue<UserMessage>();
result.Log(userMessage);
}

public async Task TestIntValue()
{
const int value = 1;

MyAction.OfIntValue(value, result =>
{
result.Log(result.GetInt());
});

var result = await MyAction.OfAwaitIntValue(value);
result.Log(result.GetInt());
}

public async Task TestListString()
{
const string value = "hello";

MyAction.OfListString(value, result =>
{
result.Log(result.ListString());
});

var result = await MyAction.OfAwaitListString(value);
result.Log(result.ListString());
}
@ActionController(1)
public final class MyAction {
@ActionMethod(1)
private UserMessage loginVerify(LoginVerifyMessage verifyMessage) {
var userMessage = new UserMessage();
...
return userMessage;
}

@ActionMethod(2)
private int intValue(int value) {
return value + 1;
}

@ActionMethod(3)
private List<String> listString(String value) {
return List.of(value, "ionet");
}
}

.proto
syntax = "proto3";
package common;

// LoginVerify
message LoginVerifyMessage {
// jwt
string jwt = 1;
}

// User
message UserMessage {
// userId
int64 user_id = 1;
// nickname
string name = 2;
}
Focus on What Matters

Nanosecond-Level End-to-End Latency

ionet is built for ultra-low latency and high throughput with lock-free design and minimal runtime overhead.

Easy to Use

Client SDK and Code Generation

Write server-side Java once, then generate unified client interfaces for engines and web apps. Supported languages include C#、TypeScript、GDScript、C++、Lua.

Powered by React

Multiple Protocols and Connections

Reuse one business codebase across Protobuf、JSON and connection types like TCP、WebSocket、UDP.

Easy to Use

Load Balancing and Distributed Scaling

Built-in load balancing and flexible service topology help you scale out or in with minimal friction.

Powered by React

Thread Safety by Design

Consistent threading strategy helps avoid user-level concurrency issues and simplifies safe business logic.

Focus on What Matters

Flexible Architecture

External services and logic services can run independently or together, adapting to different game and app models.

Powered by React

Modular Services

Logic services can run as standalone components, making feature reuse and modularization straightforward.

Focus on What Matters

Multiple Communication Models

Supports broadcast, request/void, and request/response models for different interaction patterns.

Easy to Use

MVC-like Development Style

A clean Java Bean style helps keep action logic clear and avoids class explosion in large projects.

Focus on What Matters

Excellent DX and Fewer Integration Docs

With protocol contracts in code, validation, and error assertions, integration and maintenance become much easier.

Easy to Use

Simulated Client Requests

Simulate real network interactions for long-running, interactive testing without manual repetitive frontend clicks.

Powered by React

Pluggable Architecture

Extensible plugins support observability and debugging so issues can be detected earlier in development.