2015年10月11日日曜日

「polyglot persistence」(ポリグロットパーシステンス、複数データベースの最適活用)とは

Learning Neo4j本(Packet Publishing社が出していて現在Neo4j公式サイトから無料DLできる)の第9章に、

「Very often, users will want to use the Neo4j Graph Database as part of a solution that uses a polyglot persistence strategy.」

との記述がある。
さて、Polyglot Persistenceとは何か。
各単語を単純に訳すと、

*polyglot:数か国語に通じている、数か国語を話す、数か国語で書かれた(http://ejje.weblio.jp/content/polyglot
*persistence:持続性(http://ejje.weblio.jp/content/persistence

となる。
下記のサイト群を参考にすると、

*リレーショナルデータベースですべてが解決していた時代は終わり、現在NoSQLが台頭してきている。問題に対して一つのモデル(データベース、データストレージ)だけで解決するのは難しく、複数のモデルをアプリの目指すところや取り扱うデータに合わせて使い分ける必要がある。
*様々な問題を解決するためには、各問題解決に適した言語が使われている(polyglot programming)。データベースも同様である。

つまりpolyglot persistence、訳すなら、「複数データベースの最適活用」という感じで良いのかな。

「Very often, users will want to use the Neo4j Graph Database as part of a solution that uses a polyglot persistence strategy.」→「大抵、複数データベースの最適活用戦略の一部としてグラフ型データベースNeo4jが使われます。」



**********以下、出典*************


www.slideshare.net

*polyglot:Adjective:Knowing or using several language(数か国語を知っているか使っている)
*persistence:Noun:The continued or prolonged existence of something(何かの存在を続けているか延長している)
    →Polyglot Persistence:The continued or prolonged existence of something using several languages(数か国語を使う何かを続けているか延長している)
        languages→databases。
    「Polyglot Persistence, like polyglot programming, is all about choosing the right persistence option for the task at hand」by Scott Leberknight, Octoer, 2008(http://www.nearinfinity.com/blogs/scott_leberknight/polyglot_persistence.html ←2015/10/11時点でリンク切れ)(ポリグロットパーシステンスとは、ポリグロットプログラミングのように、タスクのために正しい永続化オプションを将来的に選択することである)



www.slideshare.net

    リレーショナルデータベースの黄金期とNoSQLの台頭。CAP定理。ACID特性とBASE特性。NoSQLの種類。どれを選択するか(Data、Access Patterns、CAP。追加でMaturity(成熟度合)、Stability、Maintainability、Durability、Cost、Tools、Familiarity)、……について書かれている。
    P.46
*Enterprise application are complex and combine complex problems(エンタープライズアプリケーションは複雑で、複雑な問題を併せ持つ)
            -Assumption that we should use one data store is absurd(一つのデータストアを使うべき、という仮定は不合理)
            -You can't try to fit all in one model and expect no problem(一つのモデルにすべてを適用し、問題が出ないようにすることはできない)
*To leverage multiple data storages, based on the way data is used by the application.(アプリケーションからの使用方法に基づいて複数のデータストレージを活用する)
            -Associated with learning curve(学習曲線に関連付けられる)
            -Long term investment (More productive in the long-run)(長期でより生産的な長期投資)
 *Leverage the strength of multiple data stores(複数のデータストアの強みを活用)

www.jamesserra.com

    eコマースでどのようなデータがあり、各データに対してどのようなデータベースタイプが良いか(ファイナンシャルデータならRDBMS、ユーザのセッションならKey-Value、レコメンデーション(推奨)にはGraph、ショッピングカートや商品カタログならDocument……)表がある。