Cpu, memory, hard disk, network monitoring built into the program no code and extra tools
required monitor
Ⅱ. Who uses this project
Projects with extremely high-performance requirements, such as website and game server frameworks, single server, global server, live chat, IM system, real-time push
Projects such as saving, development, deployment, operation and maintenance costs
As a backend infrastructure for Godot, Unity, Cocos,Webgl, H5, Network protocol supports tcp udp websocket http
// Service provider, only need to add an annotation to the method, the interface will be automatically registered
@PacketReceiver
public void atUserInfoAsk(Session session, UserInfoAsk ask) {
}
// Consumers, synchronously requesting remote service, will block the current thread
var ask = UserInfoAsk.valueOf(userId);
var answer = NetContext.getCosumer().syncAsk(ask, UserInfoAnswer.class, userId).packet();
// Consumers, asynchronously requesting remote service, and will still execute logic in the current thread after the asynchronous
NetContext.getCosumer().asyncAsk(ask, UserInfoAnswer.class, userId)
.whenComplete(answer -> {
// do something
);
3. hotswap hot update code, no need to stop the server, no additional configuration, just one line of code to start hot update
// Pass in the class file that needs to be updated
HotSwapUtils.hotswapClass(bytes);
4. orm automatic mapping framework based on mongodb
// You don't need to write sql and any configuration yourself, define a table in the database directly through annotation definitions
@EntityCache
public class UserEntity implements IEntity<Long> {
@Id
private long id;
private String name;
}
// update database data
entityCaches.update(userEntity);
5. event use the observer design pattern, decouples different modules and improves the quality of the code
// To receive an event, you only need to add an annotation to the method and the method will be automatically listen for the event
@EventReceiver
public void onMyNoticeEvent(MyNoticeEvent event) {
// do something
}
// fire an event
EventBus.post(MyNoticeEvent.valueOf("My event"));
6. scheduler scheduling Framework Based on Cron Expression
@Scheduler(cron = "0/1 * * * * ?")
public void cronSchedulerPerSecond() {
// do something
}
7. storage Excel to class automatic mapping framework, you only need to define a class corresponding to Excel, and directly parse Excel
@Storage
public class StudentResource {
@Id
private int id;
@Index
private String name;
private int age;
}
Ⅵ. Commit specification👏
People who like this project are welcome to maintain this project together, and pay attention to the following
specifications when submitting code
The code formats use the default formatting of IntelliJ Idea