
基本的な 3 層 Web アプリケーションがあり、GlassFish を使用したいと考えています。管理スキルが同じであると仮定した場合、ホスト OS を Windows 2003 Server にするか RedhHat にするかで違いはありますか?
答え1
遅かれ早かれ、Windows のファイル ロックの問題により、Win2K3 に展開するときに問題が発生する可能性が高くなります。しかし、何らかの方法でその問題を回避する方法を学ぶことになります。
こちらもご覧くださいこれ質問:
他の条件が同じであれば、GlassFish のサーバー OS として Windows を選択することはありませんが、Win2K3 を強く推奨することもないでしょう。
答え2
fredarin さんの意見に賛成です。これは私が SO に投稿した回答の複製です。
0 票が下がった
Glassfish のソース、具体的には ./appserv-commons/src/java/com/sun/enterprise/util/io/FileUtils.java を確認すると、Windows 上のファイルやディレクトリを削除したり名前を変更したりするために Glassfish が実行するすべての操作がわかります。
これは、開いているファイルの削除と名前変更に制限がある Windows の問題です。
そこには、ファイル ストリームを閉じるために JVM に GC を複数回要求すること、"疑似" 名前変更、スリープ試行ループなど、さまざまなトリックがあります。
いくつかの例:
/**
*Attempts to delete files that could not be deleted earlier and were not overwritten.
*<p>
*On Windows, the method requests garbage collection which may unlock locked
*files. (The JarFile finalizer closes the file.)
/*
*On Windows, as long as not all leftover files have been cleaned and we have not
*run the max. number of retries, try again to trigger gc and delete
*each remaining leftover file.
*/
/**
* Windows has BIG issues renaming a directory that is open somnewhere -- e.g. if
* a DOS box is opened anywhere in that directory.
* This method will try to do a "virtual renaming" if there are problems
* I.e. it attempts to do a simple rename, if that fails it will copy everything under
* the original directory to the renamed directory. Then it will delete everything
* under the original directory that the OS will allow it to.
実際には、一部のファイルは削除または移動できずに残ってしまうため、Windows でのデプロイメントや再デプロイメントが失敗することがあります。私が実行しているすべての Glassfish インスタンスのうち、Solaris 10 では問題が発生したことがありませんが、Windows では常にこれに関連する問題が発生します。
つまり、他のプラットフォーム管理上の考慮事項は別として、この理由だけでも、どの *NIX も優れていることになります。
答え3
同じ仕様だと仮定すると、大きな違いがあるかどうかはわかりません。一部の管理者が、アプリケーション クライアント コンテナー (ACC) を Linux で実行すると高速になると言っているのを聞いたことがあります。