Microsoft Orleans和共同主持的客户

发布于 2025-02-13 19:21:33 字数 590 浏览 3 评论 0原文

我正在与Microsoft Orleans开始侧项目(这是一个相对简单的在线游戏),我对与共同托管客户端有关的部署和结构有疑问( https://dotnet.github.io/orleans/docs/host/client.html#co-host-clients

游戏本身将是一个将连接到Web API的大风应用程序这是我疑问的地方:根据《奥尔良文献》,筒仓(或他们所说的“谷物代码”)应与客户端,在这种情况下将是Web API。

我不知道我是否错过了什么,但我知道这意味着我将在每个筒仓中有一个Web API实例,在1:1的关系中,对吗?例如,如果一个人想用5个孤岛部署一个群集,我每个人都会有一个Web API的实例...?这听起来对我有些奇怪。

正如我说的那样,这似乎是建议,但是我要去这里一个问题,即如何分别扩展这些元素,因为我肯定想要比Web API更多的孤岛?

这是这样还是我错了,我正在混合概念?

I am starting a side-project with Microsoft Orleans (it is a relatively simple online game) and I have a doubt about the deploy and the structure in relation to the Co-Hosted Clients (https://dotnet.github.io/orleans/docs/host/client.html#co-hosted-clients)

The game itself will be a Blazor application that will be connected to a Web Api, and here is where my doubt arises: according to the Orleans documentation, the Silo (or "grain code" as they say) should be in the same process as the client, which in this case will be the Web Api.

I don't know if I missed something, but I understand that this means that I will have a instance of Web Api in each silo, in a 1:1 relationship, right? If one wants to deploy a cluster with 5 silos for example, I will have an instance of the Web Api in each of them...? This sounds a bit strange to me.

As I say, this seems to be the recommendation, but I am going here a problem of how to scale these elements separately, because surely I will want more Silos than Web Apis?

Is this the way it is or am I wrong and I am mixing concepts?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

秉烛思 2025-02-20 19:21:33

您不必在这种情况下运行前端(ASP.NET核心,带有jullazor)和同一主机中的Orleans Silo。

创建两个项目,一个托管筒仓,一个项目托管网站。该网站使用clusteredClient连接到筒仓,并使用clusteredClient.getGrain(“ ABC”)访问谷物。

这样,您可以在Azure的单独的AppService中运行前端项目,然后将Silo项目作为容器应用程序运行。

You do not have to run the frontend (ASP.NET Core with Blazor in this case) and the Orleans silo in the same host.

Create two projects, one that hosts the silo, and one that hosts the web site. The web site uses ClusteredClient to connect to the silo, and uses clusteredClient.GetGrain("abc") to access the grains.

This way you can run the frontend project in a separate AppService in Azure, and then run the Silo project as a Container App.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文