简体   繁体   English

Akka.net actor是否适合GET和搜索操作?

[英]Does Akka.net actor suitable for GET and Search Operation?

We are using akka.net actor model in current project. 我们在当前项目中使用akka.net actor模型。 I used an entity actor to handle insert, update and delete operations on it. 我使用一个实体actor来处理它的插入,更新和删除操作。 In a case of search or get does actor model not suit? 在搜索或获取的情况下,演员模型不合适吗?

If it is support in UI how it possible to get result (weather to used Ask function) 如果在UI中受支持,如何获得结果(使用的Ask函数的天气)

Does it not good practice to use akka.net actor model for get and query data? 使用akka.net actor模型获取和查询数据不是很好的做法吗?

You could implement a some equivalent of GetState operation, however IMHO in case of UI, I think that much better is to perform a conceptual switch. 您可以实现某种等效的GetState操作,但是在UI的情况下恕我直言,我认为执行概念上的转换要好得多。 Instead of making UI asking if state of an actor has changes, you could subscribe client to get updates about actor state changes when they actually happen. 您可以让客户端订阅以获取有关行为者状态更改的更新,而不是让UI询问行为者状态是否发生更改。

Akka.Streams is particularly nice and handy to implement this sort of functionality ;) Akka.Streams特别好用,方便实现这种功能;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM