blob: 6f4e619d9dc077c8b0abbcfa986c3f6611bac9cf [file] [log] [blame]
extend ../_components/base.pug
block pagetitle
| Native Persistence
block css
link(rel="stylesheet", href="../css/native-persistence.css?ver=" + config.version)
link(rel="stylesheet", href="../js/vendor/highlight/default.min.css?ver=" + config.version)
link(rel="stylesheet", href="../js/vendor/highlight/night-owl.css?ver=" + config.version)
script(src="../js/vendor/highlight/highlight.min.js")
block main
- global.pageHref = "features"
- config.hdrClassName = "hdr__blue"
include ../_components/header.pug
section.innerhero
.container.innerhero__cont
.innerhero__main
.innerhero__pre.pb-3 Apache Ignite
h1.h1.innerhero__h1 Native Persistence
.innerhero__descr.pt-2.h5.
Scale beyond available memory capacity <br>
and skip memory warm-ups on restarts
.innerhero__action
a.button.innerhero__button(href="https://ignite.apache.org/docs/latest/index") Start Coding
img.innerhero__pic.innerhero__pic--native(src="/public/img/features/native-header.svg", alt="Native Persistence")
// /.innerhero
section.native1.container.flexi
.native1__block.native1__block--bad
img.native1__icon(src="/public/img/features/icon-check-err.svg", alt="")
.native1__title.fz20.pt-1x Usually, in-memory caches and databases provide limited persistence capabilities.
p.pt-2 For instance, some solutions just do a backup copy of <br>the in-memory data purely for restart purposes.
.native1__block
img.native1__icon(src="/public/img/features/icon-check-ok.svg", alt="")
.native1__title.fz20.pt-1x.
Ignite persistence doesnt have any limitations. <br>
Our native persistence behaves like a classic <br>disk-based database.
section.native2.container
.native2__grid
article.native2item
h3.fz20.native2item__title Scale beyond memory <br>capacity
p.pt-1x 100% of&nbsp;data is&nbsp;always stored on&nbsp;disk. You decide how much memory allocate to&nbsp;your data.
article.native2item
h3.fz20.native2item__title Seconds needed <br>for recovery
p.pt-1x Ignite becomes operational from disk instantaneously. There is&nbsp;no&nbsp;need to&nbsp;wait for the data to&nbsp;get preloaded on&nbsp;restarts.
article.native2item
h3.fz20.native2item__title Query in-memory <br>and on-disk data
p.pt-1x If&nbsp;any record is&nbsp;missing in&nbsp;memory, then Ignite reads it&nbsp;from disk. This is&nbsp;supported for all the APIs including SQL.
section.native-howwork.container
.native-howwork__wrap.flexi
.native-howwork__left
h3.h5 How it works?
.native-howwork__text.pt-1
p The native persistence functions as&nbsp;a&nbsp;distributed, ACID, and SQL-compliant disk-based store. It&nbsp;integrates into the Ignite <a href="/features/multi-tier-storage.html">multi-tier storage</a> as&nbsp;a&nbsp;disk tier.
p.pt-1 When the native persistence enabled, Ignite stores a&nbsp;superset of&nbsp;data on&nbsp;disk and caches as&nbsp;much as&nbsp;it&nbsp;can in&nbsp;memory.
.native-howwork__right
p For example
p.pt-1x If&nbsp;your application needs to&nbsp;store 200 records in&nbsp;an&nbsp;Ignite cluster and the memory capacity allows caching only 150&nbsp;records, then all 200 will be&nbsp;stored on&nbsp;disk, out of&nbsp;which 150 will be&nbsp;served from memory while the rest 50&nbsp;from disk whenever the application requests them.
section.native-points.container
h2.h4 Checkpointing And Write-Ahead Logging <br>Ensure Durability And Consistency Of&nbsp;Data
.native-points__grid.pt-5
.native-points__item.fz20
p Committed transactions always survive failures
.native-points__item.fz20
p The cluster can always be&nbsp;recovered to&nbsp;the latest successfully committed transaction
section.native-steps
.container
h2.h4 Three-Step Process To&nbsp;Update Your Data <br>At&nbsp;In-Memory Speed But Not Losing A&nbsp;Bit
img.native-steps__pic(src="/public/img/features/native-stepspic.svg", alt="")
.native-steps__grid
article.nativestepitem
i.fz20.pb-1x 01
//- .nativestepitem__title.fz20 First Step
.nativestepitem__text
p As&nbsp;soon as&nbsp;the update comes from the application side, a&nbsp;record is&nbsp;updated in&nbsp;memory. Then, the change is&nbsp;added <a href="https://ignite.apache.org/docs/latest/persistence/native-persistence.html#write-ahead-log">to&nbsp;the write-ahead log (WAL).</a>
p The purpose is&nbsp;to&nbsp;propagate updates to&nbsp;disk in&nbsp;the fastest way possible and provide a&nbsp;consistent recovery mechanism that remediates full cluster failures.
article.nativestepitem
i.fz20.pb-1x 02
//- .nativestepitem__title.fz20 Second Step
.nativestepitem__text
p As&nbsp;the WAL grows, it&nbsp;periodically gets checkpointed to&nbsp;the main storage.
p <a href="https://ignite.apache.org/docs/latest/persistence/native-persistence.html#checkpointing">Checkpointing</a> is&nbsp;the process of&nbsp;copying dirty pages from the memory tier to&nbsp;the partition files on&nbsp;disk.
p.nativestepitem__small A&nbsp;dirty page is&nbsp;a&nbsp;page that was updated in&nbsp;memory, was appended to&nbsp;the WAL, but was not written to&nbsp;the respective partition file on&nbsp;disk yet.
article.nativestepitem
i.fz20.pb-1x 03
//- .nativestepitem__title.fz20 Third Step
.nativestepitem__text
p After a&nbsp;while, the information about updates in&nbsp;WAL can be&nbsp;removed, compressed or&nbsp;moved to&nbsp;archive.
p So&nbsp;you can reuse your disk space.
section.nativecode.container.jsTabWrap
header.blockheader.blockheader--spl.flexi
h2.h4.blockheader__left You Decide Which Data To Persist
.blockheader__right.fz20
p Toggle a&nbsp;single configuration setting to&nbsp;turn a&nbsp;cluster into a&nbsp;database <br>that scales across memory and disk
.nativecode__tabctrls.flexi
a(href="#", data-tablink="nativeTabXML").nativecode__link.active XML
a(href="#", data-tablink="nativeTabJava").nativecode__link Java
a(href="#", data-tablink="nativeTabNET").nativecode__link C#/.NET
.nativecode__tabs
.nativecode__tab(data-tab="nativeTabXML").active
pre.nativecode__codebox
code.xml.
&lt;bean class="org.apache.ignite.configuration.IgniteConfiguration"&gt;
&lt;property name="dataStorageConfiguration"&gt;
&lt;bean class="org.apache.ignite.configuration.DataStorageConfiguration"&gt;
&lt;property name="defaultDataRegionConfiguration"&gt;
&lt;bean class="org.apache.ignite.configuration.DataRegionConfiguration"&gt;
&lt;property name="persistenceEnabled" value="true"/&gt;
&lt;/bean&gt;
&lt;/property&gt;
&lt;/bean&gt;
&lt;/property&gt;
&lt;/bean&gt;
.nativecode__tab(data-tab="nativeTabJava")
pre.nativecode__codebox
code.java.
IgniteConfiguration cfg = new IgniteConfiguration();
DataStorageConfiguration storageCfg = new DataStorageConfiguration();
// Enable Ignite Persistence
storageCfg.getDefaultDataRegionConfiguration().setPersistenceEnabled(true);
// Using the new storage configuration
cfg.setDataStorageConfiguration(storageCfg);
.nativecode__tab(data-tab="nativeTabNET")
pre.nativecode__codebox
code.csharp.
var cfg = new IgniteConfiguration
{
DataStorageConfiguration = new DataStorageConfiguration
{
DefaultDataRegionConfiguration = new DataRegionConfiguration
{
Name = "Default_Region",
PersistenceEnabled = true
}
}
};
// /.nativecode
section.native-bottom.container
.native-bottom__grid
article.nativebotblock
h3.h4.nativebotblock__title
img(src="/public/img/features/native-rocket.svg", alt="").nativebotblock__icon
span Ready to Start?
p.nativebotblock__text Discover more details about native persistence <br>and configure it&nbsp;for your use-case
a.nativebotblock__link.arrowlink(href="https://ignite.apache.org/docs/latest/persistence/native-persistence", target="_blank") Native Persistence Usage and Configuration
article.nativebotblock.nativebotblock--learn
h3.h4.nativebotblock__title
img(src="/public/img/features/native-docs.svg", alt="").nativebotblock__icon
span Want to&nbsp;Learn More?
p.nativebotblock__text Check out the details of&nbsp;native persistence <br>implementation, <a href="https://www.youtube.com/watch?v=6Yg5QW-XFVc&list=PLMc7NR20hA-I2EfyXeaSRHY5dRFtK_NF0&index=6" target="_blank">or&nbsp;watch a&nbsp;video</a>
a.nativebotblock__link.arrowlink(href="https://cwiki.apache.org/confluence/display/IGNITE/Ignite+Persistent+Store+-+under+the+hood", target="_blank") Native Persistence Implementation Details