| <!-- |
| ▄▄▄ ██▓███ ▄▄▄ ▄████▄ ██░ ██ ▓█████ ██▓ ▄████ ███▄ █ ██▓▄▄▄█████▓▓█████ |
| ▒████▄ ▓██░ ██▒▒████▄ ▒██▀ ▀█ ▓██░ ██▒▓█ ▀ ▓██▒ ██▒ ▀█▒ ██ ▀█ █ ▓██▒▓ ██▒ ▓▒▓█ ▀ |
| ▒██ ▀█▄ ▓██░ ██▓▒▒██ ▀█▄ ▒▓█ ▄ ▒██▀▀██░▒███ ▒██▒▒██░▄▄▄░▓██ ▀█ ██▒▒██▒▒ ▓██░ ▒░▒███ |
| ░██▄▄▄▄██ ▒██▄█▓▒ ▒░██▄▄▄▄██ ▒▓▓▄ ▄██▒░▓█ ░██ ▒▓█ ▄ ░██░░▓█ ██▓▓██▒ ▐▌██▒░██░░ ▓██▓ ░ ▒▓█ ▄ |
| ▓█ ▓██▒▒██▒ ░ ░ ▓█ ▓██▒▒ ▓███▀ ░░▓█▒░██▓░▒████▒ ░██░░▒▓███▀▒▒██░ ▓██░░██░ ▒██▒ ░ ░▒████▒ |
| ▒▒ ▓▒█░▒▓▒░ ░ ░ ▒▒ ▓▒█░░ ░▒ ▒ ░ ▒ ░░▒░▒░░ ▒░ ░ ░▓ ░▒ ▒ ░ ▒░ ▒ ▒ ░▓ ▒ ░░ ░░ ▒░ ░ |
| ▒ ▒▒ ░░▒ ░ ▒ ▒▒ ░ ░ ▒ ▒ ░▒░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░░ ░ ▒░ ▒ ░ ░ ░ ░ ░ |
| ░ ▒ ░░ ░ ▒ ░ ░ ░░ ░ ░ ▒ ░░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ |
| ░ ░ ░ ░░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ ░ |
| --> |
| |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| --> |
| |
| <!DOCTYPE html> |
| <html> |
| <head> |
| <link rel="canonical" href="https://ignite.apache.org/features/dotnet.html" /> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" /> |
| <meta http-equiv="Pragma" content="no-cache" /> |
| <meta http-equiv="Expires" content="0" /> |
| <title>.NET Support - Apache Ignite</title> |
| <link media="all" rel="stylesheet" href="/css/all.css?v=1514336027"> |
| <link href="https://netdna.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.css" rel="stylesheet"> |
| <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,300,300italic,400italic,600,600italic,700,700italic,800,800italic' rel='stylesheet' type='text/css'> |
| |
| <!--#include virtual="/includes/sh.html" --> |
| </head> |
| <body> |
| <div id="wrapper"> |
| <!--#include virtual="/includes/header.html" --> |
| |
| <main id="main" role="main" class="container"> |
| <section id="dotnet" class="page-section"> |
| <h1 class="first">Apache Ignite for .NET</h1> |
| <div class="col-sm-12 col-md-12 col-xs-12" style="padding:0 0 20px 0;"> |
| <div class="col-sm-6 col-md-8 col-xs-12" style="padding-left:0; padding-right:0"> |
| <p> |
| Ignites's In-Memory Data Fabric for .NET is designed to deliver uncompromised |
| performance for a wide set of in-memory computing use cases on top of .NET platform - |
| from high performance computing, to the industry most advanced data grid, CEP, and data streaming - all through native, optimized .NET APIs. |
| </p> |
| |
| <p> |
| Ignite .NET is built on top of Ignite. This allows you to perform almost all the in-memory data grid operations including |
| <span style="white-space: nowrap"><a href="https://apacheignite-net.readme.io/docs/transactions" target="_blank">ACID Transactions</a></span>, |
| <a href="https://apacheignite-sql.readme.io/docs/net-sql-api" target="_blank">SQL Queries</a>, |
| <a href="https://apacheignite-sql.readme.io/docs/net-sql-api#section-sqlquery" target="_blank">Distributed SQL Joins</a>, |
| <a href="https://apacheignite-net.readme.io/docs/topic-based" target="_blank">Messaging</a> and <a href="https://apacheignite-net.readme.io/docs/local-and-remote-events" target="_blank">Events</a>, |
| <a href="https://apacheignite-net.readme.io/docs/streaming" target="_blank">Data Streaming</a>, and more, on replicated or partitioned caches distributed across the cluster. |
| </p> |
| <p> |
| Ignite also supports <span style="white-space: nowrap"><a href="https://apacheignite-net.readme.io/docs/platform-interoperability" target="_blank">Cross-Platform Interoperability</a></span> |
| allowing applications to seamlessly interoperate between <b>Java</b>, <b>.NET</b> and <b>C++</b> by writing/reading objects to/from cache in a common binary format. |
| Additionally, both Ignite .NET and Ignite C++ provide native APIs and their implementations that delegate most of the calls to Java using JNI. |
| Here, it is worth mentioning that the JNI overhead is minimal and does not cause any performance degradation, especially in distributed environments where network is the main obstacle. |
| Furthermore, Ignite provides a pure .NET implementation of the Binary Marshaller to contribute to the perfomance. |
| </p> |
| </div> |
| <div class="col-sm-6 col-md-4 col-xs-12" style="padding-right:0"> |
| <img class="img-responsive" src="/images/dotnet.png" width="200" style="float:right;"/> |
| </div> |
| </div> |
| |
| <div class="code-examples"> |
| <div class="page-heading">Code Examples:</div> |
| <!-- Nav tabs --> |
| <ul id="messaging-examples" class="nav nav-tabs"> |
| <li class="active"><a href="#put-get" aria-controls="home" data-toggle="tab">Put and Get</a></li> |
| <li><a href="#transactions" aria-controls="profile" data-toggle="tab">Transactions</a></li> |
| <li><a href="#sql-query" aria-controls="profile" data-toggle="tab">SQL Query</a></li> |
| <li><a href="#sql-join" aria-controls="profile" data-toggle="tab">SQL Join</a></li> |
| <li><a href="#linq" aria-controls="profile" data-toggle="tab">LINQ</a></li> |
| </ul> |
| |
| <!-- Tab panes --> |
| <div class="tab-content"> |
| <div class="tab-pane active" id="put-get"> |
| <pre class="brush:csharp"> |
| using (var ignite = Ignition.Start()) |
| { |
| var cache = ignite.GetOrCreateCache<int, string>("myCache"); |
| |
| // Store keys in cache (values will end up on different cache nodes). |
| for (int i = 0; i < 10; i++) |
| cache.Put(i, i.ToString()); |
| |
| for (int i = 0; i < 10; i++) |
| Console.WriteLine("Got [key={0}, val={1}]", i, cache.Get(i)); |
| } |
| </pre> |
| </div> |
| <div class="tab-pane" id="transactions"> |
| <pre class="brush:csharp"> |
| using (var tx = ignite.GetTransactions().TxStart()) |
| { |
| var hello = cache.Get(1); |
| |
| if (hello == "1") |
| cache.Put(1, "Hello"); |
| |
| cache.Put(22, "World"); |
| |
| tx.Commit(); |
| } |
| </pre> |
| </div> |
| <div class="tab-pane" id="sql-query"> |
| <pre class="brush:csharp"> |
| var cache = ignite.GetOrCreateCache<int, Person>("personCache"); |
| |
| var sql = new SqlQuery("Person", "Salary < 1000"); |
| |
| var cursor = cache.Query(sql); |
| |
| foreach (var cacheEntry in cursor) |
| Console.WriteLine(cacheEntry.Value); |
| </pre> |
| </div> |
| <div class="tab-pane" id="sql-join"> |
| <pre class="brush:csharp"> |
| var cache = ignite.GetOrCreateCache<int, Person>("personCache"); |
| |
| // SQL join on Person and Organization. |
| var sql = new SqlQuery("Person", "from Person as p, \"orgCache\".Organization as org" |
| + "where p.OrgId = org.Id " |
| + "and org.name = Ignite"); |
| |
| // Find all persons working for Ignite organization. |
| foreach (var cacheEntry in cache.Query(sql)) |
| Console.WriteLine(cacheEntry.Value); |
| </pre> |
| </div> |
| <div class="tab-pane" id="linq"> |
| <pre class="brush:csharp"> |
| var cache = ignite.GetOrCreateCache<int, Person>("personCache"); |
| |
| var qry = cache.AsCacheQueryable().Where(x => x.Value.Salary < 1000); |
| |
| foreach (var cacheEntry in qry) |
| Console.WriteLine(cacheEntry.Value); |
| </pre> |
| </div> |
| </div> |
| </div> |
| <div class="page-heading">GitHub Examples:</div> |
| <p> |
| Also see <a href="https://github.com/apache/ignite/tree/master/modules/platforms/dotnet/examples" target="github">Ignite .NET examples</a> |
| available on GitHub. |
| </p> |
| |
| <p> |
| <a href="https://apacheignite-net.readme.io/docs/getting-started" target="_blank"> |
| <b>Get started with Ignite .NET <i class="fa fa-angle-double-right"></i></b> |
| </a> |
| </p> |
| </section> |
| </main> |
| |
| <!--#include virtual="/includes/footer.html" --> |
| </div> |
| <!--#include virtual="/includes/scripts.html" --> |
| </body> |
| </html> |