IDIEP-65
Author
Sponsor
Created

  

Status

COMPLETED


Motivation

Ignite.NET examples are in need of reorganization: majority of them target old .NET Framework, and thus are not cross-platform, can't be run from CLI, and are not friendly for some IDEs (VS Code). Then there are some basic .NET Core examples with duplicating logic.

This work goes into Ignite 2.x, and lays good foundation for Ignite 3.0.

Description

Goals

  • Cross-platform (Windows, Linux, macOS)
  • CLI-friendly
    • Any example can be started from the command line without any extra steps
  • IDE-friendly
    • Examples are easy to select and run in all major IDEs (Visual Studio, VS Code, Rider, VS for Mac)
  • Easy to download and build
    • Do not require entire source or binary distribution
  • Standalone server
    • Nodes are easy to start: do not require complex commands
  • Produce nice output
    • Ignite logging should be minimal, example output should stand out
  • Both Thin and Thick examples are present where possible, and the code is as similar as possible

Implementation

  • .NET Core only (2.1)
    • .NET FW is more or less legacy now, and example code is the same for it anyway, only project files differ
  • One project (csproj) per example, all in the same solution (sln)
    • CLI friendly: cd ExampleName && dotnet run
    • IDE friendly
      • Visual Studio allows project selection on the toolbar
      • Rider allows project selection on the toolbar and an icon to start the program in the source code
      • VS Code needs special treatment: every example should be added to launch.json so that a list of them is visible in UI
  • NuGet-based (same way as Java examples are Maven-based)
    • Examples reference Ignite.NET packages, not Ignite source code or downloaded binaries (as it is right now)
    • Examples folder can be downloaded separately (git clone --filter) 
    • Compilation is quick
  • Contains ServerNode project which references all required types (query filters, compute jobs, etc) and can be started with `dotnet run` or directly from the IDE
    • Does not require fiddling with the command line like it is currently
  • Uses custom colored logger in thick mode so that example output stands out among all the logging


Proof of concept: #8651

Risks and Assumptions

None (those are just examples, after all)

Discussion Links

http://apache-ignite-developers.2346864.n4.nabble.com/DISCUSS-IEP-65-NET-Examples-Modernization-td50997.html

Tickets

Unable to render Jira issues macro, execution error.

  • No labels