Elixir(Erlang)の並列処理の威力を確かめるため、「テストサーバに外部からアクセスできないことを確認する」スクリプトを Elixir で書いてみました。 PythonやRubyなどで普通に直列で実行している場合、途中でつまるサイトがあると、タイムアウトまでそこで止まってしまいます。そういうサイトが複数あった場合にはそりゃもう大変です。並列実行することにより、変なサイトがあっても上限は最悪タイムアウトまでで済むため、精神衛生上とても良いです。しかも Elixir ならとっても簡単に書けます。 ソースコード一式は GitHub に置いてあります。 実行ファイルの作成手順 mix でプロジェクトのガワを作成 mix.exs を編集して依存ファイルをダウンロード Elixirのソースコードを書く コンパイル 実行 mix の設定 mix.exs の生成と編集