Akka​ 的 .NET 开源实现 Akka.NET

码农软件 · 软件分类 · 并发/并行处理框架 · 2019-09-02 18:57:03

软件介绍

Akka.NET 是 Akka 的 .NET 开源实现。用于构建强大的并发和分布式应用。Akka 是一个用 Scala 编写的库,用于简化编写容错的、高可伸缩性的 Java 和 Scala 的 Actor 模型应用。

示例代码:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Akka;
using Akka.Actor;

namespace ConsoleApplication11
{
    public class Greet
    {
        public Greet(string who)
        {
            Who = who;
        }
        public string Who { get;private set; }
    }

    public class GreetingActor : ReceiveActor
    {
        public GreetingActor()
        {
            Receive<Greet>(greet => 
               Console.WriteLine("Hello {0}", greet.Who));
        }
    }

    class Program
    {
        static void Main(string[] args)
        {
            //create a new actor system (a container for your actors)
            var system = ActorSystem.Create("MySystem");
            //create your actor and get a reference to it.
            //this will be an "ActorRef", which is not a 
            //reference to the actual actor instance
            //but rather a client or proxy to it
            var greeter = system.ActorOf<GreetingActor>("greeter");
            //send a message to the actor
            greeter.Tell(new Greet("World"));

            //this prevents the app from exiting
            //Before the async work is done
            Console.ReadLine();
        }
    }
}

本文地址:https://www.codercto.com/soft/d/13736.html

分布式机器学习:算法、理论与实践

分布式机器学习:算法、理论与实践

刘铁岩、陈薇、王太峰、高飞 / 机械工业出版社 / 2018-10-20 / 89.00

人工智能和大数据时代,解决最有挑战性问题的主流方案是分布式机器学习!本书旨在全面介绍分布式机器学习的现状,深入分析其中的核心技术问题,并且讨论该领域未来的发展方向。 由微软亚洲研究院机器学习核心团队潜心力作!鄂维南院士、周志华教授倾心撰写推荐序! 本书旨在全面介绍分布式机器学习的现状,深入分析其中的核心技术问题,并且讨论该领域未来的发展方向。 全书共12章。第1章是绪论,向大家展......一起来看看 《分布式机器学习:算法、理论与实践》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

html转js在线工具
html转js在线工具

html转js在线工具

HSV CMYK 转换工具
HSV CMYK 转换工具

HSV CMYK互换工具