CodeZine編集部では、現場で活躍するデベロッパーをスターにするためのカンファレンス「Developers Summit」や、エンジニアの生きざまをブーストするためのイベント「Developers Boost」など、さまざまなカンファレンスを企画・運営しています。
シングルマスタの非同期レプリケーション機能では、マスタサーバーが1台に限定され、マスタからスレーブへの複製は非同期で行なわれるため遅延が生じ、短時間のスケールで見ると全スレーブとの同期が保証されない。しかし、その反面スレーブの台数を増加させていってもマスタサーバーの更新負荷は大きくならず、スケーラビリティを維持できるという利点がある。DeNAによる運用実績でも、マスタとスレーブ間の遅延は通常数秒程度以内に収まる。 このレプリケーションを利用する場合、アプリケーション側ではデータ更新時にはマスタサーバーへ接続し、データ参照のみを行なう場合はスレーブサーバーへ接続するように作成する必要がある。 Webや携帯電話向けサービスの場合、小さな規模で始めてユーザー規模、データ規模、ページビュー数を徐々に増加させていくことが多い。小さな規模のためDBの負荷分散が不要な場合でも、マスタサーバー1台、スレー
はじめに JavaScriptはオブジェクト指向言語です。しかし、そのオブジェクトの性質は、他に良く知られているオブジェクト指向言語のJavaやC++と大きく異なっています。 そこでこの記事では、なぜそのような違いがあるのか、JavaScriptにおけるオブジェクト指向の言語思想を見ていくと共に、その違いの根幹であるプロトタイプについて解説していきたいと思います。 なお、この記事はJavaScriptの解説ですが、その内容は、標準仕様のECMAScriptで扱われる範囲に基づいています。従って、同じくECMAScriptを元にしている言語(JScript、ActionScript)でも通じる内容になっています。 対象読者 プログラミングの基本的な知識、ならびにオブジェクトやメソッドと言った基礎的な概念については、ここでは解説しません。最低限、オブジェクト指向プログラミングについて
はじめに こんにちわ、hirataraです。 本稿では、オブジェクト指向のスクリプト言語であるPythonの紹介をしたいと思います。と言っても、実は私がPythonを勉強し始めたのは数ヶ月前のことで、まだPythonに関してさほど詳しいとは言えません。それでもこの記事を書こうと思い立ったのは、ある言語が他の言語に比べて面白い部分と言うのは、その言語にどっぷり漬かってその言語を使うことが当たり前になっている人間よりも、その言語を好きになり始めたくらいの人間の方が見つけやすいのではないかという思いからです。 そのような事情で、もしかすると本当のPythonistaからお叱りを受けるような内容も含まれるかもしれませんが、その点はTBやコメントでご教授頂けると幸いです。この記事で、少しでもPythonに興味を持ってくれる方が増えることを願っています。対象読者他言語でのプログラミング経験者Pytho
CodeZineについて プログラミングに役立つソースコードと解説記事が満載な開発者のための実装系Webマガジンです。 All contents copyright © 2006-2008 Shoeisha Co., Ltd. All rights reserved. ver.1.5 掲載記事、写真、イラストの無断転載を禁じます。 記載されているロゴ、システム名、製品名は各社及び商標権者の登録商標あるいは商標です。
はじめに Flashファイル(SWFファイル)を作るにはMacromedia Flashを使わないといけないと思われていますが、Flashファイルの仕様はAdobeのWEBサイトで公開されています。そして、フリーのFlashコンパイラMTASC(Motion-Twin ActionScript2 Compiler)もあります。MTASCを使えばFlashのスクリプトActionScript2を記述することで、Flashファイルを生成することができます。 しかも、MTASCはコマンドラインから利用することができるので、Flashの煩雑なGUIを利用せず、使い慣れたエディタを利用してプログラムを作ることができます。プログラマーにとっては非常に使いやすく感じることでしょう。 逆に言えば、デザイナーの人にとっては、扱いにくいものに感じられると思います。Flashは、主にWEBアニメーションやページ
はじめに OpenIDは最近非常に注目が高まっている認証技術の一つです。ここでは、OpenIDを利用したPerlのサンプルを通じてOpenIDのメカニズムに触れていきたいと思います。必要な環境 Perl 5.8以上が動作する環境が良いと思います。基本動作の確認はMac OS Xを利用しましたサンプルの紹介 早速サンプルコードの「openid-test.cgi」を見ることにしましょう。このサンプルはOpenIDを利用した簡易ログインページです。 #!/usr/bin/perl use strict; use warnings; use CGI; use Net::OpenID::Consumer; #use LWPx::ParanoidAgent; use LWP::UserAgent; my $query = CGI->new; $query->charset('utf-8
はじめに 大規模なデータを扱うアプリケーションでは、速度とともに作業領域量も大きな問題となります。作業領域がメインメモリに収まらない場合、スワッピングが発生し、大幅な速度低下につながります。そのため近年、データ構造は高速なだけでなく、作業領域量が小さいことも求められています。今回紹介するのは2003年に提案されたデータ構造、wavelet tree(以下「WT」と表記)です。WTは圧縮索引やSuccinct Data Structureなど、データをコンパクトに表現する際に重要なデータ構造です。WTは文字列T[0...n-1]が与えられた時、次の2つの操作を定数時間でサポートします。rank(p, c)――T[0...p]中のcの出現回数を返すselect(i, c)――(i+1)番目のcの位置を返す WTの作業領域量は、文字列をそのまま保存した時の約2倍程度です。対象読者 C++の利用
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く