Pesquisar

記事
· 2021年12月9日 2m read

MULTIEXCEL

Millions of professionals use a wonderful tool, spreadsheets, for engineering calculations and financial analysis. It attracts a user-friendly interface and clear data organization. Cell formulas provide rich opportunities for automating calculations. No programming is required. (For example, Microsoft Excel)

But in order to expand the scope of the tool, it is necessary to increase the dimension of the tables and the speed of calculations. It is necessary to create a single, common database for a group of users. Cell formulas should be able to do everything. In this case, it is advisable not to change the source code of the application. It seems like an impossible mission.

However, M-technology has led to an unusual solution: the “spreadsheet m-amplifier”. An analogy is your car: the hydraulic booster helps even a fragile woman to turn the steering wheel easily. In the old days, only a strong macho could drive a car. Another example is a quantum computer. The calculations are carried out in parallel and consistently in all Universes of our Multiverse. The solution to any task is instant. So far, only in a project.

Our m-amplifier (“Shadow excel”) is implemented as parallel invisible spreadsheets inside Cache / IRIS InterSystems. There are also workbooks, worksheets, columns, rows, cells with formulas. Each main-excel sheet has a corresponding shadow-m-sheet. Each cell has a shadow cell. But formulas in the shadow cells are unusual - they are actually MUMPS commands. The m-worksheets are not two-dimensional, but multi-dimensional. The interface with users is not directly, but through “main excel”.

The possibilities of the shadow are orders of magnitude higher. Therefore, shadow does all the hard work and is much more efficient. M-globals spin faster than main sheets. All Cache / IRIS resources are available to M-formulas. You can build complex multidimensional data structures and quickly receive analytical reports with a large number of graphic elements. You can create a complex interactive game.

There is no need to keep a huge archive of workbooks with data from different periods of time. All data is stored in M-database.

"Shadow excel" is associated with several users at the same time over a network or Internet. Users see “main excel” on their screens, which is fantastically fast and performs incredibly difficult tasks.

We managed to correctly organize reliable synchronous work of shadow and main excel in real time. Everything that happens in the shadow is transferred to the main one and vice versa. They work as a single tool: MULTIEXCEL, on which it is now possible to build large complex systems of production and financial accounting and management. It is also used as UI for Cache / IRIS.

The operating experience of MULTIEXCEL has shown excellent results. This is another interesting area of application for M-technologies.

2 Comments
ディスカッション (2)0
続けるにはログインするか新規登録を行ってください
記事
· 2021年11月29日 2m read

イメージファイルをFTPサーバからアップロード/ダウンロードする方法

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

FTPサーバから、アップロード/ダウンロードする方法は以下の通りです。

1. FTPサーバにイメージファイルをアップロードする

 set tmpfile="c:\temp\test.jpg"
 set ftp=##class(%Net.FtpSession).%New() 
 // ftp サーバへ接続する
 do ftp.Connect("","<ユーザ名>","<パスワード>")
 // 転送モードをBINARYに設定
 do ftp.Binary()
 // アップロードするディレクトリに移動
 do ftp.SetDirectory("/temp/upload")
 // アップロードするファイルのストリームを用意   
 set file=##class(%File).%New(tmpfile)
 do file.Open("UK\BIN\")
 // ファイルをアップロード
 // 第1引数: アップロード先に作成するファイル名
 // 第2引数: アップロードするファイル・ストリーム
 do ftp.Store("test.jpg",file)
 // ftp サーバからログアウト
 do ftp.Logout()
 // ファイルを閉じる
 do file.Close()
 // (オプション) アップロードしたファイルを削除する
 //do ##class(%File).Delete(tmpfile)

2. FTPサーバからイメージファイルをダウンロードする

   set ftp=##class(%Net.FtpSession).%New()     // ftp サーバへ接続する
    do ftp.Connect("","<ユーザ名>","<パスワード>")     // 転送モードをBINARYに設定
    do ftp.Binary()     // ダウンロードして格納するファイル・ストリームを用意
    set stream=##class(%FileBinaryStream).%New()
    do stream.LinkToFile("c:\temp\testdownload.jpg")
   // ダウンロードするディレクトリに移動
    do ftp.SetDirectory("/temp/download")     // ファイルをダウンロードしてストリームを閉じる
    do ftp.Retrieve("test.jpg",stream)
    do stream.SaveStream()
    Set stream=""     // ftp サーバからログアウト
    do ftp.Logout()
ディスカッション (0)1
続けるにはログインするか新規登録を行ってください
記事
· 2021年11月15日 1m read

Webゲートウェイ/CSPゲートウェイの設定についての注意点(Apache)

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

SELinuxの機能が有効になっているとファイルアクセス時にセキュリティコンテキストのチェックで permission エラーになります。

CSP のページについても同様に permission エラーになっているため、Apache にて 403 Forbidden エラーになります。  

以下の設定でSELinuxの機能を無効にすることで回避できます。

設定ファイル /etc/selinux/config の SELINUX=disableに設定し、OS の再起動を行います。

例:

 # This file controls the state of SELinux on the system.
  # SELINUX= can take one of these three values:<
  # enforcing - SELinux security policy is enforced.
  # permissive - SELinux prints warnings instead of enforcing.
  # disabled - SELinux is fully disabled.
  SELINUX=disabled
  # SELINUXTYPE= type of policy in use. Possible values are:
  # targeted - Only targeted network daemons are protected.
  # strict - Full SELinux protection.
  SELINUXTYPE=targeted 



【注意】
RHEL 9 から SELinux の無効化方法が変わりました。

RHEL 9 での無効化方法

SELINUX の無効化は、grubby コマンドで行います。

# sudo grubby --update-kernel ALL --args selinux=0
#
# shutdown -r now    // もしくは、reboot
// 再起動後

# getenforce
Disabled
ディスカッション (0)0
続けるにはログインするか新規登録を行ってください
記事
· 2021年11月10日 4m read

InterSystems製品のプロセスが使用するメモリ量について

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


InterSystems製品のプロセスが消費するメモリ領域は以下の6つの領域になります。

プロセスのプライベートな領域

 1. プロセスパーティション(ローカル変数テーブル等、プロセスごとに使用するメモリ)
 2. 長い文字列(LongString)使用メモリ
 3. 文字列スタック...等

プロセス間共有領域

 4. データベースキャッシュ
 5. ルーチンキャッシュ
 6. 一般ヒープメモリ(プロセステーブル、ロックテーブル等)


プロセスが使用するメモリ領域は、「プライベート領域」と「共有領域」の大きく2種類に分かれます。
プライベートな領域はそのプロセスのみが使用し、個々のプロセス毎にメモリを割り当てます。
共有領域は、プロセス間で一つのメモリ領域を共有してアクセスしていますので実体はメモリ上に 1つです。

以下それぞれの領域の値は、管理ポータルで指定します(設定可能な場合)。

(1) プロセスパーティションのサイズ

 [システム管理] > [構成] > [システム構成] > [メモリと開始設定] > [プロセスあたりの最大メモリ(KB)]

 このプロセスパーティションサイズの初期値は 128  KBytes になっており、プロセスがこの領域を使用すると自動的に拡張します。
 管理ポータルでの設定は、このパーティションが拡張できる最大値を設定しています。


(2) 長い文字列(LongString)使用メモリ  ※Caché2007.1~

 プロセスで実際に長い文字列が使用されると、文字列用のメモリをそのプロセス用のパーティションメモリ領域から割り当てるのではなく、オペレーティングシステムで malloc() により割り当てられます。
 上限はありません(仮想メモリ [=物理メモリ+ページファイル] から確保可能な上限まで)。
 文字列が破棄されると、長い文字列用に取得したメモリを解放します。
 
 ※以下ドキュメントをご参照ください
 長い文字列について


(3) 文字列スタック

 プロセスで文字列を処理するための作業領域です。Unicode環境では、最大14MBです。
 LongStringを無効にした場合(IRISでは無効にはできません)は、Unicode環境で 264 KBです。


(4) データベースキャッシュ

 [システム管理] > [構成] > [システム構成] > [メモリと開始設定]:8KBデータベースキャッシュ用メモリ (MB)


(5) ルーチンキャッシュ

 [システム管理] > [構成] > [システム構成] > [メモリと開始設定]:ルーチンキャッシュ用メモリ (MB)    


(6) 一般ヒープメモリ

 [システム管理] > [構成] > [追加の設定] > [メモリ詳細] > [gmheap]


以上の要素でプロセスが使用するメモリサイズが決まり、1つのプロセスでの最大使用メモリはおおよそ上記6つの値の合計値になります。

全プロセスで使用するメモリサイズは以下のとおりです。

[ { (1)プロセスパーティション + (3)文字列スタック }  × プロセス数 ] 
  + (2) 長い文字列使用メモリ(全プロセス合計※)
  + (4) データベースキャッシュ
  + (5) ルーチンキャッシュ
  + (6) 一般ヒープメモリ 

※長い文字列使用メモリとして実際にどの位のメモリ総サイズが必要になるかは、アプリケーション単位で算出する必要があります。


また、各プロセスはアクセスするメモリ領域を管理するページテーブルを持ちます(OSにより管理される領域)。
プロセス間共有領域を Small page として確保している場合は、このページテーブルのサイズが大きくなります(1GB当たり32MB)。
これを Large page で確保するとページテーブルサイズが小さくなります(1GB当たり64KB)。
Large page で確保した場合は、起動時に messages.log/cconsole.log に以下のメッセージが出力されます。

MM/DD/YY-hh:mm:ss:sss ( 0) 0 Allocated ***MB shared memory (large pages): ***MB global buffers, ***MB routine buffers

詳細については、下記の技術資料を公開しております。
Windows上でのCaché共有メモリの割り当てについて


メモリ要件の見積もりについては、以下のドキュメントをご覧ください。
メモリ要件の見積もり


あわせて、以下の関連記事も是非ご覧ください。

 <STORE>エラーが発生する場合の対処法について
 管理ポータルのメモリ関連設定項目について
 System routine buffer (# KB) shortage is detected.... のメッセージの意味と対処方法
  データベースキャッシュおよびルーチンキャッシュの最適値の設定方法
  Windows上での共有メモリの割り当てについて
 IRISが使用するワーキングセット(メモリ)について

ディスカッション (0)0
続けるにはログインするか新規登録を行ってください
お知らせ
· 2021年11月8日

Git for Shared Development Environments

If you're building solutions on IRIS and want to use Git, that's great! Just use VSCode with a local git repo and push your changes out to the server - it's that easy.

But what if:

  • You're collaborating with other developers on a shared, remote development environment and want to avoid concurrent editing of the same file
  • You're using editors based in the management portal for BPL, DTL, pivots, dashboards, etc. and want straightforward source control for your work
  • You're still using Studio for some things and/or occasionally jump back there from VSCode - or, your team has not yet fully embraced VSCode, and some team members still want to use Studio
  • You're working on a bunch of separate projects at the same time in the same namespace - say, several packages defined using the InterSystems Package Manager - and want to just work with all of them from one isfs editing view (rather than a bunch of distinct projects) with changes tracked in the proper git repo automatically

Then it wasn't so easy... until late last month, when we released Git for Shared Development Environments (Open Exchange / GitHub). You can get this extension using the InterSystems package manager:

zpm "install git-source-control"

Prior to this, the options for source control with Git were an old mostly-Windows-only, local development environment-only Git extension and a more recent Open Exchange project based on it but streamlining use a bit. There's also Port, which just deals with files and is version control system-agnostic.

What does git-source-control have that these packages don't?

  • Simple menu-based integration with git that works on any operating system
  • A git user interface to cover an expanding set of common git activities, without having to SSH over to the remote environment.
  • Concurrency control for multiple users working in the same environment at the same time. Once you make changes to a class/routine/etc., it's yours until you discard or commit your changes. (We do have ways around this when needed, though!)
  • Package manager-awareness: just zpm "load -dev /path/to/package" and, if /path/to/package/.git exists, changes to resources in your package will automatically be reflected in the right place on the server filesystem. The UI works with this too, based on the class/etc. from which it is launched.

All of this works from VSCode:

 
Spoiler

And Studio:

 
Spoiler

To give you control over and visual insight into your git repository:

 
Spoiler

We hope this enables your successful development of IRIS-based solutions, and welcome your feedback!

NOTE - To see the presentation launching this at the 2021 Global Summit, see this article: https://community.intersystems.com/post/video-git-gitlab-shared-developm...

50 Comments
ディスカッション (50)10
続けるにはログインするか新規登録を行ってください