ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Ozerov <voze...@gridgain.com>
Subject Re: Rename "cache group" to "tablespace"?
Date Fri, 23 Nov 2018 11:25:18 GMT
Hi Ivan,

I do not have answers to some of your questions, as haven't designed
tablespaces for Ignite so far. This is common term used by many vendors
(Oracle, MySQL, MongoDB to name a few). Essentially, "tablespace" is how
data of certain objects are organized into files. Multiple tablespaces for
separate objects provides performance and management benefits. For example,
different sets of objects might be written to different disks on local
machine to improve throughput. Or writes to a single object (e.g. cache)
may be parallelized in the same way.

But in this topic I would prefer to avoid digging much into details. My
goal for now is to understand whether we can create a single concept which
will be applicable to both existing and future storage formats.

Vladimir.

On Fri, Nov 23, 2018 at 10:41 AM Павлухин Иван <vololo100@gmail.com> wrote:

> Hi Vladimir,
>
> How do you see a default tablespace configuration in the "bright"
> future? Is it going to be a single file for an Ignite instance? In
> what cases will be there benefits to explicitly configure additional
> tablespaces?
> By the way was the name "tablespace" hand-crafted or it was it
> borrowed somewhere?
> Also if it is TABLEspace should it be aligned with renaming
> IgniteCache to IgniteTable discussed in [1]?
>
> [1]
> http://apache-ignite-developers.2346864.n4.nabble.com/Applicability-of-term-cache-to-Apache-Ignite-td36541.html
> вт, 20 нояб. 2018 г. в 10:57, Dmitriy Setrakyan <dsetrakyan@apache.org>:
> >
> > I really like the idea.
> >
> > On Mon, Nov 19, 2018, 23:45 Vladimir Ozerov <vozerov@gridgain.com wrote:
> >
> > > Igniters,
> > >
> > > We had several discussion about cache groups [1]. Our current
> consensus is
> > > that this is not that good design decision - bad scan performance, no
> API.
> > > A kind of shortcut to solve memory consumption problems. For this
> reason we
> > > try to avoid exposing "cache group" to API when possible. Also we
> > > understand that current file-per-partition approach is not ideal
> either -
> > > when there are too many partitions we have to fsync a lot of files.
> And as
> > > an idea for "bright future" we consider tablespaces - one or several
> files
> > > where all database objects are stored in dedicated "segments", which
> are
> > > allocated in smaller units called "extents".
> > >
> > > I was thinking on how to "legalize" cache groups on API on the one hand
> > > (product needs them currently), and to let real tablespaces to appear
> in
> > > future. Idea is simple - treat cache group as special kind of
> tablespace.
> > > We may say that current storage organization is one type of
> tablespace, and
> > > proposed "file-segment-extent" storage organization is another type of
> > > tablespace.
> > >
> > > With this in mind we can configure tablespaces in IgniteConfiguration,
> then
> > > assign each cache a tablespace. As advanced tasks we may allow dynamic
> > > table space create/alter/drop, I'll show SQL examples below.
> > >
> > > // Interface
> > > interface Tablespace {
> > >     String name();
> > > }
> > >
> > > // Current non-shared tablespace (aka "physical cache")
> > > class FilePerPartitionTablespace implements Tablespace {
> > >     // ...
> > > }
> > >
> > > // Shared tablespace (aka "cache group") - note that now we have a
> legal
> > > place for cache group configuration:
> > > class FilePerPartitionSharedTablespace implements Tablespace {
> > >     CacheMode cacheMode;
> > >     CacheAtomicityMode cacheAtomicityMode;
> > >     AffinityFunction affinityFunction;
> > >     // + Other parameters from
> > > ClusterCachesInfo.validateCacheGroupConfiguration
> > >     // + Some parameters from "DataRegionConfiguration" (e.g. paths)
> > > }
> > >
> > > // Future "real" tablespace
> > > class SegmentedTablespace implements Tablespace {
> > >     // Whatever is needed.
> > > }
> > >
> > > // Cache configuration
> > > class CacheConfiguration {
> > >     ...
> > >     String tablespace;
> > >    ...
> > > }
> > >
> > > // Managing tablespaces from SQL:
> > > CREATE TABLESPACE my_tbs ENGINE=FILE_PER_PARTITION_SHARED
> > > CACHE_MODE=PARTITIONED BACKUPS=1
> > > ALTER TABLESPACE my_tbs ENCRYPTED=1
> > > CREATE TABLE my_table (...) TABLESPACE my_tbs
> > >
> > > What do you think?
> > >
> > > Vladimir.
> > >
> > > [1]
> > >
> > >
> http://apache-ignite-developers.2346864.n4.nabble.com/Remove-cache-groups-in-AI-3-0-td29184.html
> > >
>
>
>
> --
> Best regards,
> Ivan Pavlukhin
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message