你的位置:首页 > 软件开发 > ASP.net > .NET开源高性能Socket通信中间件Helios介绍及演示

.NET开源高性能Socket通信中间件Helios介绍及演示

发布时间:2016-01-14 03:00:05
一:Helios是什么  Helios是一套高性能的Socket通信中间件,使用C#编写。Helios的开发受到Netty的启发,使用非阻塞的事件驱动模型架构来实现高并发高吞吐量。Helios为我们大大的简化了Socket编程,它已经为我们处理好了高并**况下的解包,粘包,buf ...

一:Helios是什么

  Helios是一套高性能的Socket通信中间件,使用C#编写。Helios的开发受到Netty的启发,使用非阻塞的事件驱动模型架构来实现高并发高吞吐量。Helios为我们大大的简化了Socket编程,它已经为我们处理好了高并**况下的解包,粘包,buffer管理等等。

  GitHub:https://github.com/helios-io/helios/

二:Helios的特点

  1.Powerful APIs

    Takes the complexity out of socket programming with intelligent I/O, concurrency, buffer management, and pipelining APIs.

    使用socket编程不再复杂。提供智能的I/O,并发,buffer管理,管道形式的API。

  2.Event-Driven

    Helios is Reactive - it uses a event-driven architecture to simplify development and build responsive systems that scale.

    Helios是反应式的,它使用事件驱动的架构来简化开发和构建易伸缩的系统。

  3.Performant

    Performance is a cross-cutting concern we factor in at every level in the design of the framework in order to eliminate overhead for your apps and clients.

    这个系统在开发和设计的时候都充分考虑到了性能,构建你的app和client的时候请消除这方面的顾虑。

  4.Battle-Tested

    Helios powers the clustering and remoting capbilities built into Akka.NET and more.

    Akka.net的集群,远程功能构建在Helios之上。

三:一个基于Helios的聊天室示例

  要用来演示Socket通信那么最好的示例无非就是聊天程序了。

  整个解决方案包含3个项目:

  .NET开源高性能Socket通信中间件Helios介绍及演示

  1.HeliosChat.Common

  这个项目里是一些公共的类型,新建完之后使用nuget添加helios的库

  .NET开源高性能Socket通信中间件Helios介绍及演示

  Message 类:所有发送的消息都是通过Message包装的,每一个消息都有一个Command跟Content来构成。

 public class Message  {    public Command Command { get; set; }    public string Content { get; set; }  }

原标题:.NET开源高性能Socket通信中间件Helios介绍及演示

关键词:.NET

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。