zoukankan      html  css  js  c++  java
  • Orleans框架简单示范

    希望现在学习Orleans不会晚,毕竟Server Fabric都开源了。本篇博客从Sample的HelloWorld示例程序来解读Orleans的Grains。

    Server配置参考 : https://dotnet.github.io/orleans/Documentation/clusters_and_clients/configuration_guide/server_configuration.html
    Client配置参考 : https://dotnet.github.io/orleans/Documentation/clusters_and_clients/configuration_guide/client_configuration.html
    对于客户端以及服务端的配置,建议配置上AddApplicationPart, 这样能够明确到Grain的类型及用途。

    Grain的相关:
    Grain的实现就不用说了.在这里要注意下Grain的持久化。参考 https://dotnet.github.io/orleans/Documentation/grains/grain_persistence/index.html

    对于Grain的获取,我们在定义Grain接口类型的时候,会继承自:
    IGrainWithStringKey、IGrainWithIntegerKey、IGrainWithGuidKey等接口,在这就指定了Grain的标志,我们定义了什么类型的Grain接口我们就使用什么类型去获取Grain. 参考: https://dotnet.github.io/orleans/Documentation/grains/grain_identity.html

    示例代码:https://github.com/RyanOvO/Orleans-HelloWorld

    主要的代码还是github上的,我只是完善了下Grain持久化那块。

  • 相关阅读:
    JavaScript中双叹号“!!”作用
    JavaScript两个变量的值交换的多种方式
    自定义npm包——typeScript版本
    自定义npm包的创建、发布、更新和撤销
    vuex概念总结及简单使用实例
    详解javascript: void(0);
    面向对象的CSS
    vue指令概览
    实现水平居中的办法
    C#分块下载文件
  • 原文地址:https://www.cnblogs.com/zhiyong-ITNote/p/10205558.html
Copyright © 2011-2022 走看看