查找

文章
· 六月 23, 2024 阅读大约需 8 分钟

IRISでシャドウイングの代わりにミラーリングを構成する方法

これは InterSystems FAQ サイトの記事です。
 

InterSystems IRIS では、シャドウイングは非推奨機能となりました。

こちらのトピックでは、これまでにCachéでシャドウイングを使用していたお客様に対して、IRISへの移行後に、代わりに使用できるミラーリングの構成方法をご紹介します。

ミラーリングには機能的に2つの種類があります。

1.同期ミラーによるフェールオーバー(常にデータベースが同期されて複製、障害時に自動でフェールオーバー)
2.非同期ミラー(シャドウイングと同様の機能を提供)
 - DR非同期(DR構成で利用、フェールオーバーへの昇格が可能、複製DBへの書き込み不可)
 - レポーティング非同期(データマイニング/BIアプリでの利用、複製DBへの書き込み可能)


シャドウイングに代わって、IRISでは「プライマリ・フェイルオーバー」+「非同期ミラー」でミラーリングを構成する機能を利用することができます。

以下は、シャドウイングとミラーリングのサーバ役割の対比表になります。
※ミラー構成内の1つのインスタンスを  “ミラーメンバ” または単に “メンバ” と呼びます。

シャドウイング ミラーリング
DBサーバ プライマリ・フェイルオーバーメンバ
シャドウサーバ 災害復旧 (DR) 非同期メンバ
レポーティング非同期メンバ



では、ミラーの構成手順をご紹介します。手順は以下になります。

1) それぞれのサーバでISCAgent の構成・起動
2) それぞれのサーバでMIRRORDATAネームスペース(データベース)を作成
3) 正サーバでミラーを作成し、フェイルオーバー・メンバを構成・ミラーへデータベースの追加
4) 副サーバで非同期ミラー・メンバを構成・ミラーへのデータベースの追加
 (IRIS.DATのファイル自体をコピーして複製する場合は、必ずディスマウントした状態で行ってください。)

 


今回は、各設定を管理ポータルを使用して行う方法をご紹介します。
 

【今回のサンプル・ミラー構成について】

  正サーバ(ミラー・プライマリ) 副サーバ(ミラー・非同期)
ミラー名 MIRRORSET MIRRORSET
ミラーメンバ名 MACHINEA MACHINEC
IPアドレス 192.168.2.100 192.168.2.101


1) ISCAgent の構成・起動

ISCAgent は、IRISインストール時にインストールされます。
 こちらは、IRIS起動時に開始するよう設定する必要があります。
開始/停止方法は、OSごとに異なりますのでドキュメントをご覧ください。
ISCAgent は、各ミラーメンバ上の専用ポート (既定値は 2188) を使用します。


★2) MIRRORDATAネームスペース(データベース)の作成      

それぞれのサーバで、MIRRORDATAという名前の新しいネームスペースを作成し、参照するデータベースとしてMIRRORDATAデータベースをデフォルト設定の状態で作成します。 

  


3) 正サーバでミラーを作成し、フェイルオーバー・メンバを構成


1.ミラーサービスを有効にします
 管理ポータル:
 [システム管理] > [構成] > [ミラー設定] > [ミラーサービス有効]
 サービス有効 にチェックをして保存します。

 

 
2.ミラーを作成します
 管理ポータル:
 [システム管理] > [構成] > [ミラー設定] > [ミラーサービス作成] 
 [ミラー情報] セクションに以下の情報を入力して保存します。

※プライマリ-非同期ミラー構成の場合は、アービターを使用する必要はありません。

※ミラーメンバ名は、既定で $sysytem 変数の内容が設定されています。
 (<デバイス名>/<インスタンス名> 例:JP001ISJ/IRIS)
 こちらをそのまま使用するのでも構いません。


3.TESTMIRRORへMIRRORDATAデータベースを追加します。ミラーデータベース名には、MIRRORDATAを使用します

 管理ポータル:
 [システム管理] > [構成] > [システム構成] > [ローカルデータベース]
 MIRRORDATAの編集 → ミラー○○に追加

 メモ:もし、画面中に「ミラーに追加」のリンクが表示されない場合、ディスマウントを実行し、マウントし直してください。

 

※ミラーが有効なライセンスを使用していない場合、以下のようなエラーになりますのでご注意ください。
 エラー #2076: 'TESTMIRROR' のミラーメンバ情報取得中にエラーが発生しました。
 エラー情報: Failed to create InterSystems IRIS context, error = -1


 

4) 副サーバで非同期ミラー・メンバを構成


1.ミラーサービスを有効にします
 管理ポータル:[システム管理] > [構成] > [ミラー設定] > [ミラーサービス有効]
 サービス有効 にチェックをして保存します。
 

2.ミラーに非同期として参加します
 管理ポータル:[システム管理] > [構成] > [ミラー設定] > [非同期として参加] 
 [ミラー情報] セクションに、2) で設定した正サーバの情報を入力し、「次へ」をクリックします。

 


3.非同期メンバとして登録したいマシンの情報を指定して保存します
 今回は、非同期メンバシステムタイプ=災害復旧(DR)の構成とします。
 ※ミラーメンバ名は、既定で $sysytem 変数の内容が設定されています。こちらをそのまま使用するのでも構いません。 

 



4.非同期ミラーへデータベースの追加・キャッチアップを行います

 非同期データベースにMACHINEA(正サーバ)のバックアップファイルをリストアします。
 【補足】
 データベースファイル(IRIS.DAT)のコピーによるバックアップの場合は(=Backup.GeneralクラスのExternalFreeze()/ExternalThaw() を利用してバックアップを取っている場合)、非同期データベースをディスマウントした状態でデータベースファイル(IRIS.DAT)を置換します。

※外部/オンラインバックアップ・リストアについては、以下の記事で詳細手順を説明していますので、参考になさってください。
外部バックアップについて
オンラインバックアップについて

※バックアップからのリストアの場合、
 Limit restore to mirrored databases? →Yes でリストアします(リストア後、ミラーが有効化&キャッチアップされます)


★2025/07/25 追記★

2025.1以降のバージョンでは、「ミラーメンバーからの自動データベースダウンロード」機能を使用して、プライマリから簡単にミラーデータベースをダウンロードすることができるようになりました。
手順は、ローカルデータベース作成時に、「ミラーデータベース?(はい)」を選択し、「ミラーデータベース名」を指定するだけです。
この設定のみで、プライマリのミラー環境から、対象のデータベースを自動でダウンロードし、非同期DR環境に設定します。

こちらの機能を使用する場合、5と6の手順は必要ありません。7のミラーモニタでステータスを確認して終了です。

※この機能は、新規作成ミラーデータベースに対しては非常に便利ですが、元のデータベースのサイズが大きい場合は非常に時間がかかるため、注意が必要です。サイズの大きいデータベースの場合は従来の方法をお勧めします。

   

5.リストア(置換)後、ミラーモニタ画面にて非同期データベースに対するミラーの「有効化」を行います

 ※「ミラーメンバーからの自動データベースダウンロード」機能を使用しない場合

 管理ポータル:
 [システムシステムオペレーション] > [ミラーモニタ] 

 


6.有効化した後、キャッチアップします

※「ミラーメンバーからの自動データベースダウンロード」機能を使用しない場合

 


7.キャッチアップしたことを確認します(こちらで構成は終了です)

 


 


※非同期メンバのシステム・タイプを変更したい場合(DR非同期 --> レポーティング非同期)

管理ポータルで変更できます。

管理ポータル:
[システム管理] > [構成] > [ミラー設定] > [非同期を編集]

1.非同期メンバシステムタイプを「読み書き可能なレポーティング」に変更します。

2.非同期レポーティング(読み書き可能)は、フェールオーバーメンバに昇格する条件を満たしません。
  読み書き可能に変更するためには、フェールオーバーデータベースフラグをクリア します。
  ※ [FailoverDB] フラグをクリアすると、データベースは読み書き可能に変更されます。
   そのため、ミラーのプライマリコピーとしては使用できなくなります。
   非同期レポーティング(読み取り専用)の場合、この設定は推奨されません

3.保存します。

※詳細は、ドキュメント をご覧ください。


【注意】
[読み書き可能] または [読み取り専用のレポート] から [災害復旧 (DR)] に変更することはできません。
※一部の条件を満たした場合を除きます。詳細は ドキュメント をご覧ください。
 


enlightened【ご参考】
Cache Mirroring 101:簡単なガイドとよくある質問  
ミラーリングの機能について
ミラージャーナルファイルの削除のタイミングと要件
IRISでシャドウイングの代わりにミラーリングを構成する方法-プログラム編
 

1 Comment
讨论 (1)0
登录或注册以继续
文章
· 六月 18, 2024 阅读大约需 4 分钟

Unity Catalog for IRIS Workloads - Collision Theory Confirmed

Collision Theory Confirmed

Innovation happens when two or more technologies collide to create something new. The best collisions can CHANGE lives, eliminate WASTE, DIFFERENTIATE in the market or flat out give me another project I dont have time for, but this one would really really matter.

I attend conferences and hackathons searching for that something to click enough to make me walk out of a keynote happily distracted and snag one of those (rare indeed) empty benches next to a power outlet and consume code bases. This high occurred at  InterSystems Global Summit 2024 , but it wasnt apparent until a shot was fired 2900 miles away at DAIS 2024  at the very same time when Unity Catalog went Open Source! 

I am not one that can see through or engage a textile metaphor to articulate what is needed for data workloads at ridiculously weird/fast times to serve in my industry. I need software to back it, and pretty much immediately. This is the difference between solving a gap vs. curating an innovative idea I'd presume, so solutioning encouraged, and OSS is on the case.

Possible mis-use of "Collision Theory" for a publication aside, here is a collision or an eminent one at least that I pondered in an Uber ride a Wednesday ago and is still holding close to ring zero in my carbon based operating system.

The Collision

Vectors


You dont need to dig too hard to get excited about the immediately possibility of Vector Data Structures right along side all the other ones from a SQL perspective. "Already Ready" is a real thing and a column and ELT/ETL away without moving any data at all.

@Alvin Ryanputra 's GrandHack MIT Demo is kind on the eyes to highlight this data mix-in powered by embeddings/vectors:

SELECT TOP 3 * FROM scotch_reviews 
WHERE price < 100 // SQL STUFF
ORDER BY VECTOR_DOT_PRODUCT(description_vector, TO_VECTOR(:search_vector)) DESC // VECTOR SORCERY

You got your SQL mixed in with my Vectors could be a modern day Reese's commercial, and the fact you can take an already existing text column and rip it to evergreened embeddings and persist it should set off some light bulbs somewhere.

Python


Unity Catalog is front in center in the teaser for this post, but Python is the star of the show. The relentless work, evangelism, and solutioning that @Guillaume Rongier 
and the Python Posse at InterSystems has put in proved to be more important than ever to roll with the tide of our industry.

Why?

Python is a cloud interoperability platform.

And guess what...

It was successfully embedded and Object Script was made accessible in reverse fashion, and most likely not with the help of a single JIRA in the beginning to move it forward, and the real ticket to doing "Cloud." No more "adapters" needed to be built (but are welcomed and valuable), they are "Already Ready" in the supply chain as python modules.

If you are not in agreement with the above Python Cloud Statement, let's move to "Unmanaged Tables" in Unity Catalog OSS and argue about it there.

Unity Catalog OSS


In 2021, Databricks responded to customers jumping up and down to apply a sanity layer to the workloads for Data Governance, Security, and all those things mentioned for three days straight at Global Summit in the context of AI adoption. In 2024, it was opened up for any data platform to use, and has been a fascinating subscription to pull requests since that moment for sure.

So let's put it to its intended purpose, and turn the Orange to Teal and Navy to Purple and apply it in full solutioning glory to InterSystems IRIS.

Unity Catalog is a lot of things, a lot of good things that checks a lot of boxes in the modern data era. Outside of all those checkboxes is the registration of "connections" to external data for our Python powers to consume. This in essence is an "adapter" that results in a dataset for consumption of the IRIS Data Platform, instant cloud interoperability if you will with an enterprisey, itilly twist all with scoped authorization at the Metastore level.

[] = iriscatalog.cloudfiles("bucket")

If you consume information in a pattern like I do, I've already lost your SEO impression to another site to dig deeper on Unity Catalog, so Ill boil my closing actor in the collission with some MS Paint modifications as an overlay to Unity Catalog functionality.

This one is a bit far fetched and probably where on the spot solutioning falls apart, but what if our "Managed Tables" were InterSystems Data objects, and Unmanaged was instant data format compatibility ?

Key:
⛅ Instant Cloud Interoprability
🚀 Future Forward Data Sharing
✅  Already There

This is a developer community and a sweet terminal screenshot is mandantory with a whatif scenario in context. If you want to get started quickly in the flurry of development over there I suggest you just use this container on this pull request ( https://github.com/unitycatalog/unitycatalog/pull/42/files ).

What if, either by cpf magic, or callback, namespace creation registered itself with unity catalog?

So hi I am Ron and this is my article to be tokenized and spit out as embeddings and included in a yet to be named LLM in the future.

So how about a partnership ( https://www.unitycatalog.io/#partner-ecosystem ) over there with Unity Catalog ISC?

Ill certainly help in anyway I can.

讨论 (0)1
登录或注册以继续
问题
· 六月 14, 2024

Create a unique constraint on an existing table

I have a table that is already created and contains data.  I need to create a unique constraint that is a combination of two fields. Is there a way to do this in a SQL statement?  Also, I would lke to know how to add it in the table class.

1 Comment
讨论 (1)2
登录或注册以继续
问题
· 六月 13, 2024

Which are the best practises to handle large JSON?

Hello everyone,

Recently, I've been working on a Business Process that processes a large JSON FHIR message containing up to 50k requests in an array within the JSON.

Currently, the code imports the JSON as a dynamic object from the original message stream, obtains an iterator from it, and processes each request one at a time in a loop.

The performance meets the requirements, even with much larger requests than the one exposed above. However, I am interested in learning the best practices for handling large JSON in ObjectScript (and why not, Embedded Python) to achieve better performance for future developments.

Here are some ideas I have considered:

  1. Iterative Processing: Process each element of the JSON iteratively without loading the entire stream into memory.
  2. Chunking: Split the loaded JSON into smaller chunks and process them one by one. I could split the array in parts and I wonder if getting an iterator from a smaller JSON chunk would reduce computation time.
  3. Parallel Processing: After splitting the JSON, using parallel processing to handle multiple requests simultaneously. I read something about %SYSTEM.WorkMgr but I'm not sure how can I implement it in this case.

I would appreciate any technical information or reference to documentation about the listed topic or any other additional best practices that could help in handling large JSON data more efficiently in ObjectScript and Embedded Python. 

Thank you!

2 Comments
讨论 (2)3
登录或注册以继续
文章
· 六月 12, 2024 阅读大约需 2 分钟

La fin du Global Summit 2024

Bonjour à tous !

Aujourd'hui a été une journée riche en émotions au Global Summit, et je suis impatiente de partager avec vous les moments forts de cette dernière journée incroyable !

Dès le matin, notre stand de la Communauté des Développeurs a été le centre d'attraction de nombreux visiteurs enthousiastes.

@Guillaume Rongier, Luc Chatty, @Raj Singh, @Dmitry Maslennikov, @Olga Zavrazhnova, @Lucian ROTAR, @Thomas Dyar, @Irène Mykhailova

Luc Chatty, @Guillaume Rongier, @Dmitry Maslennikov, Lucian Rotar, @Thomas Dyar

Voici notre équipe de Relations avec les développeurs présente au Global Summit qui fait de l'écosystème des développeurs un endroit formidable.

@Olga Zavrazhnova (Global Masters),  @Vita Tsareva (Caelestinus), @Dean Andrews (chef du DevRel), @Anastasia Dyubaylo (Developer Community), @Irène Mykhailova (Developer Community)

Et bien sûr, notre équipe française qui anime la communauté des développeurs en français (avec un ami).

@Irène Mykhailova, @Guillaume Rongier, Luc Chatty, @Adeline Icard 

À la fin du Global Summit, il était temps de dire au revoir. Les sessions étant terminées, tout le monde s'est réuni pour échanger une dernière fois et se dire au revoir. Les adieux étaient empreints de promesses de se retrouver lors du prochain Summit. Les sourires, les accolades et les échanges chaleureux ont témoigné de la réussite de cet événement et de la force de notre communauté.

Merci à tous ceux qui ont participé et contribué à faire de ce Global Summit une expérience exceptionnelle. Restez connectés, et rendez-vous au prochain Summit pour encore plus de découvertes et d'innovations !

À bientôt et bon voyage à tous !

讨论 (0)1
登录或注册以继续