| <!DOCTYPE html> |
| |
| |
| |
| <html lang="en"> |
| <head> |
| <!-- Global site tag (gtag.js) - Google Analytics --> |
| <script async src="https://www.googletagmanager.com/gtag/js?id=UA-61232409-1"></script> |
| <script> |
| window.dataLayer = window.dataLayer || []; |
| function gtag(){dataLayer.push(arguments);} |
| gtag('js', new Date()); |
| |
| gtag('config', 'UA-61232409-1'); |
| </script> |
| |
| |
| |
| <meta charset="UTF-8"> |
| <meta name="ignite-version" content="2.9.0" /> |
| <title>Services | Ignite Documentation</title> |
| |
| <link rel="canonical" href="/docs/latest/services/services" /> |
| |
| |
| <link rel="stylesheet" href="/assets/css/styles.css?1600372780"> |
| <link rel="stylesheet" href="/assets/css/asciidoc-pygments.css"> |
| <link rel="shortcut icon" href="/favicon.ico"> |
| <meta name='viewport' content='width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0'> |
| |
| <script type="text/javascript" src="/assets/js/anchor.min.js?1600372780"></script> |
| |
| <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css" /> |
| |
| |
| </head> |
| <body> |
| <header> |
| <div class="container"> |
| <button type='button' class='menu' title='Docs menu'> |
| <img src="/assets/images/menu-icon.svg"/> |
| </button> |
| <div class='home'> |
| <a href="/" class='home' title='Apache Ignite home'> |
| <img src="/assets/images/apache_ignite_logo.svg" alt="Apache Ignite logo" width="103" > |
| </a> |
| </div> |
| |
| <nav> |
| |
| </nav> |
| |
| <select id="version-selector"> |
| <option value="2.9.0">2.9.0</option> |
| </select> |
| |
| <a href="https://github.com/apache/ignite" title='GitHub' class='github' target="_blank"> |
| <img src="/assets/images/github-gray.svg" alt="GitHub logo"> |
| </a> |
| |
| <form class='search'> |
| <button class="search-close" type='button'><img src='/assets/images/cancel.svg'></button> |
| <input type="search" placeholder="Search…" id="search-input"> |
| </form> |
| <button type='button' class='search-toggle'><img src='/assets/images/search.svg'></button> |
| <button type='button' class='top-nav-toggle'>⋮</button> |
| |
| |
| |
| </div> |
| </header> |
| |
| |
| <link rel="stylesheet" href="/assets/css/docs.css"> |
| <section class='page-docs'> |
| |
| |
| |
| |
| <nav class='left-nav' data-swiftype-index='false'> |
| |
| |
| <li> |
| |
| |
| <a href="/docs/latest/preface" class='' >Preface</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Quick Start Guides<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/java" |
| |
| class='' |
| >Java</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/dotnet" |
| |
| class='' |
| >.NET/C#</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/cpp" |
| |
| class='' |
| >C++</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/python" |
| |
| class='' |
| >Python</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/nodejs" |
| |
| class='' |
| >Node.JS</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/sql" |
| |
| class='' |
| >SQL</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/php" |
| |
| class='' |
| >PHP</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/quick-start/restapi" |
| |
| class='' |
| >REST API</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="/installation" class='group-toggle collapsed '>Installation<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/installation/installing-using-zip" |
| |
| class='' |
| >Installing Using ZIP Archive</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/installation/installing-using-docker" |
| |
| class='' |
| >Installing Using Docker</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/installation/deb-rpm" |
| |
| class='' |
| >Installing DEB or RPM package</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Kubernetes<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//installation/kubernetes/amazon-eks-deployment" class=''>Amazon EKS</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//installation/kubernetes/azure-deployment" class=''>Azure Kubernetes Service</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//installation/kubernetes/gke-deployment" class=''>Google Kubernetes Engine</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Setting Up<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/setup" |
| |
| class='' |
| >Setting Up Ignite for Java</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/setup-dotnet" |
| |
| class='' |
| >Setting Up Ignite for .NET/C#</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/understanding-configuration" class='' >Understanding Configuration</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/logging" class='' >Configuring Logging</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/starting-nodes" class='' >Starting and Stopping Nodes</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/clustering" |
| |
| class='' |
| >Overview</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/tcp-ip-discovery" |
| |
| class='' |
| >TCP/IP Discovery</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/zookeeper-discovery" |
| |
| class='' |
| >ZooKeeper Discovery</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/discovery-in-the-cloud" |
| |
| class='' |
| >Discovery in the Cloud</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/network-configuration" |
| |
| class='' |
| >Network Configuration</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/connect-client-nodes" |
| |
| class='' |
| >Connecting Client Nodes</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/clustering/running-client-nodes-behind-nat" |
| |
| class='' |
| >Running Client Nodes Behind NAT</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Data Modeling<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-modeling/data-modeling" |
| |
| class='' |
| >Introduction</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-modeling/data-partitioning" |
| |
| class='' |
| >Data Partitioning</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-modeling/affinity-collocation" |
| |
| class='' |
| >Affinity Colocation</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Memory<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/memory-architecture" |
| |
| class='' |
| >Memory Architecture</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/memory-configuration/data-regions" |
| |
| class='' |
| >Configuring Data Regions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/memory-configuration/eviction-policies" |
| |
| class='' |
| >Eviction Policies</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Configuring Caches<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/configuration-overview" |
| |
| class='' |
| >Cache Configuration</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/configuring-backups" |
| |
| class='' |
| >Configuring Partition Backups</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/atomicity-modes" |
| |
| class='' |
| >Atomicity Modes</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/expiry-policies" |
| |
| class='' |
| >Expiry Policy</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/on-heap-caching" |
| |
| class='' |
| >On-Heap Caching</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/configuring-caches/cache-groups" |
| |
| class='' |
| >Cache Groups</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Persistence<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/native-persistence" |
| |
| class='' |
| >Ignite Persistence</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/external-storage" |
| |
| class='' |
| >External Storage</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/swap" |
| |
| class='' |
| >Swapping</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/custom-cache-store" |
| |
| class='' |
| >Implementing Custom Cache Store</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/snapshots" |
| |
| class='' |
| >Cluster Snapshots</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/disk-compression" |
| |
| class='' |
| >Disk Compression</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/persistence/persistence-tuning" |
| |
| class='' |
| >Tuning Persistence</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/baseline-topology" class='' >Baseline Topology</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/cluster-states" class='' >Cluster States</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/data-rebalancing" class='' >Data Rebalancing</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/partition-loss-policy" class='' >Partition Loss Policy</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/deploying-user-code" class='' >Deploying User Code</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/peer-class-loading" class='' >Peer Class Loading</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/data-streaming" class='' >Data Streaming</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Using Key-Value Cache API<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/key-value-api/basic-cache-operations" |
| |
| class='' |
| >Basic Cache Operations</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/key-value-api/binary-objects" |
| |
| class='' |
| >Working with Binary Objects</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/key-value-api/using-scan-queries" |
| |
| class='' |
| >Using Scan Queries</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/read-repair" |
| |
| class='' |
| >Read Repair</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/key-value-api/continuous-queries" class='' >Using Continuous Queries</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/key-value-api/transactions" class='' >Performing Transactions</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Working with SQL<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/sql-introduction" |
| |
| class='' |
| >Introduction</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/schemas" |
| |
| class='' |
| >Understanding Schemas</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/indexes" |
| |
| class='' |
| >Defining Indexes</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/sql-api" |
| |
| class='' |
| >Using SQL API</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/distributed-joins" |
| |
| class='' |
| >Distributed Joins</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/sql-transactions" |
| |
| class='' |
| >SQL Transactions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/custom-sql-func" |
| |
| class='' |
| >Custom SQL Functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/JDBC/jdbc-driver" |
| |
| class='' |
| >JDBC Driver</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/JDBC/jdbc-client-driver" |
| |
| class='' |
| >JDBC Client Driver</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/transactions/mvcc" |
| |
| class='' |
| >Multiversion Concurrency Control</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Computing<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/distributed-computing" |
| |
| class='' |
| >Distributed Computing API</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/cluster-groups" |
| |
| class='' |
| >Cluster Groups</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/executor-service" |
| |
| class='' |
| >Executor Service</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/map-reduce" |
| |
| class='' |
| >MapReduce API</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/load-balancing" |
| |
| class='' |
| >Load Balancing</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/fault-tolerance" |
| |
| class='' |
| >Fault Tolerance</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/distributed-computing/job-scheduling" |
| |
| class='' |
| >Job Scheduling</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/collocated-computations" class='' >Colocating Computations with Data</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Working with Events<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/events/listening-to-events" |
| |
| class='' |
| >Enabling and Listenting to Events</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/events/events" |
| |
| class='' |
| >Events</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/near-cache" class='' >Near Caches</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/platform-cache" class='' >.NET Platform Cache</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/services/services" class='' >Services</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Distributed Data Structures<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-structures/queue-and-set" |
| |
| class='' |
| >Queue and Set</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-structures/atomic-types" |
| |
| class='' |
| >Atomic Types</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-structures/countdownlatch" |
| |
| class='' |
| >CountDownLatch</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-structures/atomic-sequence" |
| |
| class='' |
| >Atomic Sequence</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/data-structures/semaphore" |
| |
| class='' |
| >Semaphore</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Machine Learning<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/machine-learning" |
| |
| class='' |
| >Machine Learning</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/partition-based-dataset" |
| |
| class='' |
| >Partition Based Dataset</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/updating-trained-models" |
| |
| class='' |
| >Updating Trained Models</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Binary Classification<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/introduction" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/linear-svm" class=''>Linear SVM (Support Vector Machine)</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/decision-trees" class=''>Decision Trees</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/multilayer-perceptron" class=''>Multilayer Perceptron</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/logistic-regression" class=''>Logistic Regression</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/knn-classification" class=''>k-NN Classification</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/ann" class=''>ANN (Approximate Nearest Neighbor)</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/binary-classification/naive-bayes" class=''>Naive Bayes</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Regression<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/regression/introduction" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/regression/linear-regression" class=''>Linear Regression</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/regression/decision-trees-regression" class=''>Decision Trees Regression</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/regression/knn-regression" class=''>k-NN Regression</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Clustering<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/clustering/introduction" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/clustering/k-means-clustering" class=''>K-Means Clustering</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/clustering/gaussian-mixture" class=''>Gaussian mixture (GMM)</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/preprocessing" |
| |
| class='' |
| >Preprocessing</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Model Selection<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/model-selection/introduction" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/model-selection/evaluator" class=''>Evaluator</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/model-selection/split-the-dataset-on-test-and-train-datasets" class=''>Split the dataset on test and train datasets</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/model-selection/hyper-parameter-tuning" class=''>Hyper-parameter tuning</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/model-selection/pipeline-api" class=''>Pipeline API</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/multiclass-classification" |
| |
| class='' |
| >Multiclass Classification</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Ensemble Methods<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/ensemble-methods/introduction" class=''></a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/ensemble-methods/stacking" class=''>Stacking</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/ensemble-methods/baggin" class=''>Bagging</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/ensemble-methods/random-forest" class=''>Random Forest</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/ensemble-methods/gradient-boosting" class=''>Gradient Boosting</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/machine-learning/recommendation-systems" |
| |
| class='' |
| >Recommendation Systems</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Importing Model<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/importing-model/introduction" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/importing-model/model-import-from-gxboost" class=''>Import Model from XGBoost</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//machine-learning/importing-model/model-import-from-apache-spark" class=''>Import Model from Apache Spark</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Monitoring<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/monitoring-metrics/intro" |
| |
| class='' |
| >Introduction</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/monitoring-metrics/cluster-id" |
| |
| class='' |
| >Cluster ID and Tag</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Metrics<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//monitoring-metrics/configuring-metrics" class=''>Configuring Metrics</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//monitoring-metrics/metrics" class=''>JMX Metrics</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>New Metrics System<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//monitoring-metrics/new-metrics-system" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//monitoring-metrics/new-metrics" class=''>Metrics</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/monitoring-metrics/system-views" |
| |
| class='' |
| >System Views</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/monitoring-metrics/tracing" |
| |
| class='' |
| >Tracing</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="/security" class='group-toggle collapsed '>Security<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/security/authentication" |
| |
| class='' |
| >Authentication</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/security/ssl-tls" |
| |
| class='' |
| >SSL/TLS</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Transparent Data Encryption<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//security/tde" class=''>Introduction</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//security/master-key-rotation" class=''>Master key rotation</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Thin Clients<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/getting-started-with-thin-clients" |
| |
| class='' |
| >Thin Clients Overview</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/java-thin-client" |
| |
| class='' |
| >Java Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/dotnet-thin-client" |
| |
| class='' |
| >.NET Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/cpp-thin-client" |
| |
| class='' |
| >C++ Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/python-thin-client" |
| |
| class='' |
| >Python Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/php-thin-client" |
| |
| class='' |
| >PHP Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/thin-clients/nodejs-thin-client" |
| |
| class='' |
| >Node.js Thin Client</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| |
| |
| <button |
| type='button' |
| class='collapsed '>Binary Client Protocol<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class="sub_pages collapsed"> |
| |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/binary-client-protocol" class=''>Binary Client Protocol</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/data-format" class=''>Data Format</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/key-value-queries" class=''>Key-Value Queries</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/sql-and-scan-queries" class=''>SQL and Scan Queries</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/binary-type-metadata" class=''>Binary Types Metadata</a></li> |
| |
| |
| |
| <li><a href="/docs/latest//binary-client-protocol/cache-configuration" class=''>Cache Configuration</a></li> |
| |
| </nav> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>ODBC Driver<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/odbc-driver" |
| |
| class='' |
| >ODBC Driver</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/connection-string-dsn" |
| |
| class='' |
| >Connection String and DSN</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/querying-modifying-data" |
| |
| class='' |
| >Querying and Modifying Data</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/specification" |
| |
| class='' |
| >Specification</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/data-types" |
| |
| class='' |
| >Data Types</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/SQL/ODBC/error-codes" |
| |
| class='' |
| >Error Codes</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/restapi" class='' >REST API</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/control-script" class='' >Control Script</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/plugins" class='' >Plugins</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| <a href="/docs/latest/sqlline" class='' >SQLLine</a> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="" class='group-toggle collapsed '>Ignite for Spark<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/overview" |
| |
| class='' |
| >Overview</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/ignitecontext-and-rdd" |
| |
| class='' |
| >IgniteContext and IgniteRDD</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/ignite-dataframe" |
| |
| class='' |
| >Ignite DataFrame</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/installation" |
| |
| class='' |
| >Installation</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/spark-shell" |
| |
| class='' |
| >Test Ignite with Spark-shell</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/ignite-for-spark/troubleshooting" |
| |
| class='' |
| >Troubleshooting</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| <li> |
| |
| |
| |
| |
| |
| |
| <button type='button' data-guide-url="/sql-reference/sql-reference-overview" class='group-toggle collapsed '>SQL Reference<img class="state-indicator" src="/assets/images/left-nav-arrow.svg"></button> |
| <nav class='nav-group collapsed'> |
| |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/sql-conformance" |
| |
| class='' |
| >SQL Conformance</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/ddl" |
| |
| class='' |
| >Data Definition Language (DDL)</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/dml" |
| |
| class='' |
| >Data Manipulation Language (DML)</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/transactions" |
| |
| class='' |
| >Transactions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/operational-commands" |
| |
| class='' |
| >Operational Commands</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/aggregate-functions" |
| |
| class='' |
| >Aggregate functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/numeric-functions" |
| |
| class='' |
| >Numeric Functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/string-functions" |
| |
| class='' |
| >String Functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/date-time-functions" |
| |
| class='' |
| >Data and Time Functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/system-functions" |
| |
| class='' |
| >System Functions</a> |
| |
| </li> |
| |
| |
| |
| |
| |
| <li> |
| |
| <a href="/docs/latest/sql-reference/data-types" |
| |
| class='' |
| >Data Types</a> |
| |
| </li> |
| |
| |
| |
| </nav> |
| |
| </li> |
| |
| </nav> |
| <div class="left-nav__overlay"></div> |
| |
| |
| <article data-swiftype-index='true'> |
| <a class='edit-link' href="https://github.com/apache/ignite/tree/IGNITE-7595/docs/_docs/services/services.adoc" target="_blank">Edit</a> |
| |
| <h1>Services</h1> |
| |
| <div class="sect1"> |
| <h2 id="overview">Overview</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>A service is a piece of functionality that can be deployed to an Ignite cluster and execute specific operations. |
| You can have multiple instances of a service on one or multiple nodes.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Ignite services have the following features:</p> |
| </div> |
| <div class="dlist"> |
| <dl> |
| <dt class="hdlist1">Load balancing</dt> |
| <dd> |
| <p>In all cases, other than singleton service deployment, Ignite automatically makes sure that about an equal number of services are deployed on each node within the cluster. Whenever the cluster topology changes, Ignite re-evaluates service deployments and may re-deploy an already deployed service to another node for better load balancing.</p> |
| </dd> |
| <dt class="hdlist1">Fault tolerance</dt> |
| <dd> |
| <p>Ignite always guarantees that services are continuously available, and are deployed according to the specified configuration, regardless of any topology changes or node crashes.</p> |
| </dd> |
| <dt class="hdlist1">Hot Redeployment</dt> |
| <dd> |
| <p>You can use Ignite’s <code>DeploymentSpi</code> configuration to re-deploy services without restarting the cluster. See <a href="#re-deploying-services">Re-deploying Services</a>.</p> |
| </dd> |
| </dl> |
| </div> |
| <div class="paragraph"> |
| <p>Ignite services can be used as a backbone of a micro-services based solution or application. Learn more about this use case from the following series of articles:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><a href="https://dzone.com/articles/running-microservices-on-top-of-in-memory-data-gri" target="_blank" rel="noopener">Microservices on Top of Apache Ignite - Part I</a></p> |
| </li> |
| <li> |
| <p><a href="https://dzone.com/articles/running-microservices-on-top-of-in-memory-data-gri-1" target="_blank" rel="noopener">Microservices on Top of Apache Ignite - Part II</a></p> |
| </li> |
| <li> |
| <p><a href="https://dzone.com/articles/microservices-on-top-of-an-in-memory-data-grid-par" target="_blank" rel="noopener">Microservices on Top of Apache Ignite - Part III</a></p> |
| </li> |
| </ul> |
| </div> |
| <div class="paragraph"> |
| <p>Refer to a service example implementation in the Apache Ignite <a href="https://github.com/apache/ignite/tree/master/examples/src/main/java/org/apache/ignite/examples/servicegrid" target="_blank" rel="noopener">code base</a>.</p> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="implementing-a-service">Implementing a Service</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>A service implements the <a href="https://ignite.apache.org/releases/2.9.0/javadoc/org/apache/ignite/services/Service.html" target="_blank" rel="noopener">Service</a> interface. |
| The <code>Service</code> interface has three methods:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><code>init(ServiceContext)</code>: this method is called by Ignite before the service is deployed (and before the <code>execute()</code> method is called)</p> |
| </li> |
| <li> |
| <p><code>execute(ServiceContext)</code>: starts execution of the service</p> |
| </li> |
| <li> |
| <p><code>cancel(ServiceContext)</code>: cancels service execution</p> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="deploying-services">Deploying Services</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>You can deploy your service either programmatically at runtime, or by providing a service configuration as part of the node configuration. |
| In the latter case, the service is deployed when the cluster starts.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="deploying-services-at-runtime">Deploying Services at Runtime</h3> |
| <div class="paragraph"> |
| <p>You can deploy services at runtime via the instance of <code>IgniteServices</code>, which can be obtained from an instance of <code>Ignite</code> by calling the <code>Ignite.services()</code> method.</p> |
| </div> |
| <div class="paragraph"> |
| <p>The <code>IgniteServices</code> interface has a number of methods for deploying services:</p> |
| </div> |
| <div class="ulist"> |
| <ul> |
| <li> |
| <p><code>deploy(ServiceConfiguration)</code> deploys a service defined by a given configuration.</p> |
| </li> |
| <li> |
| <p><code>deployNodeSingleton(…​)</code> ensures that an instance of the service is running on each server node.</p> |
| </li> |
| <li> |
| <p><code>deployClusterSingleton(…​)</code> deploys a single instance of the service per cluster. If the cluster node on which the service is deployed stops, Ignite automatically redeploys the service on another node.</p> |
| </li> |
| <li> |
| <p><code>deployKeyAffinitySingleton(…​)</code> deploys a single instance of the service on the primary node for a given cache key.</p> |
| </li> |
| <li> |
| <p><code>deployMultiple(…​)</code> deploys the given number of instances of the service.</p> |
| </li> |
| </ul> |
| </div> |
| <div class="paragraph"> |
| <p>This is an example of cluster singleton deployment:</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">();</span> |
| |
| <span class="c1">//get the services interface associated with all server nodes</span> |
| <span class="nc">IgniteServices</span> <span class="n">services</span> <span class="o">=</span> <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">();</span> |
| |
| <span class="c1">//start a node singleton</span> |
| <span class="n">services</span><span class="o">.</span><span class="na">deployClusterSingleton</span><span class="o">(</span><span class="s">"myCounterService"</span><span class="o">,</span> <span class="k">new</span> <span class="nc">MyCounterServiceImpl</span><span class="o">());</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| <div class="paragraph"> |
| <p>And here is how to deploy a cluster singleton using <code>ServiceConfiguration</code>:</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">();</span> |
| |
| <span class="nc">ServiceConfiguration</span> <span class="n">serviceCfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ServiceConfiguration</span><span class="o">();</span> |
| |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setName</span><span class="o">(</span><span class="s">"myCounterService"</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setMaxPerNodeCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setTotalCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setService</span><span class="o">(</span><span class="k">new</span> <span class="nc">MyCounterServiceImpl</span><span class="o">());</span> |
| |
| <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">().</span><span class="na">deploy</span><span class="o">(</span><span class="n">serviceCfg</span><span class="o">);</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| <div class="sect2"> |
| <h3 id="deploying-services-at-node-startup">Deploying Services at Node Startup</h3> |
| <div class="paragraph"> |
| <p>You can specify your service as part of the node configuration and start the service together with the node. |
| If your service is a node singleton, the service is started on each node of the cluster. |
| If the service is a cluster singleton, it is started in the first cluster node, and is redeployed to one of the other nodes if the first node terminates. |
| The service must be available on the classpath of each node.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Below is an example of configuring a cluster singleton service:</p> |
| </div> |
| <code-tabs><code-tab data-tab='XML'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="xml"><span class="nt"><bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.configuration.IgniteConfiguration"</span><span class="nt">></span> |
| |
| <span class="nt"><property</span> <span class="na">name=</span><span class="s">"serviceConfiguration"</span><span class="nt">></span> |
| <span class="nt"><list></span> |
| <span class="nt"><bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.services.ServiceConfiguration"</span><span class="nt">></span> |
| <span class="nt"><property</span> <span class="na">name=</span><span class="s">"name"</span> <span class="na">value=</span><span class="s">"myCounterService"</span><span class="nt">/></span> |
| <span class="nt"><property</span> <span class="na">name=</span><span class="s">"maxPerNodeCount"</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">/></span> |
| <span class="nt"><property</span> <span class="na">name=</span><span class="s">"totalCount"</span> <span class="na">value=</span><span class="s">"1"</span><span class="nt">/></span> |
| <span class="nt"><property</span> <span class="na">name=</span><span class="s">"service"</span><span class="nt">></span> |
| <span class="nt"><bean</span> <span class="na">class=</span><span class="s">"org.apache.ignite.snippets.services.MyCounterServiceImpl"</span><span class="nt">/></span> |
| <span class="nt"></property></span> |
| <span class="nt"></bean></span> |
| <span class="nt"></list></span> |
| <span class="nt"></property></span> |
| |
| <span class="nt"></bean></span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">ServiceConfiguration</span> <span class="n">serviceCfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ServiceConfiguration</span><span class="o">();</span> |
| |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setName</span><span class="o">(</span><span class="s">"myCounterService"</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setMaxPerNodeCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setTotalCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setService</span><span class="o">(</span><span class="k">new</span> <span class="nc">MyCounterServiceImpl</span><span class="o">());</span> |
| |
| <span class="nc">IgniteConfiguration</span> <span class="n">igniteCfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">IgniteConfiguration</span><span class="o">()</span> |
| <span class="o">.</span><span class="na">setServiceConfiguration</span><span class="o">(</span><span class="n">serviceCfg</span><span class="o">);</span> |
| |
| <span class="c1">// Start the node.</span> |
| <span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">(</span><span class="n">igniteCfg</span><span class="o">);</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="deploying-to-a-subset-of-nodes">Deploying to a Subset of Nodes</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>When you obtain the <code>IgniteServices</code> interface by calling <code>ignite.services()</code>, the <code>IgniteServices</code> instance is associated with all server nodes. |
| It means that Ignite chooses where to deploy the service from the set of all server nodes. |
| You can change the set of nodes considered for service deployment by using various approaches describe below.</p> |
| </div> |
| <div class="sect2"> |
| <h3 id="cluster-singleton">Cluster Singleton</h3> |
| <div class="paragraph"> |
| <p>A cluster singleton is a deployment strategy where there is only one instance of the service in the cluster, and Ignite guarantees that the instance is always available. |
| In case the cluster node on which the service is deployed crashes or stops, Ignite automatically redeploys the instance to another node.</p> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="clustergroup">ClusterGroup</h3> |
| <div class="paragraph"> |
| <p>You can use the <code>ClusterGroup</code> interface to deploy services to a subset of nodes. |
| If the service is a node singleton, the service is deployed on all nodes from the subset. |
| If the service is a cluster singleton, it is deployed on one of the nodes from the subset.</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">();</span> |
| |
| <span class="c1">//deploy the service to the nodes that host the cache named "myCache"</span> |
| <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">(</span><span class="n">ignite</span><span class="o">.</span><span class="na">cluster</span><span class="o">().</span><span class="na">forCacheNodes</span><span class="o">(</span><span class="s">"myCache"</span><span class="o">));</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| <div class="sect2"> |
| <h3 id="node-filter">Node Filter</h3> |
| <div class="paragraph"> |
| <p>You can use node attributes to define the subset of nodes meant for service deployment. |
| This is achieved by using a node filter. |
| A node filter is an <code>IgnitePredicate<ClusterNode></code> that Ignite calls for each node associated with the <code>IgniteService</code> interface. |
| If the predicate returns <code>true</code> for a given node, the node is included.</p> |
| </div> |
| <div class="admonitionblock caution"> |
| <table> |
| <tr> |
| <td class="icon"> |
| <div class="title">Caution</div> |
| </td> |
| <td class="content"> |
| The class of the node filter must be present in the classpath of all nodes. |
| </td> |
| </tr> |
| </table> |
| </div> |
| <div class="paragraph"> |
| <p>Here is an example of a node filter. |
| The filter includes the server nodes that have the "west.coast.node" attribute.</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="kd">public</span> <span class="kd">static</span> <span class="kd">class</span> <span class="nc">ServiceFilter</span> <span class="kd">implements</span> <span class="nc">IgnitePredicate</span><span class="o"><</span><span class="nc">ClusterNode</span><span class="o">></span> <span class="o">{</span> |
| <span class="nd">@Override</span> |
| <span class="kd">public</span> <span class="kt">boolean</span> <span class="nf">apply</span><span class="o">(</span><span class="nc">ClusterNode</span> <span class="n">node</span><span class="o">)</span> <span class="o">{</span> |
| <span class="c1">// The service will be deployed on the server nodes</span> |
| <span class="c1">// that have the 'west.coast.node' attribute.</span> |
| <span class="k">return</span> <span class="o">!</span><span class="n">node</span><span class="o">.</span><span class="na">isClient</span><span class="o">()</span> <span class="o">&&</span> <span class="n">node</span><span class="o">.</span><span class="na">attributes</span><span class="o">().</span><span class="na">containsKey</span><span class="o">(</span><span class="s">"west.coast.node"</span><span class="o">);</span> |
| <span class="o">}</span> |
| <span class="o">}</span></code></pre> |
| </div> |
| </div> |
| <div class="paragraph"> |
| <p>Deploy the service using the node filter:</p> |
| </div> |
| <div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">();</span> |
| |
| <span class="nc">ServiceConfiguration</span> <span class="n">serviceCfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ServiceConfiguration</span><span class="o">();</span> |
| |
| <span class="c1">// Setting service instance to deploy.</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setService</span><span class="o">(</span><span class="k">new</span> <span class="nc">MyCounterServiceImpl</span><span class="o">());</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setName</span><span class="o">(</span><span class="s">"serviceName"</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setMaxPerNodeCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| |
| <span class="c1">// Setting the nodes filter.</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setNodeFilter</span><span class="o">(</span><span class="k">new</span> <span class="nc">ServiceFilter</span><span class="o">());</span> |
| |
| <span class="c1">// Getting an instance of IgniteService.</span> |
| <span class="nc">IgniteServices</span> <span class="n">services</span> <span class="o">=</span> <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">();</span> |
| |
| <span class="c1">// Deploying the service.</span> |
| <span class="n">services</span><span class="o">.</span><span class="na">deploy</span><span class="o">(</span><span class="n">serviceCfg</span><span class="o">);</span></code></pre> |
| </div> |
| </div> |
| </div> |
| <div class="sect2"> |
| <h3 id="cache-key">Cache Key</h3> |
| <div class="paragraph"> |
| <p>Affinity-based deployment allows you to deploy a service to the primary node for a specific key in a specific cache. |
| Refer to the <a href="/docs/latest/data-modeling/affinity-collocation">Affinity Colocation</a> section for details. |
| For an affinity-base deployment, specify the desired cache and key in the service configuration. |
| The cache does not have to contain the key. The node is determined by the affinity function. |
| If the cluster topology changes in a way that the key is re-assigned to another node, the service is redeployed to that node as well.</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="nc">Ignite</span> <span class="n">ignite</span> <span class="o">=</span> <span class="nc">Ignition</span><span class="o">.</span><span class="na">start</span><span class="o">();</span> |
| |
| <span class="c1">//making sure the cache exists</span> |
| <span class="n">ignite</span><span class="o">.</span><span class="na">getOrCreateCache</span><span class="o">(</span><span class="s">"orgCache"</span><span class="o">);</span> |
| |
| <span class="nc">ServiceConfiguration</span> <span class="n">serviceCfg</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">ServiceConfiguration</span><span class="o">();</span> |
| |
| <span class="c1">// Setting service instance to deploy.</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setService</span><span class="o">(</span><span class="k">new</span> <span class="nc">MyCounterServiceImpl</span><span class="o">());</span> |
| |
| <span class="c1">// Setting service name.</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setName</span><span class="o">(</span><span class="s">"serviceName"</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setTotalCount</span><span class="o">(</span><span class="mi">1</span><span class="o">);</span> |
| |
| <span class="c1">// Specifying the cache name and key for the affinity based deployment.</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setCacheName</span><span class="o">(</span><span class="s">"orgCache"</span><span class="o">);</span> |
| <span class="n">serviceCfg</span><span class="o">.</span><span class="na">setAffinityKey</span><span class="o">(</span><span class="mi">123</span><span class="o">);</span> |
| |
| <span class="nc">IgniteServices</span> <span class="n">services</span> <span class="o">=</span> <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">();</span> |
| |
| <span class="c1">// Deploying the service.</span> |
| <span class="n">services</span><span class="o">.</span><span class="na">deploy</span><span class="o">(</span><span class="n">serviceCfg</span><span class="o">);</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="accessing-services">Accessing Services</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>You can access the service at runtime via a service proxy. |
| Proxies can be either <em>sticky</em> or <em>non-sticky</em>. |
| A sticky proxy always connects to the same cluster node to access a remotely deployed service. |
| A non-sticky proxy load-balances remote service invocations among all cluster nodes on which the service is deployed.</p> |
| </div> |
| <div class="paragraph"> |
| <p>The following code snippet obtains a non-sticky proxy to the service and calls a service method:</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="c1">//access the service by name</span> |
| <span class="nc">MyCounterService</span> <span class="n">counterService</span> <span class="o">=</span> <span class="n">ignite</span><span class="o">.</span><span class="na">services</span><span class="o">().</span><span class="na">serviceProxy</span><span class="o">(</span><span class="s">"myCounterService"</span><span class="o">,</span> |
| <span class="nc">MyCounterService</span><span class="o">.</span><span class="na">class</span><span class="o">,</span> <span class="kc">false</span><span class="o">);</span> <span class="c1">//non-sticky proxy</span> |
| |
| <span class="c1">//call a service method</span> |
| <span class="n">counterService</span><span class="o">.</span><span class="na">increment</span><span class="o">();</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="un-deploying-services">Un-deploying Services</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>To undeploy a service, use the <code>IgniteServices.cancel(serviceName)</code> or <code>IgniteServices.cancelAll()</code> methods.</p> |
| </div> |
| <code-tabs><code-tab data-tab='Java'><div class="listingblock"> |
| <div class="content"> |
| <pre class="rouge highlight"><code data-lang="java"><span class="n">services</span><span class="o">.</span><span class="na">cancel</span><span class="o">(</span><span class="s">"myCounterService"</span><span class="o">);</span></code></pre> |
| </div> |
| </div></code-tab><code-tab data-tab='C#/.NET'></code-tab><code-tab data-tab='C++'></code-tab></code-tabs> |
| </div> |
| </div> |
| <div class="sect1"> |
| <h2 id="re-deploying-services">Re-deploying Services</h2> |
| <div class="sectionbody"> |
| <div class="paragraph"> |
| <p>If you want to update the implementation of a service without stopping the cluster, you can do it if you use the Ignite’s <a href="/docs/latest/deploying-user-code">DeploymentSPI configuration</a>.</p> |
| </div> |
| <div class="paragraph"> |
| <p>Use the following procedure to redeploy the service:</p> |
| </div> |
| <div class="olist arabic"> |
| <ol class="arabic"> |
| <li> |
| <p>Update the JAR file(s) in the location where the service is stored (pointed to by your <code>UriDeploymentSpi.uriList</code> property). Ignite will reload the new classes after the configured update period.</p> |
| </li> |
| <li> |
| <p>Add the service implementation to the classpass of a client node and start the client.</p> |
| </li> |
| <li> |
| <p>Call the <code>Ignite.services().cancel()</code> method on the client node to stop the service.</p> |
| </li> |
| <li> |
| <p>Deploy the service from the client node.</p> |
| </li> |
| <li> |
| <p>Stop the client node.</p> |
| </li> |
| </ol> |
| </div> |
| <div class="paragraph"> |
| <p>In this way, you don’t have to stop the server nodes, so you don’t interrupt the operation of your cluster.</p> |
| </div> |
| </div> |
| </div> |
| <div class="copyright"> |
| © 2020 The Apache Software Foundation.<br/> |
| Apache, Apache Ignite, the Apache feather and the Apache Ignite logo are either registered trademarks or trademarks of The Apache Software Foundation. |
| |
| </div> |
| |
| </article> |
| <nav class="right-nav" data-swiftype-index='false'> |
| <ul class="sectlevel1"> |
| <li><a href="#overview">Overview</a></li> |
| <li><a href="#implementing-a-service">Implementing a Service</a></li> |
| <li><a href="#deploying-services">Deploying Services</a> |
| <ul class="sectlevel2"> |
| <li><a href="#deploying-services-at-runtime">Deploying Services at Runtime</a></li> |
| <li><a href="#deploying-services-at-node-startup">Deploying Services at Node Startup</a></li> |
| </ul> |
| </li> |
| <li><a href="#deploying-to-a-subset-of-nodes">Deploying to a Subset of Nodes</a> |
| <ul class="sectlevel2"> |
| <li><a href="#cluster-singleton">Cluster Singleton</a></li> |
| <li><a href="#clustergroup">ClusterGroup</a></li> |
| <li><a href="#node-filter">Node Filter</a></li> |
| <li><a href="#cache-key">Cache Key</a></li> |
| </ul> |
| </li> |
| <li><a href="#accessing-services">Accessing Services</a></li> |
| <li><a href="#un-deploying-services">Un-deploying Services</a></li> |
| <li><a href="#re-deploying-services">Re-deploying Services</a></li> |
| </ul> |
| |
| |
| <footer> |
| </footer> |
| |
| </nav> |
| |
| </section> |
| <script type='module' src='/assets/js/code-copy-to-clipboard.js' async crossorigin></script> |
| |
| <script> |
| // inits deep anchors -- needs to be done here because of https://www.bryanbraun.com/anchorjs/#dont-run-it-too-late |
| anchors.add('.page-docs h1, .page-docs h2, .page-docs h3:not(.discrete), .page-docs h4, .page-docs h5'); |
| anchors.options = { |
| placement: 'right', |
| visible: 'always' |
| }; |
| </script> |
| <!-- load google fonts async --> |
| <script type="text/javascript"> |
| WebFontConfig = { |
| google: { families: [ 'Open+Sans:300,400,600,700&display=swap' ] } |
| }; |
| (function() { |
| var wf = document.createElement('script'); |
| wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js'; |
| wf.type = 'text/javascript'; |
| wf.async = 'true'; |
| var s = document.getElementsByTagName('script')[0]; |
| s.parentNode.insertBefore(wf, s); |
| })(); </script> |
| <script src="https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js"></script> |
| <script> |
| docsearch({ |
| // Your apiKey and indexName will be given to you once |
| // we create your config |
| apiKey: '3eee686c0ebe39eff3baeb18c56fa5f8', |
| indexName: 'apache_ignite', |
| // Replace inputSelector with a CSS selector |
| // matching your search input |
| inputSelector: '#search-input', |
| // algoliaOptions: { 'facetFilters': ["version:$VERSION"] }, |
| |
| // Set debug to true to inspect the dropdown |
| debug: false, |
| }); |
| </script> |
| <script type='module' src='/assets/js/index.js?1600372780' async crossorigin></script> |
| <script type='module' src='/assets/js/versioning.js?1600372780' async crossorigin></script> |
| </body> |
| |
| </html> |