首页 > 其他 > 详细

Orleans框架-从示例代码开始(1)

时间:2019-01-01 19:47:23      阅读:356      评论:0      收藏:0      [点我收藏+]

希望现在学习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持久化那块。

Orleans框架-从示例代码开始(1)

原文:https://www.cnblogs.com/zhiyong-ITNote/p/10205558.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!