Skip to content

Instantly share code, notes, and snippets.

@ptupitsyn
Created December 6, 2020 13:58
Show Gist options
  • Save ptupitsyn/a334dc85116ca537e276a752cffb00dd to your computer and use it in GitHub Desktop.
Save ptupitsyn/a334dc85116ca537e276a752cffb00dd to your computer and use it in GitHub Desktop.
Apache Ignite PeerAssemblyLoading demo - Client
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Apache.Ignite" Version="2.9.0" />
</ItemGroup>
</Project>
using System;
using Apache.Ignite.Core;
using Apache.Ignite.Core.Compute;
using Apache.Ignite.Core.Deployment;
namespace client
{
class HelloAction : IComputeAction
{
public void Invoke()
{
Console.WriteLine("Hello, World!");
}
}
class Program
{
static void Main(string[] args)
{
var cfg = new IgniteConfiguration
{
PeerAssemblyLoadingMode = PeerAssemblyLoadingMode.CurrentAppDomain
};
using (var ignite = Ignition.Start(cfg))
{
ignite.GetCompute().Broadcast(new HelloAction());
}
}
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment