couch_db:update_doc/4 前回はHTTP経由でドキュメントを更新する流れを見てきました。今回は更新まわりのより深いところを見ていこうと思います。前回の流れからcouch_db:update_doc/4を見ていきます。 couch_db.erl: 1update_doc(Db, Doc, Options, UpdateType) -> 2 case update_docs(Db, [Doc], Options, UpdateType) of 3 {ok, [{ok, NewRev}]} -> 4 {ok, NewRev}; 5 {ok, [{{_Id, _Rev}, Error}]} -> 6 throw(Error); 7 {ok, [Error]} -> 8 throw(Error); 9 {ok, []} -> 10 % replication success 11
couch_db_updater:refresh_validate_doc_funs/1 今回はcouch_db_updater:init/1から呼び出している関数の中でまだ見ていないrefresh_validate_doc_funs/1を読んで行きます。 couch_db_updater.erl: 1refresh_validate_doc_funs(Db0) -> 2 Db = Db0#db{user_ctx = #user_ctx{roles=[<<"_admin">>]}}, 3 DesignDocs = couch_db:get_design_docs(Db), 4 ProcessDocFuns = lists:flatmap( 5 fun(DesignDocInfo) -> 6 {ok, DesignDoc} = couch_db:open_doc_int( 7 Db, Des
couch_db_updater:init_db/6の以下の部分を掘り下げてみたいと思います。 couch_db_updater.erl: 1 {ok, IdBtree} = couch_btree:open(Header#db_header.fulldocinfo_by_id_btree_state, Fd, 2 [{split, fun(X) -> btree_by_id_split(X) end}, 3 {join, fun(X,Y) -> btree_by_id_join(X,Y) end}, 4 {reduce, fun(X,Y) -> btree_by_id_reduce(X,Y) end}, 5 {compression, Compression}]), 6 {ok, SeqBtree} = couch_btree:open(Header#db_header.docinfo_
couch_db_updater:init/1 前回はヘッダ部を読み込むコードを読んだので、今回はDBの読み込み準備?のところを読んでみます。couch_db_updater:init/1からinit_db/6を呼び出す手前のところから。 couch_db_updater.erl: 1init({MainPid, DbName, Filepath, Fd, Options}) -> 2(..sinp...) 3 ReaderFd = open_reader_fd(Filepath, Options), 4 Db = init_db(DbName, Filepath, Fd, ReaderFd, Header, Options), 5 Db2 = refresh_validate_doc_funs(Db), 6 {ok, Db2#db{main_pid = MainPid}}. ヘッダ読み込
Why CouchDB? 数年前にCouchDBのデータフォーマットについて解説しているページを読みました。CouchDBの内部ではデータをB+treeで保持しており、且つデータはappend onlyでMVCCである、という部分が面白くて、その時からCouchDBに興味がありました。しかしコードがErlangで書かれており、当時の私にはCouchDBのコードを読むことができませんでした。 1年ほど前からErlangのコードにちょっとずつ触れるようになり、CouchDBのコードも時間をかければ読めるような気がするので、気が向いた時にちょっとずつ読んでいこうと思います。 本当はある程度読んでまとめてからアウトプットしようと思っていたのですが、正直言ってかなり苦戦していて、まとめられる気がしなくなったので、読んだところからダラダラと書いていくことにしました。ですので、続かないかも。 Sourc
Okay! After diving into CouchDB source code and doing an in depth review of the btree:lookup, I am ready for the real challenge, figuring out how CouchDB writes to the btree. This is the really interesting part, from my point of view. The heart of this functionality is the query_modify method. This method allow us to perform a batch of operations on the tree in one go. Following my own ideal that
「Apache CouchDB」からフォークした分散データベースシステム「BigCouch」を開発する米Cloudantは7月22日(米国時間)、BigCouchのコードベースをCouchDBにマージする計画を発表した。これによりBigCouchの開発は終了、同社はCouchDBやそのクラスタ機能の改善にフォーカスするという。 BigCouchはCouchDBにクラスタ機能などを加えて大規模環境向けにカスタマイズした分散データベースサービス。欧州原子核研究機構(CERN)の大型ハドロン衝突型加速器(LHC)が生成する毎秒1ペタバイト級のデータをCouchDBを使って分散管理していた開発者が作成したもので、水平クラスタリングやフォールトトラレントフレームワークが追加されている。ライセンスはApache License 2.0。 同社はクラスタ管理、圧縮、レプリケーションなどの技術をCouch
The data layer for hyperscale, resilient and globally available applications—based on open-source Apache CouchDB A fully managed, distributed database optimized for heavy workloads and fast-growing web and mobile apps, IBM® Cloudant® is available as an IBM Cloud® service with a 99.99% SLA. Cloudant elastically scales throughput and storage, and its API and replication protocols are compatible with
Join the official community for Google Workspace administrators In the Google Cloud Community, connect with Googlers and other Google Workspace admins like yourself. Participate in product discussions, check out the Community Articles, and learn tips and tricks that will make your work and life easier. Be the first to know what's happening with Google Workspace. ______________ Learn about more Goo
Up: Programming notes Friday, 06 January 2012 CouchDB and it's users have been in a state of flux all year, with declarations of the project's death by outsiders and the rest of community scrambling to fall in-line behind their chosen implementation. Let's relax and ignore the marching drums and nay-sayers for a moment. For me, CouchDB was never about a specific platform or Mongo vs. Couch, but ab
What's the future of CouchDB? It's Couchbase. Huh? So what about Apache CouchDB? Well, that's a great project. I founded it, coded the earliest versions almost completely myself, I've spent a huge amount of blood, sweat and tears on it. I'm very proud of it and the impact it's had. And now I, and the Couchbase team, are mostly moving on. It's not that we think CouchDB isn't awesome. It's that we a
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く