当前位置: 移动技术网 > IT编程>开发语言>.net > Orleans框架-从示例代码开始(1)

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

2019年01月03日  | 移动技术网IT编程  | 我要评论

法医怪谈,salesclerk,lanqiubifen

希望现在学习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/

对于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持久化那块。

如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复

相关文章:

验证码:
移动技术网