mondでこの質問への回答を読んでみましょう
はじめに 最近プログラマーとしてのキャリアに一区切りつけようと思っており、これまでのプログラミングの勉強の集大成となるブログを書きたくなったので書く。初めてプログラミングをして、フロントエンド開発をして、サーバーから値が返ってきたときは「どういう仕組みで値が返ってきたんだ?」と疑問に思っていた。ずっと理解したくて理解できていなかった。だからずっと勉強していた。そして最近になってようやく自分の言葉で説明できるようになった気がしたのでブログを書きたい。 2015 年版が自分の原点であり、この記事を書くモチベーションになった このような記事は実は過去に存在している。 FYI: https://blog.yuuk.io/entry/2015-webserver-architecture その記事はサーバーがどういう仕組みで動いていて、どのように進化し、2015 年に至るかを解説してくれた記事だ。自
回答 (7件中の1件目) 通信するデータ量が増えれば増えるだけ、遠距離間における反応は遅くなることは感覚的に理解できるのではないかと思います。 そういう意味で、反射速度を上げてゲームむを滑らかに遂行させるためには、なるべく通信するデータは少ないのがベストです。 なので、単位時間当たりのプレーヤーの位置、入力コマンド、標的の座標といった、操作に関わるデータを何かしらのデータ圧縮を用いて通信し、そのうえで遠隔地にいるプレーヤー同士の対戦を実現しているのだと思います。 その時に、なるべくデータを小さくするためにある程度の操作などをテーブルにまとめておいたのを用意し、一回のデータで複数のコ...
新しいAPIが作られるたびに、私たちは、古いAPIを置き換えるだけで高速化という夢をみます。何度夢破れても、高速なAPIが追加されたと聞けば、試さずにはいられませんよね! 今回は、Linuxカーネル5.1で追加されたio_uringを使って、Rustのasyncランタイムを実装し、gRPCサーバのベンチマークを実行してみました。 io_uringとはio_uringは、ファイルシステムとネットワークの非同期I/Oのために開発されました。同期よりも非同期のほうがおしゃれ、そういう雰囲気ありますよね!クラウドネイティブも、非同期にAPIを介して、なんかやってるやつですよね。 io_uringのインターフェイスは、高い性能を目指し、1)アプリケーションとカーネル間でのメモリコピーを避ける、2)複数のI/O要求を一度にカーネルに伝えることができる、という工夫がされています。 下図のように、アプリケ
In this course, you will learn how to work with the UDP and TCP internet protocols in real-world scenarios. You will apply your skills to build small, fun networking applications in Rust — right in your browser! No previous knowledge of network programming is required, but we assume that you are familiar with Rust syntax. If you’re not, that's fine too! You can read The Rust Book and learn by prac
特別講座 ネットワークプログラミング ( FWをつくろう ) ファイアウォール(FW)とは,「ある特定のコンピュータネットワークとその外部との通信を制御し、内部のコンピュータネットワークの安全を維持することを目的としたソフトウェア」である. つまり,特定のパケットを破棄(または通過)させる制御を行うソフトウェアである. 特定のパケットとは, 特定ポートにアクセスするパケット 特定のIPアドレスからのパケット 特定の内容(パターン)をもつパケット などがある. 今回は,以下の図のような構成のネットワークにFWを設置する環境を想定する. 今回のFWはルータの機能はなく,あくまでPCとルータ間のパケットを監視し,不要なデータを遮断する機能を持つ. FWソフトウェアを作成するには, パケットの中身を見る パケットの転送の可否を行う 2つのプログラミングが必要になる. ここでは,上記の2つのプログラ
■ はじめに coLinux や OpenVPN を使ったことのある方なら仮想ネットワークアダプタ「TAP-Win32」の名前をご存知でしょう。 TAP-Win32は CIPE-Win32 というプロジェクトによる GPL のオープンソースソフトウェアで、実体は Windows のカーネルモード下で動作するネットワークドライバです。 TAP は本物のネットワークデバイスのように振る舞うので、これを使って Windows 上に独立した仮想ネットワーク環境を設置することが可能です。 TAP-Win32 を自作コードから利用するための開発者向けの情報は現時点ではあまり多くありませんが、面白そうなので扱い方を調べてみました。 データリンク層以降の生のパケットデータをユーザモードのプログラムから直接操作できるためアイディア次第で応用がききそうです。 今回は手始めに TAP デバイスからデータを読み出
SO_LINGER の秒数を 0 にしてソケットを閉じればいい。Perl で書くなら以下のような感じ。 setsockopt($sock, SOL_SOCKET, SO_LINGER, pack("II", 1, 0)) or die $!; $sock->close() 一方で RST によって切断 (=異常切断された) かどうかはソケットからの読み込みが ECONNRESET エラーを返すかどうかで判断できる(正常切断なら 0 (==EOF) が返る)。
Support & Info Bug Tracking: Bugs & Features Mailing List: Info Git Repository: github (sourceforge - deprecated) License: 3-clause BSD IRC: #libevent on OFTC Happy Hacking You can make Libevent developers happy by reducing our wishlists! Nick's list – Niels's list The libevent API provides a mechanism to execute a callback function when a specific event occurs on a file descriptor or after a time
プロトコル バッファについて プロトコル バッファは、言語やプラットフォームに依存しないで、構造化データをシリアライズする Google の拡張可能なメカニズムです。XML に似ていますが、XML よりコンパクトで、高速で、シンプルです。データをどのように構造化するかを一度定義すると、特別に生成されたソース コードを使用して、構造化データをさまざまなデータ ストリームに対して容易に読み書きすることができ、さまざまな言語 (Java、C++、Python) を使用できます。 ダウンロード ページから、プロトコル バッファ コンパイラのソース コード全体、生成するコードに必要なすべてのクラスのほか、ビルドとインストールの説明が提供されます。
分散KVS kumofs のコードは、全体で約2万行です*1。 そのうち、ネットワークI/Oやプロトコルに関するコードは約1万行*2で、全体の約半分を占めています。 ロジックは残りの半分*3だけで実装されています。 この実例から分かりますが、kumofsのような分散アプリケーションを開発するにはI/O周りの実装が大変で、とてつもなく大きな障壁になっています。*4 さらに今日では、性能を稼ぐためにマルチスレッド化が必須です。また、多数のクライアントを少ないリソースで効率よく相手にするには、非同期・イベント駆動型のアーキテクチャも必要になります。さらに、究極的な性能を達成すべく GC を利用しない C++ においては、実装のみならず設計も大変です。 これに加えてソケットAPIの難解な挙動に対処にしなければならないため、C言語やC++によるネットワークプログラミングは、vimの使いこなしなどと同
更新履歴 DNS拡張EDNS0の解析 Linuxカーネルをハッキングしてみよう Windowsシステムプログラミング Part 3 64ビット環境でのリバースエンジニアリング Windowsシステムプログラミング Part2 Windowsシステムプログラミング Part1 Contents インフォメーション 「TCP/IPの教科書」サポートページ 「アセンブリ言語の教科書」サポートページ 「ハッカー・プログラミング大全 攻撃編」サポートページ ブログ(はてな) BBS メール このサイトについて テキスト 暗号 詳解 RSA暗号化アルゴリズム 詳解 DES暗号化アルゴリズム crypt() アルゴリズム解析 MD5 メッセージダイジェストアルゴリズム crypt() アルゴリズム解析 (MD5バージョン) TCP/IP IP TCP UDP Header Format(IPv4) Ch
今回は、Webサイトやサービスをメンテナンス中にする場合に、どのURLにアクセスしても「メインテナンス中です」の画面を出す正しいやり方を、人間にも検索エンジンにも適切にする作法を主眼に解説します。 この週末の土曜深夜~日曜早朝にかけて、データセンターの設備メインテナンスのため、Web担を含むインプレスグループのほとんどのWebサイトが、どのURLにアクセスしても「メンテ中です」という表示になっていました。 なのですが、その実装がちょっと気になったので、「正しいメンテナンス画面の出し方」を説明してみます。 ※2010-01-16 Retry-Afterを指定するHeaderの指定を修正しました(コメント参照) ※2009-06-17 RewriteCondから [NC] 条件を削除しました(コメント参照) ※2009-06-16 Retry-Afterの記述をGMTに変更しました(コメント参
はじめまして!08年度新卒エンジニアの「きょろ」こと井上恭輔と申します。ミクシィではコミュニケーション開発チームというところで、mixi上の色々なコミュニケーションサービスの開発を担当しています。 就職で東京に出てきて早10ヶ月、最初は周囲の歩く速度に付いて行けなくて悩んでいましたが、今では新宿駅を迷わず歩けるまでに成長しました。本日は慣れたついでに、そろろそエンジニアブログにも仲間入りしたいなと思いましたので、記事の初投稿に挑戦してみようと思います。 曰く「ハードボイルドな技術ネタ」の多い当ブログですが、今回は頭を使わずに読める、文字通り「コーヒーブレイク」的な記事をお届けできればと思います。駄文ではありますが、お付き合い頂ければ幸いです。 エンジニアのガソリン「コーヒー」 みなさんコーヒーはお好きですか?私はコーヒーが大好きで、1日にかなりの量のカフェインを摂取します。朝はブラックコー
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く