DotNetty 1.0 发布,希望不会太晚。

一、前言

通过1个月修改,今天dotnetty 发布了1.0 版本,虽然不是官方发布,但是我把最大的问题内存泄漏修复了,运行了7个小时,同时直播推流三个通道内存稳定在55mb左右,cpu 稳定在0.4%, 服务器只有4核16G,看如下图

HttpFlv:http://demo.kayakiot.cn:281/httpflv.html (黑衣人)

HttpFlv:http://demo.kayakiot.cn:281/httpflv1.html (大红包)

HttpFlv:http://demo.kayakiot.cn:281/httpflv2.html (鹿鼎记)

rtmp:rtmp://demo.kayakiot.cn:76/live1/livestream2 (黑衣人)

rtmp:rtmp://demo.kayakiot.cn:76/live1/livestream3 (大红包)

rtmp:rtmp://demo.kayakiot.cn:76/live1/livestream4(鹿鼎记)

注:测试服务器带宽只有8MB, httpflv 缓冲做的没有rtmp好,然后httpflv卡就多刷新几次

凯亚 (Kayak) 是什么?

凯亚(Kayak)是基于.NET8.0软件环境下的surging微服务引擎进行开发的, 平台包含了微服务和物联网平台。支持异步和响应式编程开发,功能包含了物模型,设备,产品,网络组件的统一管理和微服务平台下的注册中心,服务路由,模块,中间服务等管理。还有多协议适配(TCP,MQTT,UDP,CoAP,HTTP,Grpc,websocket,rtmp,httpflv,webservice,等),通过灵活多样的配置适配能够接入不同厂家不同协议等设备。并且通过设备告警,消息通知,数据可视化等功能。能够让你能快速建立起微服务物联网平台系统。

凯亚物联网平台:http://demo.kayakiot.cn:3100(用户名:fanly 密码:123456)

链路跟踪Skywalking V8:http://117.72.121.2:8080/

dotnetty:https://github.com/microsurging/DotNetty

surging 微服务引擎开源地址:https://github.com/fanliang11/surging(后面surging 会移动到microsurging进行维护)

二、发布nuget

然后大家可以通过nuget 进行下载安装, 源码地址:GitHub - microsurging/DotNetty

三、如何使用

Dotnetty 1.0版本 可以不需要修改,但是耗时的业务调用会占用线程池,会导致线程池线程耗尽,内存溢出。为了解决这个问题,在创建EventLoopGroup时候可以选择TaskSchedulerType.Alone任务调度,代码如下:

默认任务调度:

复制代码
              var bossEventExecutor = new MultithreadEventLoopGroup(1);
              var workEventExecutor = new MultithreadEventLoopGroup();

     
             //Libuv
                var dispatcher = new DispatcherEventLoopGroup();
                 bossEventExecutor = dispatcher;
                 workEventExecutor = new WorkerEventLoopGroup(dispatcher);

TaskSchedulerType.Alone任务调度:

复制代码
                  var   bossEventExecutor = new MultithreadEventLoopGroup(1,TaskSchedulerType.Alone);
                   var  workEventExecutor = new MultithreadEventLoopGroup(TaskSchedulerType.Alone);

//Libuv
                var dispatcher = new DispatcherEventLoopGroup(TaskSchedulerType.Alone);
                 bossEventExecutor = dispatcher;
                 workEventExecutor = new WorkerEventLoopGroup(dispatcher,TaskSchedulerType.Alone);

四、插件化

你可以开发好的模块插件,通过模块管理上传。

在插件管理界面,就能看到上传的插件,上传的就是第三方应用,你也可以修改ID,对应插件的ModuleType

然后你可以查看api ,就能通过swagger 进行查看

五、总结

后面会陆续推出视频中心等模块,敬请期待!

相关推荐
周壮1 天前
01 一探究竟:从架构的演变看微服务化架构
微服务·云原生·架构
周壮1 天前
04 服务治理:Nacos 如何实现微服务服务治理
微服务·云原生·架构
EdisonZhou1 天前
MAF快速入门(12)主工作流+子工作流
llm·aigc·agent·.net core
2301_815357701 天前
Java项目架构从单体架构到微服务架构的发展演变
java·微服务·架构
努力搬砖的咸鱼1 天前
Kubernetes 核心对象详解:Pod、Deployment、Service
微服务·云原生·容器·架构·kubernetes
Chan161 天前
【 微服务SpringCloud | 方案设计 】
java·spring boot·微服务·云原生·架构·intellij-idea
Chan161 天前
【 微服务SpringCloud | 模块拆分 】
java·数据结构·spring boot·微服务·云原生·架构·intellij-idea
喵叔哟2 天前
66.【.NET8 实战--孢子记账--从单体到微服务--转向微服务】--新增功能--自动记账
微服务·架构·.net
这儿有个昵称2 天前
Java面试场景:从音视频到微服务的技术深挖
java·spring boot·spring cloud·微服务·面试·kafka·音视频
REDcker2 天前
C86 架构详解
数据库·微服务·架构