c# - Apache Ignite .Net 客户端服务器连接

标签 c# .net ignite

我是 Apache Ignite .Net 的新手。我使用来自 Nuget 的 Apache Ignite 创建了两个独立的 Web 应用程序。一个应用程序设置为客户端使用 客户端模式 = 真 但我不知道如何使用 ip、端口等连接这两个应用程序。请帮助我... 请注意,这两个应用程序都在本地主机上运行。 I have tried with this link

我没有在客户端 web.config 中添加 Ignite 的任何配置细节。

我的服务器 web.config :

   <configuration>
  <configSections>
    <section name="igniteConfiguration" type="Apache.Ignite.Core.IgniteConfigurationSection, Apache.Ignite.Core" />
  </configSections>
  <runtime>
    <gcServer enabled="true" />
  </runtime>
  <igniteConfiguration xmlns="http://ignite.apache.org/schema/dotnet/IgniteConfigurationSection"
                        localhost="127.0.0.1" peerAssemblyLoadingMode="CurrentAppDomain">
    <atomicConfiguration atomicSequenceReserveSize="10" />

    <discoverySpi type="TcpDiscoverySpi">
      <ipFinder type="TcpDiscoveryMulticastIpFinder">
        <endpoints>
          <string>127.0.0.1:47500..47502</string>
        </endpoints>
      </ipFinder>
    </discoverySpi>
  </igniteConfiguration>
</configuration>

启动 Ignite 的我的服务器代码:

IIgnite ignite = Ignition.StartFromApplicationConfiguration();

客户端应用程序在代码处挂起:

Ignition.Start()

最佳答案

Ignite 节点将使用默认配置相互连接,您无需更改任何内容。

要么从客户端和服务器的配置中删除 discoverySpi,要么确保配置相同。

另请注意,如果没有服务器节点,客户端节点将挂起。

关于c# - Apache Ignite .Net 客户端服务器连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46108964/

相关文章:

.net - .Net3.5 和 .Net4.0 关于 WebPermission 的区别

.Net HttpClient.GetStreamAsync() 的行为与 .GetAsync() 不同

java - Ignition.ignite 返回 "Grid instance was not properly started or was already stopped"

java - 如何在输出控制台中阻止 Apache Ignite 消息 "Possible too long JVM pause"?

apache-spark - Apache Ignite 是否适合我的用例(加载 oracle 表进行缓存,在这些表之间进行联接,并反射(reflect)对 oracle 数据的更改)

c# - 此引用是否会导致内存泄漏?

c# - Visual Studio 以编程方式附加到托管进程

c# - 断言方法标签的存在

.net - azure webapp 无法启动 : Could not find 'aspnetcorev2_inprocess.dll' . 您 > 必须安装或更新 .NET 才能运行此应用程序

c# - 使用 AOP 打开和关闭与数据库的连接