はてなキーワード: Writeとは
- [ ] I don't feel angry and hate.
- [ ] I still cry, worry and sad. That is ok. Life is not that simple to anybody
- [ ] What I really want is for you to be happy.
- [ ] I still want to disappear sometimes because I can't imagine I can be happy without you. You changed my life definition of happiness.
- [ ] this line needs to be considered
- [ ] But I always could not do it. There are too many people around me to do that.
- [ ] this line is not good.
- [ ] So I'm very lucky that I got a lot of friends and words that I need at the moment I need. I was thinking in a different way sometimes. But now I can see I am very lucky.
- [ ] You changed me a lot. There's a lot of things i know in my mind. You gave me a chance to make that happen.
日付は 2008 年 4月になってる。
結論:大丈夫。
MvK2010
I'm going to copy paste a full blog post of a research scientist at MIT here, who explains the situation at Fukushima much better than anyone else has, his message: no worries.
This post is by Dr Josef Oehmen, a research scientist at MIT, in Boston.
He is a PhD Scientist, whose father has extensive experience in Germany’s nuclear industry. I asked him to write this information to my family in Australia, who were being made sick with worry by the media reports coming from Japan. I am republishing it with his permission.
It is a few hours old, so if any information is out of date, blame me for the delay in getting it published.
This is his text in full and unedited. It is very long, so get comfy.
I am writing this text (Mar 12) to give you some peace of mind regarding some of the troubles in Japan, that is the safety of Japan’s nuclear reactors. Up front, the situation is serious, but under control. And this text is long! But you will know more about nuclear power plants after reading it than all journalists on this planet put together.
There was and will *not* be any significant release of radioactivity.
By “significant” I mean a level of radiation of more than what you would receive on – say – a long distance flight, or drinking a glass of beer that comes from certain areas with high levels of natural background radiation.
I have been reading every news release on the incident since the earthquake. There has not been one single (!) report that was accurate and free of errors (and part of that problem is also a weakness in the Japanese crisis communication). By “not free of errors” I do not refer to tendentious anti-nuclear journalism – that is quite normal these days. By “not free of errors” I mean blatant errors regarding physics and natural law, as well as gross misinterpretation of facts, due to an obvious lack of fundamental and basic understanding of the way nuclear reactors are build and operated. I have read a 3 page report on CNN where every single paragraph contained an error.
We will have to cover some fundamentals, before we get into what is going on.
Construction of the Fukushima nuclear power plants
The plants at Fukushima are so called Boiling Water Reactors, or BWR for short. Boiling Water Reactors are similar to a pressure cooker. The nuclear fuel heats water, the water boils and creates steam, the steam then drives turbines that create the electricity, and the steam is then cooled and condensed back to water, and the water send back to be heated by the nuclear fuel. The pressure cooker operates at about 250 °C.
The nuclear fuel is uranium oxide. Uranium oxide is a ceramic with a very high melting point of about 3000 °C. The fuel is manufactured in pellets (think little cylinders the size of Lego bricks). Those pieces are then put into a long tube made of Zircaloy with a melting point of 2200 °C, and sealed tight. The assembly is called a fuel rod. These fuel rods are then put together to form larger packages, and a number of these packages are then put into the reactor. All these packages together are referred to as “the core”.
The Zircaloy casing is the first containment. It separates the radioactive fuel from the rest of the world.
The core is then placed in the “pressure vessels”. That is the pressure cooker we talked about before. The pressure vessels is the second containment. This is one sturdy piece of a pot, designed to safely contain the core for temperatures several hundred °C. That covers the scenarios where cooling can be restored at some point.
The entire “hardware” of the nuclear reactor – the pressure vessel and all pipes, pumps, coolant (water) reserves, are then encased in the third containment. The third containment is a hermetically (air tight) sealed, very thick bubble of the strongest steel. The third containment is designed, built and tested for one single purpose: To contain, indefinitely, a complete core meltdown. For that purpose, a large and thick concrete basin is cast under the pressure vessel (the second containment), which is filled with graphite, all inside the third containment. This is the so-called “core catcher”. If the core melts and the pressure vessel bursts (and eventually melts), it will catch the molten fuel and everything else. It is built in such a way that the nuclear fuel will be spread out, so it can cool down.
This third containment is then surrounded by the reactor building. The reactor building is an outer shell that is supposed to keep the weather out, but nothing in. (this is the part that was damaged in the explosion, but more to that later).
Fundamentals of nuclear reactions
The uranium fuel generates heat by nuclear fission. Big uranium atoms are split into smaller atoms. That generates heat plus neutrons (one of the particles that forms an atom). When the neutron hits another uranium atom, that splits, generating more neutrons and so on. That is called the nuclear chain reaction.
Now, just packing a lot of fuel rods next to each other would quickly lead to overheating and after about 45 minutes to a melting of the fuel rods. It is worth mentioning at this point that the nuclear fuel in a reactor can *never* cause a nuclear explosion the type of a nuclear bomb. Building a nuclear bomb is actually quite difficult (ask Iran). In Chernobyl, the explosion was caused by excessive pressure buildup, hydrogen explosion and rupture of all containments, propelling molten core material into the environment (a “dirty bomb”). Why that did not and will not happen in Japan, further below.
In order to control the nuclear chain reaction, the reactor operators use so-called “moderator rods”. The moderator rods absorb the neutrons and kill the chain reaction instantaneously. A nuclear reactor is built in such a way, that when operating normally, you take out all the moderator rods. The coolant water then takes away the heat (and converts it into steam and electricity) at the same rate as the core produces it. And you have a lot of leeway around the standard operating point of 250°C.
The challenge is that after inserting the rods and stopping the chain reaction, the core still keeps producing heat. The uranium “stopped” the chain reaction. But a number of intermediate radioactive elements are created by the uranium during its fission process, most notably Cesium and Iodine isotopes, i.e. radioactive versions of these elements that will eventually split up into smaller atoms and not be radioactive anymore. Those elements keep decaying and producing heat. Because they are not regenerated any longer from the uranium (the uranium stopped decaying after the moderator rods were put in), they get less and less, and so the core cools down over a matter of days, until those intermediate radioactive elements are used up.
This residual heat is causing the headaches right now.
So the first “type” of radioactive material is the uranium in the fuel rods, plus the intermediate radioactive elements that the uranium splits into, also inside the fuel rod (Cesium and Iodine).
There is a second type of radioactive material created, outside the fuel rods. The big main difference up front: Those radioactive materials have a very short half-life, that means that they decay very fast and split into non-radioactive materials. By fast I mean seconds. So if these radioactive materials are released into the environment, yes, radioactivity was released, but no, it is not dangerous, at all. Why? By the time you spelled “R-A-D-I-O-N-U-C-L-I-D-E”, they will be harmless, because they will have split up into non radioactive elements. Those radioactive elements are N-16, the radioactive isotope (or version) of nitrogen (air). The others are noble gases such as Xenon. But where do they come from? When the uranium splits, it generates a neutron (see above). Most of these neutrons will hit other uranium atoms and keep the nuclear chain reaction going. But some will leave the fuel rod and hit the water molecules, or the air that is in the water. Then, a non-radioactive element can “capture” the neutron. It becomes radioactive. As described above, it will quickly (seconds) get rid again of the neutron to return to its former beautiful self.
This second “type” of radiation is very important when we talk about the radioactivity being released into the environment later on.
I will try to summarize the main facts. The earthquake that hit Japan was 7 times more powerful than the worst earthquake the nuclear power plant was built for (the Richter scale works logarithmically; the difference between the 8.2 that the plants were built for and the 8.9 that happened is 7 times, not 0.7). So the first hooray for Japanese engineering, everything held up.
When the earthquake hit with 8.9, the nuclear reactors all went into automatic shutdown. Within seconds after the earthquake started, the moderator rods had been inserted into the core and nuclear chain reaction of the uranium stopped. Now, the cooling system has to carry away the residual heat. The residual heat load is about 3% of the heat load under normal operating conditions.
The earthquake destroyed the external power supply of the nuclear reactor. That is one of the most serious accidents for a nuclear power plant, and accordingly, a “plant black out” receives a lot of attention when designing backup systems. The power is needed to keep the coolant pumps working. Since the power plant had been shut down, it cannot produce any electricity by itself any more.
Things were going well for an hour. One set of multiple sets of emergency Diesel power generators kicked in and provided the electricity that was needed. Then the Tsunami came, much bigger than people had expected when building the power plant (see above, factor 7). The tsunami took out all multiple sets of backup Diesel generators.
When designing a nuclear power plant, engineers follow a philosophy called “Defense of Depth”. That means that you first build everything to withstand the worst catastrophe you can imagine, and then design the plant in such a way that it can still handle one system failure (that you thought could never happen) after the other. A tsunami taking out all backup power in one swift strike is such a scenario. The last line of defense is putting everything into the third containment (see above), that will keep everything, whatever the mess, moderator rods in our out, core molten or not, inside the reactor.
http://anond.hatelabo.jp/20110314030613
へ続く
A disk read error occurred
Press Ctrl+Alt+Del to restart
帰省中1ヶ月ほど放置し、久しぶりに電源を押すとエラーが出るようになったらしい。
変なソフトのインストールやBIOSのアップデート等はしていないとのこと。
当初はF8キーを押して[詳細ブートオプション]を開ければ、すぐに直せると思っていたけど、
ブートから進まないのだからF8キーを押しても同じエラーが出るだけ。
一応、F2キーでBIOS設定画面を開き、[Load Setup Defaults]を試すも症状変わらず。
また、VISTAにはXPの[回復コンソール]がなく、[システム回復オプション]という復旧手段が用意されている。
しかし、このマシンはプリインストール版なので、ディスクからの起動できない。
この場合はF8キーを押して[詳細ブートオプション]を開いて、そこから起動できるようだ。
その後、試行錯誤を繰り返した結果、再セットアップするしかないという結論に至った。
バックアップするにもWindowsが起動しないので、こんな時はいつもLinuxOS Knoppixに頼っている。
公式サイト(http://www.rcis.aist.go.jp/project/knoppix/)ではDVD版とCD版がiso形式で配布されており、DVDなりCDなりに焼けばOSをディスク起動できる優れもの。
さらにCD版をUSBにインストールしたUSB版も作成できるので、非常用に1つ作っておくと便利。
こちらのサイト(USB-Knoppixではじめよう http://yumenohako.jp/cgi-bin/knoppix/wiki.cgi)を参考に簡単に解説。
- 用意するもの
- 作成手順
- 前述したKNOPPIXの公式サイトからCD版のISO形式ファイルをダウンロード(現在はバージョン6.0.1)。
- 「DAEMON Tools」等の仮想ディスク作成ソフトでisoファイルをマウント。
- マウントしたディスクを開き、[KNOPPIX]フォルダを丸ごとUSB直下にコピー。
- さらに「\boot\isolinux」フォルダを開き、中のファイルを全てUSB直下にコピー。
- USB直下にコピーした[isolinux.cfg]というファイルの名前を[syslinux.cfg]に変更。
- こちらのサイト(http://www.kernel.org/pub/linux/utils/boot/syslinux/)から[syslinux.zip]をダウンロード(現在はsyslinux-4.02.zipが最新)。
- zipファイルを解凍して開き、「\win32\syslinux.exe」ファイルをCドライブ直下に移動。
- コマンドプロンプトを開き、[cd c:\]([]内のみ)と入力してEnterキーを押す。
- 次に[dir syslinux.exe]と入力してEnterキーを押す。
- さらに[syslinux.exe -ma USBドライブ名:](例:USBがEドライブなら[syslinux -ma E:]、間違ったドライブを指定すると指定先が壊れるので注意)と入力してEnterキーを押す。
- 完成!
- 使用方法
このマシンは前述の通りプリインストール版なのでインストールディスク(再セットアップディスク)が付属していない。
では、どうやって再セットアップするかというと、
しかし、今回はF11キーを押してもエラーが表示されるのみ。それにわざわざリカバリディスクを作成しているはずもなく手詰まり。
リカバリディスクはこちら(http://nx-media.ssnet.co.jp/)から購入できるけど価格は1万円。自作するしかない。
そもそも本来はリカバリディスクを作成できるのだから、HDD内のどこかにリカバリディスク用のデータが入っているはず。
そこで再びKNOPPIXを起動してみると、[NEC-RESTORE]という名前のリカバリ領域が隠しパーティションとして用意されていた。
こちらのサイト(LaVieレストア顛末記 http://deme.jp/wing/vol019/demeshin/NEC.htm)が大変参考になった。感謝。
- 用意するもの
- 作成手順
- 対象PCに接続されているUSBやLANケーブルなどはマウスとKNOPPIX以外全て外す。
- KNOPPIXで起動し、前述バックアップと同じ方法で[NEC-RESTORE]ドライブを開き、[RESTORE]フォルダを丸ごと外付けHDDにコピー(約10.3GB)。他のは不要。
- 「\RESTORE\TOOLS\IMG\winpe.iso」ファイルをISOイメージでCDに書き込む(Disk1)。
- 「\RESTORE\TOOLS」フォルダを丸ごとCDに書き込む(Disk2)。
- 「\RESTORE\BKVSTIMG.GHO」ファイルをCDに書き込む(Disk3)。
- 「\RESTORE\BKVST0**.GHS」ファイルが001から018まで18個あるので、まずは「BKVST001.GHS」から「BKVST007.GHS」まで約3.75GBをDVDに書き込む(Disk4)。
- 「BKVST008.GHS」から「BKVST014.GHS」まで約3.75GBをDVDに書き込む(Disk5)。
- 「BKVST015.GHS」から「BKVST018.GHS」まで約1.93GBをDVDに書き込む(Disk6)。
- 完成!
- 使用方法
- 対象PCの電源をつけ、Disk1を挿入。そして、電源ボタンを長押しして強制終了。
- 再度、電源をつけ、すぐにF2キーを連打してBIOS設定画面を開き、[Boot]タブから[1st Boot Device]を[CD-ROM]に変更して設定を保存。
- しばらくすると[Window Vista 再セットアップ]が起動するので、[再セットアップ]を選択(他のものを選択しても途中でエラーが出た)。
- その後[Cドライブのみの再セットアップ]など3項目が表示されたので、自分は[ハードディスクを購入時の状態に戻して再セットアップ]を選択。
- あとは「ディスク2を入れてください」等の指示に従って、Diskを入れ替えていけば、そのうちWindowsのセットアップ画面になる。
以上の作業によりHDDが故障していない限りはリカバリディスクを作成して再セットアップ可能。
ただし、当初のエラーの原因がHDDにある可能性もあるので、HDDを交換してからリカバリディスクを使用した方がいいかもしれない。
今後はCrystalDiskInfoなどのソフトを使用してHDD監視をするつもり。
再セットアップが進むと、シマンテック社の「Norton Ghost」というバックアップツールが起動し、1%2%3%...と作業が進行する。
最初にやった時は、50%ほど作業が完了したところでこんなエラーが出現。
Cannot open GHOSTERR.TXT - insert diskette (434)
File Name ? (546)
Output error file to the following location
[OK] [Cancel]
おそらくGHOSTERR.TXTというファイルの出力先が見つからないのだろうとあたりを付けて、
フォーマット済みCD-RWを挿入後、A:をCDドライブのF:に書き換えてOKを押すと
Application Error 19235
Ghost has detected corruption in the image file.
Please perform an integrity check on the image.
if this program persists, please contact Symantec support center
このイメージファイルとは、前述リカバリディスク作成手順6以降の[拡張子GHSのファイル]。GHSはGHOSTの略か?
そこで、Disk4,5,6をNERO9体験版+太陽誘電製のTHE日本製のDVD-Rを使用し、
念のためディスク1枚あたり4GBを超えないようにし、4倍速で焼き直してみたところ、今度は正常に再セットアップが完了。
最初はWindowsに標準装備されている[ディスクへの書き込み]+台湾製の安物DVD-Rを使用したのだが、
これを教訓に次からは絶対にライティングソフトと国産ディスクを使うことにしよう。
CrystalDiskInfoを使用してHDDの状態を調べたところ、案の定「注意」レベルだった。
注意項目 | 生の値 |
---|---|
代替処理保留中のセクタ数 | B(11) |
回復不可能セクタ数 | 25(37) |
※[生の値]の数値はデフォルトが16進数表記。括弧内は10進数に変換した数値。
やっぱり当初のエラーはHDDの故障とまではいかなくとも寿命が近いということだったのか。
使用時間は17000時間。HDDの交換を検討した方が良いけど、一体型の交換は難しいような。
まずはWestern Digital製HDDだからData Lifeguard Diagnosticsでゼロフィルをやってみる予定。
エラーチェックで完全に逝くかもしれないけど、バックアップもしてるし、リカバリディスクもあるし。
あと、VistaのバーションはSP1だと思っていたけど、まだ更新していなかった模様。
そこで更新プログラムをインストールしてみると途中で止まってしまい、修復スタートアップする羽目に。
Vista SP1の導入に失敗し、修復スタートアップを行ったものの、12時間経っても終わらず。
そこでいっそのことHDDのデータを完全に消去して、再セットアップすることにした(7時間ほどかかる)。
方法としては先日のとおり、Western Digital製HDDの診断ツール「Data Lifeguard Diagnostics」を使用する。
このツールはFDD版とCD版しかないので、いつものようにUSB版の作成を試みる。以下作り方と使用方法。
- 用意するもの
- 作成手順
- こちら(http://files.extremeoverclocking.com/file.php?f=196)から[Windows 98 System Files]をダウンロード後、解凍しておく。
- こちら(http://files.extremeoverclocking.com/file.php?f=197)から[HP USB Disk Storage Format Tool-v2.1.8]をダウンロード後、インストール。
- [HP USB Disk Storage Format Tool]を起動し、[Device]で用意したUSBを選択。[Create a DOS startup disk]にチェックを付け、[using DOS system files located at:]のところで、先ほど解凍したフォルダ(ファイル名はwin98boot)を指定する。
- こちら(http://support.wdc.com/product/download.asp?groupid=608&sid=30&lang=jp)から[Data Lifeguard Diagnostic for DOS (CD)]のiso形式をダウンロード。
- USB内に[DLGDIAG]という名前のフォルダを作成。
- ダウンロードしたisoファイルを仮想ディスク作成ソフトでマウント。
- マウント起動したディスク内の[DLGDIAG5.EXE][DLGDIAG.txt][DLGLICE.TXT]をUSB内の[DLGDIAG]フォルダにコピー。
- 完成!
- 使用方法
- PCにUSBを挿して、起動直後にF2を連打。BIOS設定画面から[boot]→[Hard Disk Boot Priority]を選択し、USB-HDDを一番上にして設定保存。
- DOSが起動するので、[cd dlgdiag]と入力してEnter。その後、[dlgdiag5]と入力してEnter。
- [Data Lifeguard Diagnostic]が起動するので、ライセンス画面でESCキーを押す。そして承諾。
- メイン画面が開いたら、[Extended Test]を選択して、まずはHDDのチェック(結果は余裕のFail)。所要時間は容量500GBで1時間40分。
- 続いて[Write Zeros To Drive]を選択して、HDD内の全データを削除(0で埋める)。これは2時間。
- もう一度[Extended Test]を実行(1時間40分)。この時点でNO ERRORS FOUND(エラーなし)。
- BIOS設定画面を開き、デフォルト設定をロードして、あとは前述どおりに再セットアップ(1時間30分)。
再セットアップ後、CrystalDiskInfoを実行すると見事に「正常」レベルに回復。
前回注意項目だった「代替処理保留中のセクタ」と「回復不可能セクタ数」の生の値は0に変化。
なぜか使用時間が14000時間に減少していたものの、とりあえずはHDDの故障の心配はしなくていいかな。
ちなみにSP1の導入は成功。今後はCrystalDiskInfoを常駐させ、監視を続けることにする。
あれから10か月後、悪夢のブルースクリーンが降臨したので、またクリーンインストールを行った。
CrystalDiskInfoを使用してHDDの状態を調べたところ、「注意」レベルに逆戻り。
注意項目 | 生の値 |
---|---|
代替処理保留中のセクタ数 | 2D9(729) |
回復不可能セクタ数 | 70(112) |
※[生の値]の数値はデフォルトが16進数表記。括弧内は10進数に変換した数値。
以前のエラー時よりさらに状況が悪化しており、HDDの寿命がかなり迫っている模様。
いつ突然死を迎えてもおかしくないので、重要なデータをバックアップのうえHDDの交換を予定。
ブログがないので、増田にログ残し。ツッコミや質問はid:frsattiまで。
Twitter の OAuth 許可ページがあまりにも酷い => 応急処置 - リタマス
これのGreasemonkey スクリプトが危険だったので修正したよ!
このスクリプトは、本文中にupdate(または更新)が入っている時に警告を出すようになっていたんだけど、これだとチェック漏れのバグがあるとwrite権限を要求しているのに警告が出ないのでread onlyのように見えてしまう
人間が本文読めばわかるから大丈夫だろと思うかもしれないけど、このスクリプト使い続けていたら警告が出ない=read onlyだと判断して本文読まなくなるはず
read onlyの時にも色を変えて警告を出すようにした(writeなら赤、read onlyなら黄)
これで警告表示の色を見れば赤ならwrite黄ならread onlyだとすぐにわかるし、警告がでなかったらなんかおかしいとすぐに気づくはずだ
危険なものと安全なものが混ざってる中から危険なものを選り分けても安心はできないけど、安全なものを選り分けたんなら安心できるよね!(これなんか専門用語ありそうだけど僕は知らない
最初のスクリプトだと https://twitter.com/oauth/authorize?* と https://twitter.com/oauth/authenticate?* で動くようになってたけど、
twitterのOAuthの認証ページは他にもhttpsのかわりにhttpを使ったものとか、twitter.comのかわりにapi.twitter.comとかがあるから、それらのページでは警告が出なかった
It`s actually the first time I have written to Japanese pases.
My old brother who have been in Japan for long time introduced here to me.He said that I can write my diary right?
Anyway,I`m gonna write about my short trip for Japan.
I myself was wishing to going to Japan because my ex-girlfriend was Japanese and she always told me about "fantastic Japan".In fact in Japan I could have many fantastic experience,very polite servise in even McDonald,an a train that`s time is accurate,so fashinable people,and brabrabra.
However, the reason why I write here about my trip is not to just praise abou Japan.I wanna say something to you gays.Why do you be so surprise when we "foreigner" use chopsticks well? why do you gays be happy when we speak easy Japanese just like "KONNICHIWA"?
Why you call me American before you ask me where my birthplace?
I and some foreigner who come to Japan study about Japan and Japanese because for Love ,but many Japanese think that we do not know about Japan at all.
So please realise that we are not Idiot.We try to understand Japanese culture,Japanese custom,Japanese language.Please just treat us as your friend.
Yesterday I am going to leave here.I could have a lot of special experience.I became much like here than before.But I couldn`t make any friend.
Next time,I wanna make some friend here so please not to treat a foreigher as a foreigher.
Japanese Yakiniku is the most delicious food for my life so far.
はてな記法とか無視で読みにくいですがゴメンナサイ。
かいたひと→http://twitter.com/chobi_e
follow/unfollowはご自由にどうぞ。
うん、次なんか書くまでにはブログ用意しておこう。
===============
会社としてもOpenSocialに関わってるし、個人でもちょいちょい
勉強がてらに手を出しているので参加させていただきました。
会場を提供してくださったコンテンツワンさんありがとうございました。
http://www.contents-one.co.jp/
ほいではメモの公開。
聞き逃しや誤記もあるかと思うので参照はほどほどに。
=============================
mixi機能の紹介とOpenSocialAPIリファレンス的な説明。
あとは公開するのは微妙なので割愛。
PHPでWEB開発を行うようにしてオープンソーシャルアプリを作る(@KuniTsuji)
=======================================================================
CodeIgniterを使ってのmixiアプリ構築についてのお話。
OpenSocial開発しているので全て既知の情報だったので
メモがありません。ゴメンナサイ。
要約するとPCはつくるのめんどいけどモバイルだとぺらいちで済むし、
運用した気になるモバイルオープンソーシャル (@cocoitiban)
=========================================================
ウノウさんは社員募集中、@cocoitibanは彼女募集中!
@cocoitibanのお仕事
映画生活(ピアに売却)、フォト増、clipp、まちつく
・まちつくについて
位置ゲー、もともとふつうのモバイルアプリとして提供していた。(ユーザー数非公開)
・リリース前
・社長がやりたい→同僚がすごい勢いで作成。@cocoitibanは横で傍観
(モバイルOpenSocialって元のサービスがあれば結構勢いですぐ作れるんですよね。)
・ロードアベレージ1000でも登録できるんだー
そして、当然のように他社を含め登録ができなくなるw
・初日から1週間は1日10万のペースで増えた
・mixiに登録しているユーザーだからまちつくに登録という意識は低いっぽいですが
・ウノウには3時間で画像生成をキュー処理に書き換えたやつがいる
・ボトルネックになりそうなものを全部退治
・ハードウェア確実に足りないので購入進める
・二日目、三日目と同じように+10万人ってトラフィックをさばかなきゃいけない
・リリースから今まで
・初期(パフォーマンスアップ)
・回線が足りなくなりつつあることに気がつく100Mなのに・・・
・決めてから1週間くらいでリリース
・Memcached適用範囲を増やす
・一部機能を企画レベルで見直しふかがひくなるかつ、よりよい動作へ。
・初期パフォーマンスアップ
・L7ロードバランサふやす
・DBマスタ分割
クエリはチューニングされていてCPUやDisk ioのreadはすかすかだけどWriteが痛い事に
・ORMの機能をつかって分割
・トランザクション上影響ないものを分割
・サーバー台数的にはそんなにない。
・中期
・ちょっとだけいいサーバーに置き換え
→あっさり解決
・本格的な機能改善
ユーザーに不便かけてる機能とかを大幅見直し
・社員数増員
・8Fに追加して4Fに事務所を移すことに
・引っ越し大変でした
・可能な限り早くしたかったがユーザーに不便をかけている段階ではリリースできなかった。
・中期
・一部処理をQ4Mに置き換え
・EC2とはおわかれできた
・EC2は悪くないがサーバーがある現状ではコスト間と運用の体制のにゃー(メモ終わる前に次のページへ)
・まとめると
・数ヶ月、数人のエンジニアでおこなわれたので長短納期
・力業だが安定志向を目指す方がいい
・変わったことやると大体トラブって死ぬ
・しかし新しい事やらないと間に合わない
[そのほかメモ]
・Q4M
・Gearman
・ActiveMQ
・自前で実装
・そのほかいいのがあれば
・キュー処理っているの?
・実装クイズ
・Friends1000人いて全員取りに行く場合どうする?
・キャッシュとして定期的に削除しなきゃだめ
・いや1000人とってきちゃおうよ
・トラフィックの波が激しい
・流入云々でかなり違う
・分散のネックはやはりデータベース
・ORMは使うべき
・流行るか流行らないか分からないサービスをつくる場合には必要
・はやった場合にすぐ分割できるか
・トランザクションがネックになる
・XAトランザクション
・トランザクションを正しく処理できるか
・KVSとの透過性
・逆をいえば上記はコードを綺麗にかけるかどうかなので使わなくてもいいと思う
・エンジニアとして思ったこと
・EC2はありだけど運用がイントラで運用するのとは違う形になるので経験が必要だと感じた。
・AmazoRDSが別の地域で使えるようになるといいなぁ。
・どきどきするのが課金。コストをいやいやでもエンジニアが意識せざるを得なくなる
・かなりはやい
・半年1年後、国内レベルのトラフィックであれば大半のWEBサービスは1台でおk
・ip_conntrack/iptable
・ulimit
・Symfony使ったけどそんなボトルネックにならなかった的な話。
・バッチ処理とかforkで悩むことが多い
# 総評
最近はめっきり大きなトラフィックを扱うことがなかったからちょっと刺激もらえました。
前の会社ではサーバー200台くらい管理してたけど今の会社では数十台程度だし、
そこまでトラフィックもこないのでサーバーエンジニアとしては体たらく気味。
まぁ、業務的には様々な方面でやっているので仕方のない事ですが。
とりあえず現状で出しておいて流行したら確実に死ぬ&寝れなくなるので事前に
震える子鹿のようにただビールをひたすら飲むのでありました。
そんな私に声かけてくださった皆様、ありがとうございます。
お名前/ID出していいのか微妙なので割愛させていただきますが、感謝感動雨あられでございます。
そうそう、個人的には今の流行がTwigなので@cocoitibanともうちょっと
お話したかったですが懇親会LTもありーの、飲み過ぎて気持ちわりーので実現せず。
Twigすごく良いとは思うんだけどいまいちドキュメントが少ないので
本当にこれでいいんか?て思うことが結構あるのよねー。
Node周りの実装がぱっと見分かりづらいので難儀。
そいじゃ会社いってきまー
これで40分。
タイムアタックってことでアルゴリズムは全幅探索で書き上げました。
エラーチェック皆無。
A*ならもう5分ほど延びるかな?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace Maze { class Program { // 探索用地図 static int[,] maze; // 始点終点 static Position Start = new Position(0, 0), Goal = new Position(0, 0); static void Main(string[] args) { //////////////////////////// まずは各行のリストとして読み込み string[] inMaze; using (var fp = new FileStream(args[0], FileMode.Open, FileAccess.Read)) using (var iStream = new StreamReader(fp)) inMaze = iStream.ReadToEnd().Split('\n'); // 迷路幅 int height = inMaze.Length; // 迷路高さ int width = inMaze[0].Length; /////////////////////////// 読み込んだ迷路を作業用地図に展開 maze = new int[width, height]; for (int y = 0; y < height; ++y) { string line = inMaze[y]; for (int x = 0; x < line.Length; ++x) { maze[x, y] = line[x] == '*' ? -1 : 0; if (line[x] == 'S') Start = new Position(x, y); if (line[x] == 'G') Goal = new Position(x, y); } } // 探索実行 int dist = Search(maze, Start); // 探索結果から最短経路を再現 Position backTracer = Goal; while (dist>1){ --dist; backTracer = backTracer.Nearbys.First(pos => maze[pos.X,pos.Y] == dist); maze[backTracer.X, backTracer.Y] = -2; } //////////////////// 最短経路こみのアスキー地図に変換 char[,] outMaze = new char[width, height]; for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) { outMaze[x, y] = maze[x, y] == -2 ? '$' : maze[x, y] == -1 ? '*' : ' '; } } outMaze[Start.X, Start.Y] = 'S'; outMaze[Goal.X, Goal.Y] = 'G'; ////////////////////// 結果は標準出力に。 for (int y = 0; y < height; ++y) { for (int x = 0; x < width; ++x) Console.Write(outMaze[x, y]); Console.WriteLine(); } Console.ReadLine(); } /// <summary> /// 探索する。SG間の道のりを返す(道のり=SGが隣接しているなら1) /// </summary> private static int Search(int[,] maze, Position Start) { List<Position> FrontLine = new List<Position>(); FrontLine.Add(Start); int dist = 1; for (; ; ) { List<Position> NextFrontLine = new List<Position>(); foreach (var pos in FrontLine) { foreach (var nextPos in pos.Nearbys) { if (nextPos == Goal) return dist; if (maze[nextPos.X, nextPos.Y] == 0) { maze[nextPos.X, nextPos.Y] = dist; NextFrontLine.Add(nextPos); } } } FrontLine = NextFrontLine; ++dist; } } } struct Position { public readonly int X, Y; public Position(int x, int y) { X = x; Y = y; } public IEnumerable<Position> Nearbys { get { return new[]{ new Position(X-1,Y), new Position(X,Y-1), new Position(X+1,Y), new Position(X,Y+1), }; } } public static bool operator==(Position p1, Position p2){ return p1.X == p2.X && p1.Y == p2.Y; } public static bool operator!=(Position p1, Position p2){ return p1.X != p2.X || p1.Y != p2.Y; } } }
外国語を学習する理由、動機を高める学習法という考え方でまとめてみる
(語学学習サイト個人的リンクメモ / Lists of Language Learning Links)
(For Beginners)
(For Windows)
(For Mac)
(In case you are using shared computer)
(Information)