Saturday, March 20, 2010

Konfigurasi erlang-mode untuk Emacs / XEmacs dan Error karena erlang-skels




Erlang mempunya beberapa tools yang bisa digunakan sebagai IDE. Jika anda menyukai Eclipse, anda bisa menggunakan erlIDE. Vim juga bisa digunakan. Kebanyakan developer Erlang menggunakan Emacs atau fork-nya XEmacs. Tulisan ini akan membahas konfigurasi Emacs dan XEmacs yang sudah disediakan oleh distribusi Erlang.

Untuk tulisan ini, saya menggunakan Linux (Arch Linux) yang pada dasarnya sama saja dengan distribusi Linux lainnya, dengan sedikit perbedaan (mungkin) pada letak dari instalasi distribusi Erlang. Di Arch Linux, direktori letak Erlang/OTP ada di /usr/lib/erlang. Berikut adalah langkah-langkah untuk mengkonfigurasi Emacs / XEmacs.

Setting di File Inisialiasi Konfigurasi Emacs / XEmacs


Emacs menyimpan file untuk inisialisasi di $HOME/.emacs atau $HOME/.emacs.d/init.el. Sementara itu XEmacs menyimpan konfigurasi inisialisasi tersebut di $HOME/.xemacs atau $HOME/.xemacs/init.el. Editlah salah satu file tersebut dan tambahkan baris berikut:

(setq load-path (cons  "/usr/lib/erlang/lib/tools-2.6.5.1/emacs" load-path))
(setq erlang-root-dir "/usr/lib/erlang")
(setq exec-path (cons "/usr/lib/erlang/bin" exec-path))
(require 'erlang-start)

Catatan:direktori /usr/lib/erlang/lib/tools-2.6.5.1/emacs adalah lokasi file-file erlang-mode di OS saya. Silahkan sesuaikan dengan milik anda

Error Loading file erlang-skels


Saat pertama kali mencoba, ternyata erlang-mode tidak bisa diaktifkan. Untuk melihat penyebabnya, di Emacs gunakan C-h e. Penyebab utamanya karena tidak bisa me-load file erlang-skels. Jika dilihat pada direktori erlang-mode di atas, terdapat file yang kurang:

[root@bpdp-arch emacs]# pwd
/usr/lib/erlang/lib/tools-2.6.5.1/emacs
[root@bpdp-arch emacs]# ls -la
total 348
drwxr-xr-x 2 root root   4096 Mar 21 11:43 .
drwxr-xr-x 9 root root   4096 Feb 26 16:54 ..
-rw-r--r-- 1 root root   1611 Feb 26 16:54 README
-rw-r--r-- 1 root root  10059 Feb 26 16:54 erlang-eunit.el
-rw-r--r-- 1 root root   3452 Feb 26 16:54 erlang-start.el
-rw-r--r-- 1 root root 183741 Feb 26 16:54 erlang.el
-rw-r--r-- 1 root root  12834 Feb 26 16:54 test.erl.indented
-rw-r--r-- 1 root root  11877 Feb 26 16:54 test.erl.orig
[root@bpdp-arch emacs]# 

File yang kurang ini menyebabkan erlang-mode tidak bisa diaktifkan. File yang diperlukan tersebut adalah erlang-skels.el dan erlang-skels-old.el. Jika di distribusi Linux anda sudah tersedia erlang-skels.el dan erlang-skels-old.el maka anda tidak perlu mengambil file berikut. Jika belum, silahkan mengambil dan letakkan pada direktori di atas:

http://github.com/erlang/otp/raw/dev/lib/tools/emacs/erlang-skels-old.el
http://github.com/erlang/otp/raw/dev/lib/tools/emacs/erlang-skels.el

Setelah itu, anda bisa menggunakan Emacs atau XEmacs anda untuk develop aplikasi Erlang/OTP. Happy hacking with Erlang!.

Monday, March 15, 2010

Menggunakan erl (Erlang Emulator)

Program erl merupakan bagian dari distribusi Erlang dan digunakan untuk keperluan REPL (Read-Eval-Print Lool). Kemungkinan besar jika anda berkecimpung di Erlang, erl ini akan sering anda gunakan sehingga sebaiknya kita memahami optimasi apa saja yang bisa kita lekukan terhadap erl. Catatan: di Windows, anda sebaiknya menggunakan werl bukan erl, meskipun erl juga ada. Program erl di Windows tidak menyediakan fasilitas seperti key binding (panah atas, bawah, dan lain-lain) sehingga kemungkinan akan lebih menyulitkan. Meskipun demikian, erl di Windows tetap yang harus anda gunakan jika anda memerlukan membuat script command prompt yang memerlukan input output proses di Erlang.

Memulai erl


Jika Erlang telah terinstall, erl bisa kita eksekusi dari sembarang path berikut ini:

[bpdp@bpdp-arch erlang]$ erl
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1> 

Tanda 1> adalah tanda prompt dari erl. Pada posisi tersebut, kita bisa mengetikkan perintah-perintah Erlang ataupun menggunakan key binding yang sudah disediakan. Angka 1 menunjukkan nomor proses.

Keluar dari erl


Untuk keluar dari erl, tekan [Ctrl-G] kemudian ketikkan q diikuti tombol Enter

1> 
User switch command
 --> q
[bpdp@bpdp-arch erlang]$ 

Bisa juga dengan menggunakan perintah "q()." berikut ini:

10> q().
ok
11> [bpdp@bpdp-arch erlang]$ 

Menuliskan Perintah


Perintah yang kita tuliskan tidak akan dieksekusi jika belum ada tanda titik (.). Tanda titik di Erlang memang digunakan sebagai tanda untuk mengakhiri perintah.

3> io:format("Selamat datang\n") 
3> 
3> 
3> 
3> 
3> .
Selamat datang
ok
4> 

Tombol-tombol yang Bisa Digunakan di erl (key-binding)


Ada beberapa tombol yang bisa digunakan setelah kita masuk ke prompt erl, yaitu:

  1. Panah atas (Ctrl-P) dan panah bawah (Ctrl-N), digunakan untuk menampilkan perintah-perintah sebelumnya dan sesudahnya.
  2. Panah kiri (Ctrl-B) dan panah kanan (Ctrl-F), digunakan untuk menggerakkan kursor satu karakter ke kiri atau ke kanan.
  3. Ctrl-A, digunakan untuk menggerakkan kursor ke awal baris.
  4. Ctrl-E, digunakan untuk menggerakkan kursor ke akhir baris.
  5. Ctrl-D, digunakan untuk menghapus karakter pada posisi kursor.

Pertolongan di erl


Untuk mengakses fasilitas pertolongan di erl, kita bisa menggunakan function help() berikut ini:

4> help().
** shell internal commands **
b()        -- display all variable bindings
e(N)       -- repeat the expression in query n
f()        -- forget all variable bindings
f(X)       -- forget the binding of variable X
h()        -- history
history(N) -- set how many previous commands to keep
results(N) -- set how many previous command results to keep
catch_exception(B) -- how exceptions are handled
v(N)       -- use the value of query n
rd(R,D)    -- define a record
rf()       -- remove all record information
rf(R)      -- remove record information about R
rl()       -- display all record information
rl(R)      -- display record information about R
rp(Term)   -- display Term using the shell's record information
rr(File)   -- read record information from File (wildcards allowed)
rr(F,R)    -- read selected record information from file(s)
rr(F,R,O)  -- read selected record information with options
** commands in module c **
bt(Pid)    -- stack backtrace for a process
c(File)    -- compile and load code in file
cd(Dir)    -- change working directory
flush()    -- flush any messages sent to the shell
help()     -- help info
i()        -- information about the system
ni()       -- information about the networked system
i(X,Y,Z)   -- information about pid X,Y,Z
l(Module)  -- load or reload module
lc([File]) -- compile a list of Erlang modules
ls()       -- list files in the current directory
ls(Dir)    -- list files in directory Dir
m()        -- which modules are loaded
m(Mod)     -- information about module mod
memory()   -- memory allocation information
memory(T)  -- memory allocation information of type t
nc(File)   -- compile and load code in file on all nodes
nl(Module) -- load module on all nodes
pid(X,Y,Z) -- convert X,Y,Z to a Pid
pwd()      -- print working directory
q()        -- quit - shorthand for init:stop()
regs()     -- information about registered processes
nregs()    -- information about all registered processes
xm(M)      -- cross reference check a module
y(File)    -- generate a Yecc parser
** commands in module i (interpreter interface) **
ih()       -- print help for the i module
true
5> 

Perintah-perintah di erl


Ada banyak perintah-perintah di erl yang bisa kita gunakan dan secara sepintas bisa kita lihat pada pembahasan tentang help(). Beberapa diantaranya akan kita bahas di bawah ini.

b() - digunakan untuk menampilkan variabel-variabel Erlang yang telah kita definisikan:

23> Versi = '4.8'.
'4.8'
24> b().
Versi = '4.8'
ok
25> 

f() - digunakan untuk menghapus semua definisi variabel:

25> f().
ok
26> b().
ok
27> 

f(X) - digunakan untuk menghapus definisi variabel X:

29> Versi = '4.8'.
'4.8'
30> b().
Versi = '4.8'
ok
31> f(Versi).     
ok
32> b().     
ok
33> 

h() - digunakan untuk menampilkan history perintah yang kita ketikkan (dan hasilnya).
history(N) - digunakan untuk menetapkan jumlah penyimpanan history sebanyak N perintah.
results(N) - digunakan untuk menetapkan jumlah penyimpanan hasil sebanyak N hasil perintah.
c(File) - digunakan untuk mengkompilasi file .erl menjadi ,beam sekaligus me-load modul yang ada pada file tersebut di sesi erl yang aktif. Ada beberapa cara yang bisa dilakukan:

1> c('tut1.erl').
{ok,tut1}
2> c(tut1).
{ok,tut1}
3> c(tut1.erl).
{ok,tut1}
4> 

i() - digunakan untuk menampilkan informasi tentang sistem Erlang yang tersedia.
ni() - digunakan untuk menampilkan informasi tentang sistem network Erlang yang tersedia.
pwd() - menampikan direktori aktif saat ini.
l(Module) - digunakan untuk me-load modul
ls() - digunakan untuk menampilkan daftar file dan direktori di direktori aktif saat ini.
ls(Dir) - digunakan untuk menampilkan daftar file dan direktori di direktori Dir.
m() - digunakan untuk menampilkan daftar modul yang di-load:

2> m().
Module                File
application           /usr/lib/erlang/lib/kernel-2.13.5/ebin/application.beam
application_controll  /usr/lib/erlang/lib/kernel-2.13.5/ebin/application_controller.beam
application_master    /usr/lib/erlang/lib/kernel-2.13.5/ebin/application_master.beam
beam_lib              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/beam_lib.beam
c                     /usr/lib/erlang/lib/stdlib-1.16.5/ebin/c.beam
code                  /usr/lib/erlang/lib/kernel-2.13.5/ebin/code.beam
code_server           /usr/lib/erlang/lib/kernel-2.13.5/ebin/code_server.beam
dict                  /usr/lib/erlang/lib/stdlib-1.16.5/ebin/dict.beam
edlin                 /usr/lib/erlang/lib/stdlib-1.16.5/ebin/edlin.beam
erl_distribution      /usr/lib/erlang/lib/kernel-2.13.5/ebin/erl_distribution.beam
erl_eval              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/erl_eval.beam
erl_internal          /usr/lib/erlang/lib/stdlib-1.16.5/ebin/erl_internal.beam
erl_lint              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/erl_lint.beam
erl_parse             /usr/lib/erlang/lib/stdlib-1.16.5/ebin/erl_parse.beam
erl_prim_loader       preloaded
erl_scan              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/erl_scan.beam
erlang                preloaded
error_handler         /usr/lib/erlang/lib/kernel-2.13.5/ebin/error_handler.beam
error_logger          /usr/lib/erlang/lib/kernel-2.13.5/ebin/error_logger.beam
error_logger_tty_h    /usr/lib/erlang/lib/stdlib-1.16.5/ebin/error_logger_tty_h.beam
ets                   /usr/lib/erlang/lib/stdlib-1.16.5/ebin/ets.beam
file                  /usr/lib/erlang/lib/kernel-2.13.5/ebin/file.beam
file_io_server        /usr/lib/erlang/lib/kernel-2.13.5/ebin/file_io_server.beam
file_server           /usr/lib/erlang/lib/kernel-2.13.5/ebin/file_server.beam
filename              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/filename.beam
gb_sets               /usr/lib/erlang/lib/stdlib-1.16.5/ebin/gb_sets.beam
gb_trees              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/gb_trees.beam
gen                   /usr/lib/erlang/lib/stdlib-1.16.5/ebin/gen.beam
gen_event             /usr/lib/erlang/lib/stdlib-1.16.5/ebin/gen_event.beam
gen_server            /usr/lib/erlang/lib/stdlib-1.16.5/ebin/gen_server.beam
global                /usr/lib/erlang/lib/kernel-2.13.5/ebin/global.beam
global_group          /usr/lib/erlang/lib/kernel-2.13.5/ebin/global_group.beam
group                 /usr/lib/erlang/lib/kernel-2.13.5/ebin/group.beam
heart                 /usr/lib/erlang/lib/kernel-2.13.5/ebin/heart.beam
hipe_unified_loader   /usr/lib/erlang/lib/kernel-2.13.5/ebin/hipe_unified_loader.beam
inet                  /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet.beam
inet_config           /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet_config.beam
inet_db               /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet_db.beam
inet_gethost_native   /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet_gethost_native.beam
inet_parse            /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet_parse.beam
inet_udp              /usr/lib/erlang/lib/kernel-2.13.5/ebin/inet_udp.beam
init                  preloaded
io                    /usr/lib/erlang/lib/stdlib-1.16.5/ebin/io.beam
io_lib                /usr/lib/erlang/lib/stdlib-1.16.5/ebin/io_lib.beam
io_lib_format         /usr/lib/erlang/lib/stdlib-1.16.5/ebin/io_lib_format.beam
io_lib_pretty         /usr/lib/erlang/lib/stdlib-1.16.5/ebin/io_lib_pretty.beam
kernel                /usr/lib/erlang/lib/kernel-2.13.5/ebin/kernel.beam
kernel_config         /usr/lib/erlang/lib/kernel-2.13.5/ebin/kernel_config.beam
lists                 /usr/lib/erlang/lib/stdlib-1.16.5/ebin/lists.beam
net_kernel            /usr/lib/erlang/lib/kernel-2.13.5/ebin/net_kernel.beam
orddict               /usr/lib/erlang/lib/stdlib-1.16.5/ebin/orddict.beam
ordsets               /usr/lib/erlang/lib/stdlib-1.16.5/ebin/ordsets.beam
os                    /usr/lib/erlang/lib/kernel-2.13.5/ebin/os.beam
otp_ring0             preloaded
packages              /usr/lib/erlang/lib/kernel-2.13.5/ebin/packages.beam
prim_file             preloaded
prim_inet             preloaded
prim_zip              preloaded
proc_lib              /usr/lib/erlang/lib/stdlib-1.16.5/ebin/proc_lib.beam
proplists             /usr/lib/erlang/lib/stdlib-1.16.5/ebin/proplists.beam
ram_file              /usr/lib/erlang/lib/kernel-2.13.5/ebin/ram_file.beam
rpc                   /usr/lib/erlang/lib/kernel-2.13.5/ebin/rpc.beam
sets                  /usr/lib/erlang/lib/stdlib-1.16.5/ebin/sets.beam
shell                 /usr/lib/erlang/lib/stdlib-1.16.5/ebin/shell.beam
shell_default         /usr/lib/erlang/lib/stdlib-1.16.5/ebin/shell_default.beam
standard_error        /usr/lib/erlang/lib/kernel-2.13.5/ebin/standard_error.beam
supervisor            /usr/lib/erlang/lib/stdlib-1.16.5/ebin/supervisor.beam
supervisor_bridge     /usr/lib/erlang/lib/stdlib-1.16.5/ebin/supervisor_bridge.beam
sys                   /usr/lib/erlang/lib/stdlib-1.16.5/ebin/sys.beam
unicode               /usr/lib/erlang/lib/stdlib-1.16.5/ebin/unicode.beam
user_drv              /usr/lib/erlang/lib/kernel-2.13.5/ebin/user_drv.beam
user_sup              /usr/lib/erlang/lib/kernel-2.13.5/ebin/user_sup.beam
zlib                  preloaded
ok
3> 

m(Module) - digunakan untuk menampilkan informasi tentang modul Module:

4> m(application).
Module application compiled: Date: February 22 2010, Time: 19.36
Compiler options:  [{cwd,"/net/isildur/ldisk/daily_build/otp_prebuild_r13b04.2010-02-22_20/otp_src_R13B04/lib/kernel/src"},
                    {outdir,"/net/isildur/ldisk/daily_build/otp_prebuild_r13b04.2010-02-22_20/otp_src_R13B04/lib/kernel/src/../ebin"},
                    {i,"/net/isildur/ldisk/daily_build/otp_prebuild_r13b04.2010-02-22_20/otp_src_R13B04/lib/kernel/src/../include"},
                    debug_info]
Object file: /usr/lib/erlang/lib/kernel-2.13.5/ebin/application.beam
Exports: 
behaviour_info/1              module_info/1
get_all_env/0                 permit/2
get_all_env/1                 set_env/3
get_all_key/0                 set_env/4
get_all_key/1                 start/1
get_application/0             start/2
get_application/1             start_boot/1
get_env/1                     start_boot/2
get_env/2                     start_type/0
get_key/1                     stop/1
get_key/2                     takeover/2
info/0                        unload/1
load/2                        unset_env/2
load/1                        unset_env/3
loaded_applications/0         which_applications/0
module_info/0                 which_applications/1
ok
5> 

ih() - digunakan untuk menampilkan informasi tentang modul i:

5> ih().
iv()         -- print the current version of the interpreter
im()         -- pop up a monitor window
ii(Mod)      -- interpret Mod(s) (or AbsMod(s))
ii(Mod,Op)   -- interpret Mod(s) (or AbsMod(s))
                use Op as options (same as for compile)
iq(Mod)      -- do not interpret Mod(s)
ini(Mod)     -- ii/1 at all Erlang nodes
ini(Mod,Op)  -- ii/2 at all Erlang nodes
inq(Mod)     -- iq at all Erlang nodes
ib(Mod,Line) -- set a break point at Line in Mod
ib(M,F,Arity)-- set a break point in M:F/Arity
ibd(Mod,Line)-- disable the break point at Line in Mod
ibe(Mod,Line)-- enable the break point at Line in Mod
iba(M,L,Action)-- set a new action at break
ibc(M,L,Action)-- set a new condition for break
ir(Mod,Line) -- remove the break point at Line in Mod
ir(M,F,Arity)-- remove the break point in M:F/Arity
ir(Mod)      -- remove all break points in Mod
ir()         -- remove all existing break points
il()         -- list all interpreted modules
ip()         -- print status of all interpreted processes
ic()         -- remove all terminated interpreted processes
ipb()        -- list all break points
ipb(Mod)     -- list all break points in Mod
ia(Pid)      -- attach to Pid
ia(X,Y,Z)    -- attach to pid(X,Y,Z)
ia(Pid,Fun)  -- use own Fun = {M,F} as attach application
ia(X,Y,Z,Fun)-- use own Fun = {M,F} as attach application
iaa([Flag])  -- set automatic attach to process
                Flag is init,break and exit
iaa([Fl],Fun)-- use own Fun = {M,F} as attach application
ist(Flag)    -- set stack trace flag
                Flag is all (true),no_tail or false
ok
6> 

Beberapa perintah lainnya (misalnya yang terkait dengan record) sebaiknya dipelajari saat mempelajari modul yang terkait.

Menggunakan erl Untuk Membaca Dokumentasi


Untuk membaca dokumentasi, kita bisa menggunakan argumen -man pada saat memanggil erl sebagai berikut:

[bpdp@bpdp-arch erlang]$ erl -man erl

erl(1)                                          User Commands                                         erl(1)

NAME
       erl - The Erlang Emulator

DESCRIPTION
       The  erl  program  starts  an Erlang runtime system. The exact details (for example, whether erl is a
       script or a program and which other programs it calls) are system-dependent.

       Windows users probably wants to use the werl program instead, which  runs  in  its  own  window  with
       scrollbars  and supports command-line editing. The erl program on Windows provides no line editing in
       its shell, and on Windows 95 there is no way to scroll back  to  text  which  has  scrolled  off  the
       screen. The erl program must be used, however, in pipelines or if you want to redirect standard input
       or output.

EXPORTS
       erl arguments

              Starts an Erlang runtime system.

              The arguments can be divided into emulator flags , flags and plain arguments :

...
...

Pada bagian bawah, biasanya terdapat SEE ALSO yang berisi beberapa manpage yang juga bisa anda panggil dengan cara seperti di atas:

...
...
         ERL_EPMD_PORT :
           This  environment  variable can contain the port number to use when communicating with epmd . The
           default port will work fine in most cases. A different port can be specified to  allow  nodes  of
           independent  clusters to co-exist on the same host. All nodes in a cluster must use the same epmd
           port number.

SEE ALSO
       init(3) , erl_prim_loader(3) , erl_boot_server(3) , code(3) , application(3) ,  heart(3)  ,  net_ker‐
       nel(3) , auth(3) , make(3) , epmd(1) , erts_alloc(3)

Ericsson AB                                      erts 5.7.5                                           erl(1)

Catatan: fasilitas ini hanya tersedia di OS berbasis UNIX (Linux, BSD, dan lain-lain). Windows tidak menyediakan fasilitas ini karena memang keterbatasan dari Windows yang tidak menyediakan sistem manpage.

Friday, March 5, 2010

Document-Oriented Database di Erlang: Apache CouchDB

Document-oriented database adalah suatu kategori database yang digunakan untuk keperluan penyimpanan data yang ditujukan bagi aplikasi yang memerlukan akses ke data dalam format seperti dokumen. Bagian yang membedakan dengan relational database adalah software database ini tidak menyimpan data dalam bentuk kolom dan baris dengan tipe data serta lebar yang sudah pasti. Document-oriented database menyimpan data dalam format yang tidak tetap. Dengan demikian, ada fleksibilitas dalam penyimpanan data. Saat akan terjadi penambahan, kita tidak perlu memikirkan, apa sebenarnya tipe datanya, harus berapa range atau lebarnya, dan seterusnya. Pengurangan data juga dapat dilakukan sewaktu-waktu tanpa mempengaruhi data lainnya.

Setiap dokumen akan terdiri atas beberapa field, dan setiap field dimungkinkan untuk mempunyai lebih dari satu data. Jika dalam relational database disebut sebagai record, maka pada document-oriented database ini, record disebut sebagai dokumen.

Kategori database ini sudah diimplementasikan pada banyak software, diantaranya adalah MongoDB, Apache CouchDB, dan lain-lain. Tulisan ini akan menjelaskan tentang Apache CouchDB yang enginenya dibuat dengan menggunakan Erlang.

Download Apache CouchDB


[bpdp@bpdp-arch couchdb]$ wget http://apache.pesat.net.id/couchdb/0.10.1/apache-couchdb-0.10.1.tar.gz
--2010-03-05 23:03:22--  http://apache.pesat.net.id/couchdb/0.10.1/apache-couchdb-0.10.1.tar.gz
Resolving apache.pesat.net.id... 202.182.182.180
Connecting to apache.pesat.net.id|202.182.182.180|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 883259 (863K) [application/x-gzip]
Saving to: “apache-couchdb-0.10.1.tar.gz”

100%[=====================================================================>] 883,259      106K/s   in 8.2s    

2010-03-05 23:03:30 (106 KB/s) - “apache-couchdb-0.10.1.tar.gz” saved [883259/883259]
[bpdp@bpdp-arch couchdb]$ 

Setelah itu, kita ekstrak:

[bpdp@bpdp-arch couchdb]$ tar -xzvf apache-couchdb-0.10.1.tar.gz 
apache-couchdb-0.10.1/
apache-couchdb-0.10.1/aclocal.m4
apache-couchdb-0.10.1/Makefile.am
apache-couchdb-0.10.1/test/
apache-couchdb-0.10.1/test/Makefile.am
apache-couchdb-0.10.1/test/query_server_spec.rb
apache-couchdb-0.10.1/test/runner.erl
apache-couchdb-0.10.1/test/run_native_process.es
apache-couchdb-0.10.1/test/Makefile.in
apache-couchdb-0.10.1/test/couch_config_test.erl
apache-couchdb-0.10.1/test/runner.sh
apache-couchdb-0.10.1/test/couch_config_writer_test.erl
apache-couchdb-0.10.1/test/etap/
apache-couchdb-0.10.1/test/etap/021-btree-reductions.t
apache-couchdb-0.10.1/test/etap/111-replication-changes-feed.t
apache-couchdb-0.10.1/test/etap/Makefile.am
apache-couchdb-0.10.1/test/etap/011-file-headers.t
apache-couchdb-0.10.1/test/etap/090-task-status.t
apache-couchdb-0.10.1/test/etap/run.tpl
apache-couchdb-0.10.1/test/etap/030-doc-from-json.t
apache-couchdb-0.10.1/test/etap/070-couch-db.t
apache-couchdb-0.10.1/test/etap/083-config-no-files.t
apache-couchdb-0.10.1/test/etap/001-load.t
apache-couchdb-0.10.1/test/etap/110-replication-httpc.t
apache-couchdb-0.10.1/test/etap/020-btree-basics.t
apache-couchdb-0.10.1/test/etap/081-config-override.t
apache-couchdb-0.10.1/test/etap/040-util.t
apache-couchdb-0.10.1/test/etap/Makefile.in
apache-couchdb-0.10.1/test/etap/031-doc-to-json.t
apache-couchdb-0.10.1/test/etap/062-kt-remove-leaves.t
apache-couchdb-0.10.1/test/etap/080-config-get-set.t
apache-couchdb-0.10.1/test/etap/081-config-override.1.ini
apache-couchdb-0.10.1/test/etap/050-stream.t
apache-couchdb-0.10.1/test/etap/010-file-basics.t
apache-couchdb-0.10.1/test/etap/test_util.erl.in
apache-couchdb-0.10.1/test/etap/060-kt-merging.t
apache-couchdb-0.10.1/test/etap/064-kt-counting.t
apache-couchdb-0.10.1/test/etap/112-replication-missing-revs.t
apache-couchdb-0.10.1/test/etap/065-kt-stemming.t
apache-couchdb-0.10.1/test/etap/063-kt-get-leaves.t
apache-couchdb-0.10.1/test/etap/061-kt-missing-leaves.t
apache-couchdb-0.10.1/test/etap/081-config-override.2.ini
apache-couchdb-0.10.1/test/etap/100-ref-counter.t
apache-couchdb-0.10.1/test/etap/082-config-register.t
apache-couchdb-0.10.1/test/test.js
apache-couchdb-0.10.1/configure.ac
apache-couchdb-0.10.1/config.h.in
apache-couchdb-0.10.1/etc/
apache-couchdb-0.10.1/etc/Makefile.am
apache-couchdb-0.10.1/etc/launchd/
apache-couchdb-0.10.1/etc/launchd/Makefile.am
apache-couchdb-0.10.1/etc/launchd/Makefile.in
apache-couchdb-0.10.1/etc/launchd/org.apache.couchdb.plist.tpl.in
apache-couchdb-0.10.1/etc/logrotate.d/
apache-couchdb-0.10.1/etc/logrotate.d/Makefile.am
apache-couchdb-0.10.1/etc/logrotate.d/couchdb.tpl.in
apache-couchdb-0.10.1/etc/logrotate.d/Makefile.in
apache-couchdb-0.10.1/etc/Makefile.in
apache-couchdb-0.10.1/etc/default/
apache-couchdb-0.10.1/etc/default/Makefile.am
apache-couchdb-0.10.1/etc/default/Makefile.in
apache-couchdb-0.10.1/etc/default/couchdb
apache-couchdb-0.10.1/etc/couchdb/
apache-couchdb-0.10.1/etc/couchdb/Makefile.am
apache-couchdb-0.10.1/etc/couchdb/default.ini.tpl.in
apache-couchdb-0.10.1/etc/couchdb/local.ini
apache-couchdb-0.10.1/etc/couchdb/Makefile.in
apache-couchdb-0.10.1/etc/init/
apache-couchdb-0.10.1/etc/init/Makefile.am
apache-couchdb-0.10.1/etc/init/couchdb.tpl.in
apache-couchdb-0.10.1/etc/init/Makefile.in
apache-couchdb-0.10.1/NEWS
apache-couchdb-0.10.1/AUTHORS
apache-couchdb-0.10.1/acinclude.m4
apache-couchdb-0.10.1/configure
apache-couchdb-0.10.1/utils/
apache-couchdb-0.10.1/utils/Makefile.am
apache-couchdb-0.10.1/utils/Makefile.in
apache-couchdb-0.10.1/LICENSE
apache-couchdb-0.10.1/NOTICE
apache-couchdb-0.10.1/Makefile.in
apache-couchdb-0.10.1/CHANGES
apache-couchdb-0.10.1/src/
apache-couchdb-0.10.1/src/Makefile.am
apache-couchdb-0.10.1/src/mochiweb/
apache-couchdb-0.10.1/src/mochiweb/mochiweb.erl
apache-couchdb-0.10.1/src/mochiweb/Makefile.am
apache-couchdb-0.10.1/src/mochiweb/mochiweb_skel.erl
apache-couchdb-0.10.1/src/mochiweb/mochinum.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_http.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_sup.erl
apache-couchdb-0.10.1/src/mochiweb/mochifmt_records.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_response.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_charref.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_headers.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_socket_server.erl
apache-couchdb-0.10.1/src/mochiweb/mochifmt_std.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_echo.erl
apache-couchdb-0.10.1/src/mochiweb/mochifmt.erl
apache-couchdb-0.10.1/src/mochiweb/mochihex.erl
apache-couchdb-0.10.1/src/mochiweb/reloader.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_app.erl
apache-couchdb-0.10.1/src/mochiweb/Makefile.in
apache-couchdb-0.10.1/src/mochiweb/mochijson.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_util.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_request.erl
apache-couchdb-0.10.1/src/mochiweb/mochijson2.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_cookies.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_multipart.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb_html.erl
apache-couchdb-0.10.1/src/mochiweb/mochiweb.app.in
apache-couchdb-0.10.1/src/ibrowse/
apache-couchdb-0.10.1/src/ibrowse/Makefile.am
apache-couchdb-0.10.1/src/ibrowse/ibrowse_test.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse.app.in
apache-couchdb-0.10.1/src/ibrowse/ibrowse_sup.erl
apache-couchdb-0.10.1/src/ibrowse/Makefile.in
apache-couchdb-0.10.1/src/ibrowse/ibrowse_lb.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse_lib.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse_http_client.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse_app.erl
apache-couchdb-0.10.1/src/ibrowse/ibrowse.hrl
apache-couchdb-0.10.1/src/Makefile.in
apache-couchdb-0.10.1/src/erlang-oauth/
apache-couchdb-0.10.1/src/erlang-oauth/Makefile.am
apache-couchdb-0.10.1/src/erlang-oauth/oauth_plaintext.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth.app.in
apache-couchdb-0.10.1/src/erlang-oauth/oauth_hmac_sha1.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth_uri.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth_unix.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth_rsa_sha1.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth_http.erl
apache-couchdb-0.10.1/src/erlang-oauth/oauth.erl
apache-couchdb-0.10.1/src/erlang-oauth/Makefile.in
apache-couchdb-0.10.1/src/etap/
apache-couchdb-0.10.1/src/etap/Makefile.am
apache-couchdb-0.10.1/src/etap/etap_report.erl
apache-couchdb-0.10.1/src/etap/etap_request.erl
apache-couchdb-0.10.1/src/etap/etap_exception.erl
apache-couchdb-0.10.1/src/etap/etap_process.erl
apache-couchdb-0.10.1/src/etap/Makefile.in
apache-couchdb-0.10.1/src/etap/etap_can.erl
apache-couchdb-0.10.1/src/etap/etap_web.erl
apache-couchdb-0.10.1/src/etap/etap_string.erl
apache-couchdb-0.10.1/src/etap/etap_application.erl
apache-couchdb-0.10.1/src/etap/etap.erl
apache-couchdb-0.10.1/src/couchdb/
apache-couchdb-0.10.1/src/couchdb/couch_httpd_db.erl
apache-couchdb-0.10.1/src/couchdb/couch_server_sup.erl
apache-couchdb-0.10.1/src/couchdb/Makefile.am
apache-couchdb-0.10.1/src/couchdb/couch_db_updater.erl
apache-couchdb-0.10.1/src/couchdb/couch_external_manager.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd_external.erl
apache-couchdb-0.10.1/src/couchdb/couch_stats_aggregator.erl
apache-couchdb-0.10.1/src/couchdb/couch_stats_collector.erl
apache-couchdb-0.10.1/src/couchdb/priv/
apache-couchdb-0.10.1/src/couchdb/priv/Makefile.am
apache-couchdb-0.10.1/src/couchdb/priv/couchspawnkillable_win.c
apache-couchdb-0.10.1/src/couchdb/priv/couchspawnkillable.sh
apache-couchdb-0.10.1/src/couchdb/priv/Makefile.in
apache-couchdb-0.10.1/src/couchdb/couch_httpd_auth.erl
apache-couchdb-0.10.1/src/couchdb/couch_event_sup.erl
apache-couchdb-0.10.1/src/couchdb/couch_os_process.erl
apache-couchdb-0.10.1/src/couchdb/couch_config.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd_show.erl
apache-couchdb-0.10.1/src/couchdb/curlhelper.c
apache-couchdb-0.10.1/src/couchdb/couch_task_status.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd_view.erl
apache-couchdb-0.10.1/src/couchdb/couch_server.erl
apache-couchdb-0.10.1/src/couchdb/couch_log.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep_writer.erl
apache-couchdb-0.10.1/src/couchdb/couch_erl_driver.c
apache-couchdb-0.10.1/src/couchdb/couch_httpd_stats_handlers.erl
apache-couchdb-0.10.1/src/couchdb/couch_db_update_notifier_sup.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep_missing_revs.erl
apache-couchdb-0.10.1/src/couchdb/couch_db_update_notifier.erl
apache-couchdb-0.10.1/src/couchdb/couch_batch_save.erl
apache-couchdb-0.10.1/src/couchdb/couch_key_tree.erl
apache-couchdb-0.10.1/src/couchdb/couch_stream.erl
apache-couchdb-0.10.1/src/couchdb/couch_batch_save_sup.erl
apache-couchdb-0.10.1/src/couchdb/couch_doc.erl
apache-couchdb-0.10.1/src/couchdb/couch_view_compactor.erl
apache-couchdb-0.10.1/src/couchdb/couch_util.erl
apache-couchdb-0.10.1/src/couchdb/Makefile.in
apache-couchdb-0.10.1/src/couchdb/couch_db.hrl
apache-couchdb-0.10.1/src/couchdb/couch_rep_att.erl
apache-couchdb-0.10.1/src/couchdb/couch.app.tpl.in
apache-couchdb-0.10.1/src/couchdb/curlhelper.h
apache-couchdb-0.10.1/src/couchdb/couch_js.c
apache-couchdb-0.10.1/src/couchdb/couch_view.erl
apache-couchdb-0.10.1/src/couchdb/couch_ref_counter.erl
apache-couchdb-0.10.1/src/couchdb/couch_query_servers.erl
apache-couchdb-0.10.1/src/couchdb/couch_btree.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd_oauth.erl
apache-couchdb-0.10.1/src/couchdb/couch_config_writer.erl
apache-couchdb-0.10.1/src/couchdb/couch_file.erl
apache-couchdb-0.10.1/src/couchdb/couch_view_group.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep_reader.erl
apache-couchdb-0.10.1/src/couchdb/couch_external_server.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd_misc_handlers.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep_httpc.erl
apache-couchdb-0.10.1/src/couchdb/couch_stats.hrl
apache-couchdb-0.10.1/src/couchdb/couch_rep_changes_feed.erl
apache-couchdb-0.10.1/src/couchdb/couch_rep_sup.erl
apache-couchdb-0.10.1/src/couchdb/couch_native_process.erl
apache-couchdb-0.10.1/src/couchdb/couch_db.erl
apache-couchdb-0.10.1/src/couchdb/couch_httpd.erl
apache-couchdb-0.10.1/src/couchdb/couch_view_updater.erl
apache-couchdb-0.10.1/build-aux/
apache-couchdb-0.10.1/build-aux/config.guess
apache-couchdb-0.10.1/build-aux/install-sh
apache-couchdb-0.10.1/build-aux/missing
apache-couchdb-0.10.1/build-aux/ltmain.sh
apache-couchdb-0.10.1/build-aux/depcomp
apache-couchdb-0.10.1/build-aux/config.sub
apache-couchdb-0.10.1/var/
apache-couchdb-0.10.1/var/Makefile.am
apache-couchdb-0.10.1/var/Makefile.in
apache-couchdb-0.10.1/m4/
apache-couchdb-0.10.1/m4/ac_check_icu.m4
apache-couchdb-0.10.1/m4/ac_check_curl.m4
apache-couchdb-0.10.1/README
apache-couchdb-0.10.1/THANKS
apache-couchdb-0.10.1/license.skip
apache-couchdb-0.10.1/share/
apache-couchdb-0.10.1/share/Makefile.am
apache-couchdb-0.10.1/share/www/
apache-couchdb-0.10.1/share/www/status.html
apache-couchdb-0.10.1/share/www/_sidebar.html
apache-couchdb-0.10.1/share/www/document.html
apache-couchdb-0.10.1/share/www/style/
apache-couchdb-0.10.1/share/www/style/layout.css
apache-couchdb-0.10.1/share/www/image/
apache-couchdb-0.10.1/share/www/image/bg.png
apache-couchdb-0.10.1/share/www/image/sidebar-toggle.png
apache-couchdb-0.10.1/share/www/image/rarrow.png
apache-couchdb-0.10.1/share/www/image/spinner.gif
apache-couchdb-0.10.1/share/www/image/load.png
apache-couchdb-0.10.1/share/www/image/hgrad.gif
apache-couchdb-0.10.1/share/www/image/compact.png
apache-couchdb-0.10.1/share/www/image/delete-mini.png
apache-couchdb-0.10.1/share/www/image/run.png
apache-couchdb-0.10.1/share/www/image/twisty.gif
apache-couchdb-0.10.1/share/www/image/delete.png
apache-couchdb-0.10.1/share/www/image/order-asc.gif
apache-couchdb-0.10.1/share/www/image/toggle-collapse.gif
apache-couchdb-0.10.1/share/www/image/thead-key.gif
apache-couchdb-0.10.1/share/www/image/test_success.gif
apache-couchdb-0.10.1/share/www/image/thead.gif
apache-couchdb-0.10.1/share/www/image/cancel.gif
apache-couchdb-0.10.1/share/www/image/progress.gif
apache-couchdb-0.10.1/share/www/image/order-desc.gif
apache-couchdb-0.10.1/share/www/image/running.png
apache-couchdb-0.10.1/share/www/image/test_failure.gif
apache-couchdb-0.10.1/share/www/image/save.png
apache-couchdb-0.10.1/share/www/image/grippie.gif
apache-couchdb-0.10.1/share/www/image/apply.gif
apache-couchdb-0.10.1/share/www/image/logo.png
apache-couchdb-0.10.1/share/www/image/toggle-expand.gif
apache-couchdb-0.10.1/share/www/image/path.gif
apache-couchdb-0.10.1/share/www/image/run-mini.png
apache-couchdb-0.10.1/share/www/image/add.png
apache-couchdb-0.10.1/share/www/database.html
apache-couchdb-0.10.1/share/www/dialog/
apache-couchdb-0.10.1/share/www/dialog/_delete_document.html
apache-couchdb-0.10.1/share/www/dialog/_upload_attachment.html
apache-couchdb-0.10.1/share/www/dialog/_create_database.html
apache-couchdb-0.10.1/share/www/dialog/_save_view_as.html
apache-couchdb-0.10.1/share/www/dialog/_compact_database.html
apache-couchdb-0.10.1/share/www/dialog/_delete_database.html
apache-couchdb-0.10.1/share/www/config.html
apache-couchdb-0.10.1/share/www/replicator.html
apache-couchdb-0.10.1/share/www/script/
apache-couchdb-0.10.1/share/www/script/jquery.form.js
apache-couchdb-0.10.1/share/www/script/jquery.suggest.js
apache-couchdb-0.10.1/share/www/script/futon.js
apache-couchdb-0.10.1/share/www/script/test/
apache-couchdb-0.10.1/share/www/script/test/etags_head.js
apache-couchdb-0.10.1/share/www/script/test/reduce_builtin.js
apache-couchdb-0.10.1/share/www/script/test/compact.js
apache-couchdb-0.10.1/share/www/script/test/design_options.js
apache-couchdb-0.10.1/share/www/script/test/view_multi_key_temp.js
apache-couchdb-0.10.1/share/www/script/test/recreate_doc.js
apache-couchdb-0.10.1/share/www/script/test/http.js
apache-couchdb-0.10.1/share/www/script/test/view_multi_key_design.js
apache-couchdb-0.10.1/share/www/script/test/view_pagination.js
apache-couchdb-0.10.1/share/www/script/test/changes.js
apache-couchdb-0.10.1/share/www/script/test/uuids.js
apache-couchdb-0.10.1/share/www/script/test/content_negotiation.js
apache-couchdb-0.10.1/share/www/script/test/rev_stemming.js
apache-couchdb-0.10.1/share/www/script/test/view_multi_key_all_docs.js
apache-couchdb-0.10.1/share/www/script/test/delayed_commits.js
apache-couchdb-0.10.1/share/www/script/test/invalid_docids.js
apache-couchdb-0.10.1/share/www/script/test/reduce_false.js
apache-couchdb-0.10.1/share/www/script/test/lorem.txt
apache-couchdb-0.10.1/share/www/script/test/security_validation.js
apache-couchdb-0.10.1/share/www/script/test/etags_views.js
apache-couchdb-0.10.1/share/www/script/test/cookie_auth.js
apache-couchdb-0.10.1/share/www/script/test/large_docs.js
apache-couchdb-0.10.1/share/www/script/test/stats.js
apache-couchdb-0.10.1/share/www/script/test/basics.js
apache-couchdb-0.10.1/share/www/script/test/view_collation.js
apache-couchdb-0.10.1/share/www/script/test/view_include_docs.js
apache-couchdb-0.10.1/share/www/script/test/all_docs.js
apache-couchdb-0.10.1/share/www/script/test/view_errors.js
apache-couchdb-0.10.1/share/www/script/test/design_paths.js
apache-couchdb-0.10.1/share/www/script/test/attachment_paths.js
apache-couchdb-0.10.1/share/www/script/test/view_sandboxing.js
apache-couchdb-0.10.1/share/www/script/test/attachment_names.js
apache-couchdb-0.10.1/share/www/script/test/show_documents.js
apache-couchdb-0.10.1/share/www/script/test/conflicts.js
apache-couchdb-0.10.1/share/www/script/test/list_views.js
apache-couchdb-0.10.1/share/www/script/test/attachment_views.js
apache-couchdb-0.10.1/share/www/script/test/update_documents.js
apache-couchdb-0.10.1/share/www/script/test/oauth.js
apache-couchdb-0.10.1/share/www/script/test/view_xml.js
apache-couchdb-0.10.1/share/www/script/test/view_offsets.js
apache-couchdb-0.10.1/share/www/script/test/form_submit.js
apache-couchdb-0.10.1/share/www/script/test/bulk_docs.js
apache-couchdb-0.10.1/share/www/script/test/lorem_b64.txt
apache-couchdb-0.10.1/share/www/script/test/jsonp.js
apache-couchdb-0.10.1/share/www/script/test/replication.js
apache-couchdb-0.10.1/share/www/script/test/view_conflicts.js
apache-couchdb-0.10.1/share/www/script/test/batch_save.js
apache-couchdb-0.10.1/share/www/script/test/multiple_rows.js
apache-couchdb-0.10.1/share/www/script/test/config.js
apache-couchdb-0.10.1/share/www/script/test/erlang_views.js
apache-couchdb-0.10.1/share/www/script/test/purge.js
apache-couchdb-0.10.1/share/www/script/test/lots_of_docs.js
apache-couchdb-0.10.1/share/www/script/test/reduce.js
apache-couchdb-0.10.1/share/www/script/test/utf8.js
apache-couchdb-0.10.1/share/www/script/test/attachments.js
apache-couchdb-0.10.1/share/www/script/test/design_docs.js
apache-couchdb-0.10.1/share/www/script/test/copy_doc.js
apache-couchdb-0.10.1/share/www/script/futon.format.js
apache-couchdb-0.10.1/share/www/script/jquery.js
apache-couchdb-0.10.1/share/www/script/json2.js
apache-couchdb-0.10.1/share/www/script/couch.js
apache-couchdb-0.10.1/share/www/script/jquery.couch.js
apache-couchdb-0.10.1/share/www/script/futon.browse.js
apache-couchdb-0.10.1/share/www/script/couch_tests.js
apache-couchdb-0.10.1/share/www/script/jquery.editinline.js
apache-couchdb-0.10.1/share/www/script/couch_test_runner.js
apache-couchdb-0.10.1/share/www/script/oauth.js
apache-couchdb-0.10.1/share/www/script/jquery.resizer.js
apache-couchdb-0.10.1/share/www/script/jquery.cookies.js
apache-couchdb-0.10.1/share/www/script/jquery.dialog.js
apache-couchdb-0.10.1/share/www/script/sha1.js
apache-couchdb-0.10.1/share/www/couch_tests.html
apache-couchdb-0.10.1/share/www/favicon.ico
apache-couchdb-0.10.1/share/www/custom_test.html
apache-couchdb-0.10.1/share/www/index.html
apache-couchdb-0.10.1/share/server/
apache-couchdb-0.10.1/share/server/validate.js
apache-couchdb-0.10.1/share/server/render.js
apache-couchdb-0.10.1/share/server/util.js
apache-couchdb-0.10.1/share/server/filter.js
apache-couchdb-0.10.1/share/server/mimeparse.js
apache-couchdb-0.10.1/share/server/state.js
apache-couchdb-0.10.1/share/server/views.js
apache-couchdb-0.10.1/share/server/loop.js
apache-couchdb-0.10.1/share/Makefile.in
apache-couchdb-0.10.1/bin/
apache-couchdb-0.10.1/bin/Makefile.am
apache-couchdb-0.10.1/bin/couchdb.bat.tpl.in
apache-couchdb-0.10.1/bin/couchjs.1
apache-couchdb-0.10.1/bin/couchdb.tpl.in
apache-couchdb-0.10.1/bin/couchjs.tpl.in
apache-couchdb-0.10.1/bin/Makefile.in
apache-couchdb-0.10.1/bin/couchdb.1
apache-couchdb-0.10.1/BUGS
[bpdp@bpdp-arch couchdb]$

Apache CouchDB akan diinstall di /home/bpdp/software/couchdb berikut ini:

[bpdp@bpdp-arch apache-couchdb-0.10.1]$ ./configure --prefix=/home/bpdp/software/couchdb/
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a sed that does not truncate output... /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether ln -s works... yes
checking for pthread_create in -lpthread... yes
checking for JS_NewContext in -lmozjs... no
checking for JS_NewContext in -ljs... yes
checking jsapi.h usability... yes
checking jsapi.h presence... yes
checking for jsapi.h... yes
checking for icu-config... /usr/bin/icu-config
checking for ICU >= 3... yes
checking ICU_CFLAGS... -march=i686 -mtune=generic -O2 -pipe -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long   
checking ICU_CXXFLAGS... -march=i686 -mtune=generic -O2 -pipe -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long   
checking ICU_LIBS...  -lpthread -lm   -L/usr/lib -licui18n -licuuc -licudata  -lpthread -lm   
checking for curl-config... /usr/bin/curl-config
checking for curl >= 7.15.5... yes
checking CURL_CFLAGS... 
checking CURL_LIBS... -lcurl -Wl,--hash-style=gnu -Wl,--as-needed
checking for erl... /usr/bin/erl
checking for erlc... /usr/bin/erlc
checking erl_driver.h usability... yes
checking erl_driver.h presence... yes
checking for erl_driver.h... yes
checking for help2man... /usr/bin/help2man
checking location of init directory... ${sysconfdir}/rc.d
checking location of launchd directory... not found
configure: creating ./config.status
config.status: creating Makefile
config.status: creating bin/couchjs.tpl
config.status: creating bin/couchdb.tpl
config.status: creating bin/couchdb.bat.tpl
config.status: creating bin/Makefile
config.status: creating etc/couchdb/Makefile
config.status: creating etc/couchdb/default.ini.tpl
config.status: creating etc/default/Makefile
config.status: creating etc/init/couchdb.tpl
config.status: creating etc/init/Makefile
config.status: creating etc/launchd/org.apache.couchdb.plist.tpl
config.status: creating etc/launchd/Makefile
config.status: creating etc/logrotate.d/couchdb.tpl
config.status: creating etc/logrotate.d/Makefile
config.status: creating etc/Makefile
config.status: creating share/Makefile
config.status: creating src/Makefile
config.status: creating src/couchdb/couch.app.tpl
config.status: creating src/couchdb/Makefile
config.status: creating src/couchdb/priv/Makefile
config.status: creating src/erlang-oauth/Makefile
config.status: creating src/etap/Makefile
config.status: creating src/ibrowse/Makefile
config.status: creating src/mochiweb/Makefile
config.status: creating test/Makefile
config.status: creating test/etap/Makefile
config.status: creating test/etap/test_util.erl
config.status: creating utils/Makefile
config.status: creating var/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands

You have configured Apache CouchDB, time to relax.

Run `make && sudo make install' to install.
[bpdp@bpdp-arch apache-couchdb-0.10.1]$ 

Setelah itu kompilasi dengan menggunakan make kemudian diinstall dengan make install

[bpdp@bpdp-arch apache-couchdb-0.10.1]$ make

...
[bpdp@bpdp-arch apache-couchdb-0.10.1]$ make install

Setelah terinstall, berikut ini adalah isi dari direktori tempat CouchDB tersebut diinstall:

[bpdp@bpdp-arch couchdb]$ tree .
.
|-- bin
|   |-- couchdb
|   `-- couchjs
|-- etc
|   |-- couchdb
|   |   |-- default.d
|   |   |-- default.ini
|   |   |-- local.d
|   |   `-- local.ini
|   |-- default
|   |   `-- couchdb
|   |-- logrotate.d
|   |   `-- couchdb
|   `-- rc.d
|       `-- couchdb
|-- lib
|   `-- couchdb
|       |-- bin
|       |   `-- couchjs
|       `-- erlang
|           `-- lib
|               |-- couch-0.10.1
|               |   |-- ebin
|               |   |   |-- couch.app
|               |   |   |-- couch_batch_save.beam
|               |   |   |-- couch_batch_save_sup.beam
|               |   |   |-- couch_btree.beam
|               |   |   |-- couch_config.beam
|               |   |   |-- couch_config_writer.beam
|               |   |   |-- couch_db.beam
|               |   |   |-- couch_db_update_notifier.beam
|               |   |   |-- couch_db_update_notifier_sup.beam
|               |   |   |-- couch_db_updater.beam
|               |   |   |-- couch_doc.beam
|               |   |   |-- couch_event_sup.beam
|               |   |   |-- couch_external_manager.beam
|               |   |   |-- couch_external_server.beam
|               |   |   |-- couch_file.beam
|               |   |   |-- couch_httpd.beam
|               |   |   |-- couch_httpd_auth.beam
|               |   |   |-- couch_httpd_db.beam
|               |   |   |-- couch_httpd_external.beam
|               |   |   |-- couch_httpd_misc_handlers.beam
|               |   |   |-- couch_httpd_oauth.beam
|               |   |   |-- couch_httpd_show.beam
|               |   |   |-- couch_httpd_stats_handlers.beam
|               |   |   |-- couch_httpd_view.beam
|               |   |   |-- couch_key_tree.beam
|               |   |   |-- couch_log.beam
|               |   |   |-- couch_native_process.beam
|               |   |   |-- couch_os_process.beam
|               |   |   |-- couch_query_servers.beam
|               |   |   |-- couch_ref_counter.beam
|               |   |   |-- couch_rep.beam
|               |   |   |-- couch_rep_att.beam
|               |   |   |-- couch_rep_changes_feed.beam
|               |   |   |-- couch_rep_httpc.beam
|               |   |   |-- couch_rep_missing_revs.beam
|               |   |   |-- couch_rep_reader.beam
|               |   |   |-- couch_rep_sup.beam
|               |   |   |-- couch_rep_writer.beam
|               |   |   |-- couch_server.beam
|               |   |   |-- couch_server_sup.beam
|               |   |   |-- couch_stats_aggregator.beam
|               |   |   |-- couch_stats_collector.beam
|               |   |   |-- couch_stream.beam
|               |   |   |-- couch_task_status.beam
|               |   |   |-- couch_util.beam
|               |   |   |-- couch_view.beam
|               |   |   |-- couch_view_compactor.beam
|               |   |   |-- couch_view_group.beam
|               |   |   `-- couch_view_updater.beam
|               |   |-- include
|               |   |   `-- couch_db.hrl
|               |   `-- priv
|               |       |-- couchspawnkillable
|               |       `-- lib
|               |           |-- couch_erl_driver.la
|               |           `-- couch_erl_driver.so
|               |-- erlang-oauth
|               |   `-- ebin
|               |       |-- oauth.app
|               |       |-- oauth.beam
|               |       |-- oauth_hmac_sha1.beam
|               |       |-- oauth_http.beam
|               |       |-- oauth_plaintext.beam
|               |       |-- oauth_unix.beam
|               |       `-- oauth_uri.beam
|               |-- etap
|               |   `-- ebin
|               |       |-- etap.beam
|               |       |-- etap_application.beam
|               |       |-- etap_can.beam
|               |       |-- etap_exception.beam
|               |       |-- etap_process.beam
|               |       |-- etap_report.beam
|               |       |-- etap_request.beam
|               |       |-- etap_string.beam
|               |       `-- etap_web.beam
|               |-- ibrowse-1.5.2
|               |   `-- ebin
|               |       |-- ibrowse.app
|               |       |-- ibrowse.beam
|               |       |-- ibrowse_app.beam
|               |       |-- ibrowse_http_client.beam
|               |       |-- ibrowse_lb.beam
|               |       |-- ibrowse_lib.beam
|               |       |-- ibrowse_sup.beam
|               |       `-- ibrowse_test.beam
|               `-- mochiweb-r97
|                   `-- ebin
|                       |-- mochifmt.beam
|                       |-- mochifmt_records.beam
|                       |-- mochifmt_std.beam
|                       |-- mochihex.beam
|                       |-- mochijson.beam
|                       |-- mochijson2.beam
|                       |-- mochinum.beam
|                       |-- mochiweb.app
|                       |-- mochiweb.beam
|                       |-- mochiweb_app.beam
|                       |-- mochiweb_charref.beam
|                       |-- mochiweb_cookies.beam
|                       |-- mochiweb_echo.beam
|                       |-- mochiweb_headers.beam
|                       |-- mochiweb_html.beam
|                       |-- mochiweb_http.beam
|                       |-- mochiweb_multipart.beam
|                       |-- mochiweb_request.beam
|                       |-- mochiweb_response.beam
|                       |-- mochiweb_skel.beam
|                       |-- mochiweb_socket_server.beam
|                       |-- mochiweb_sup.beam
|                       |-- mochiweb_util.beam
|                       `-- reloader.beam
|-- share
|   |-- couchdb
|   |   |-- server
|   |   |   `-- main.js
|   |   `-- www
|   |       |-- _sidebar.html
|   |       |-- config.html
|   |       |-- couch_tests.html
|   |       |-- custom_test.html
|   |       |-- database.html
|   |       |-- dialog
|   |       |   |-- _compact_database.html
|   |       |   |-- _create_database.html
|   |       |   |-- _delete_database.html
|   |       |   |-- _delete_document.html
|   |       |   |-- _save_view_as.html
|   |       |   `-- _upload_attachment.html
|   |       |-- document.html
|   |       |-- favicon.ico
|   |       |-- image
|   |       |   |-- add.png
|   |       |   |-- apply.gif
|   |       |   |-- bg.png
|   |       |   |-- cancel.gif
|   |       |   |-- compact.png
|   |       |   |-- delete-mini.png
|   |       |   |-- delete.png
|   |       |   |-- grippie.gif
|   |       |   |-- hgrad.gif
|   |       |   |-- load.png
|   |       |   |-- logo.png
|   |       |   |-- order-asc.gif
|   |       |   |-- order-desc.gif
|   |       |   |-- path.gif
|   |       |   |-- progress.gif
|   |       |   |-- rarrow.png
|   |       |   |-- run-mini.png
|   |       |   |-- run.png
|   |       |   |-- running.png
|   |       |   |-- save.png
|   |       |   |-- sidebar-toggle.png
|   |       |   |-- spinner.gif
|   |       |   |-- test_failure.gif
|   |       |   |-- test_success.gif
|   |       |   |-- thead-key.gif
|   |       |   |-- thead.gif
|   |       |   |-- toggle-collapse.gif
|   |       |   |-- toggle-expand.gif
|   |       |   `-- twisty.gif
|   |       |-- index.html
|   |       |-- replicator.html
|   |       |-- script
|   |       |   |-- couch.js
|   |       |   |-- couch_test_runner.js
|   |       |   |-- couch_tests.js
|   |       |   |-- futon.browse.js
|   |       |   |-- futon.format.js
|   |       |   |-- futon.js
|   |       |   |-- jquery.cookies.js
|   |       |   |-- jquery.couch.js
|   |       |   |-- jquery.dialog.js
|   |       |   |-- jquery.editinline.js
|   |       |   |-- jquery.form.js
|   |       |   |-- jquery.js
|   |       |   |-- jquery.resizer.js
|   |       |   |-- jquery.suggest.js
|   |       |   |-- json2.js
|   |       |   |-- oauth.js
|   |       |   |-- sha1.js
|   |       |   `-- test
|   |       |       |-- all_docs.js
|   |       |       |-- attachment_names.js
|   |       |       |-- attachment_paths.js
|   |       |       |-- attachment_views.js
|   |       |       |-- attachments.js
|   |       |       |-- basics.js
|   |       |       |-- batch_save.js
|   |       |       |-- bulk_docs.js
|   |       |       |-- changes.js
|   |       |       |-- compact.js
|   |       |       |-- config.js
|   |       |       |-- conflicts.js
|   |       |       |-- content_negotiation.js
|   |       |       |-- cookie_auth.js
|   |       |       |-- copy_doc.js
|   |       |       |-- delayed_commits.js
|   |       |       |-- design_docs.js
|   |       |       |-- design_options.js
|   |       |       |-- design_paths.js
|   |       |       |-- erlang_views.js
|   |       |       |-- etags_head.js
|   |       |       |-- etags_views.js
|   |       |       |-- form_submit.js
|   |       |       |-- http.js
|   |       |       |-- invalid_docids.js
|   |       |       |-- jsonp.js
|   |       |       |-- large_docs.js
|   |       |       |-- list_views.js
|   |       |       |-- lorem.txt
|   |       |       |-- lorem_b64.txt
|   |       |       |-- lots_of_docs.js
|   |       |       |-- multiple_rows.js
|   |       |       |-- oauth.js
|   |       |       |-- purge.js
|   |       |       |-- recreate_doc.js
|   |       |       |-- reduce.js
|   |       |       |-- reduce_builtin.js
|   |       |       |-- reduce_false.js
|   |       |       |-- replication.js
|   |       |       |-- rev_stemming.js
|   |       |       |-- security_validation.js
|   |       |       |-- show_documents.js
|   |       |       |-- stats.js
|   |       |       |-- update_documents.js
|   |       |       |-- utf8.js
|   |       |       |-- uuids.js
|   |       |       |-- view_collation.js
|   |       |       |-- view_conflicts.js
|   |       |       |-- view_errors.js
|   |       |       |-- view_include_docs.js
|   |       |       |-- view_multi_key_all_docs.js
|   |       |       |-- view_multi_key_design.js
|   |       |       |-- view_multi_key_temp.js
|   |       |       |-- view_offsets.js
|   |       |       |-- view_pagination.js
|   |       |       |-- view_sandboxing.js
|   |       |       `-- view_xml.js
|   |       |-- status.html
|   |       `-- style
|   |           `-- layout.css
|   |-- doc
|   |   `-- couchdb
|   |       |-- AUTHORS.gz
|   |       |-- BUGS.gz
|   |       |-- CHANGES.gz
|   |       |-- NEWS.gz
|   |       |-- README.gz
|   |       `-- THANKS.gz
|   `-- man
|       `-- man1
|           |-- couchdb.1
|           `-- couchjs.1
`-- var
|-- lib
|   `-- couchdb
|-- log
|   `-- couchdb
`-- run
`-- couchdb

46 directories, 238 files
[bpdp@bpdp-arch couchdb]$ 

Untuk memudahkan jika nanti akan menjalankan server Apache CouchDB, buat file teks yang bisa di-source berikut ini:

[bpdp@bpdp-arch environment]$ cat couchdb
C_HOME=/home/bpdp/software/couchdb

PATH=$PATH:$C_HOME/bin
MANPATH=$MANPATH:$C_HOME/share/man

export PATH
export MANPATH
[bpdp@bpdp-arch environment]$ 

Setelah itu, setiap kali akan menggunakan Apache CouchDB, kerjakan perintah berikut:

$ source environment/couchdb

Asumsi: file tersebut berada di direktori $HOME/environment

Untuk menjalankan server Apache CouchDB, gunakan couchdb yang terletak pada direktori bin hasil instalasi berikut ini:

[bpdp@bpdp-arch ~]$ couchdb 
Apache CouchDB 0.10.1 (LogLevel=info) is starting.
Apache CouchDB has started. Time to relax.
[info] [<0.2.0>] Apache CouchDB has started on http://127.0.0.1:5984/

Setelah muncul pemberitahuan di atas, berarti Apache CouchDB telah berjalan pada alamat URL tersebut. Meskipun memungkinkan menggunakan REST untuk mengakses database ini, pada awalnya, kita mungkin akan banyak berurusan dengan utilitas yang bisa diakses melalui http://127.0.0.1:5984/_utils/index.html berikut ini:


Aplikasi utilitas ini dikenal dengan nama Futon.

Monday, March 1, 2010

Erlang – Instalasi dan Konfigurasi Awal

Tentang Erlang

Tulisan ini sedikit untuk memberikan gambaran tentang Erlang. Erlang adalah bahasa pemrograman sekaligus nama peranti pengembangannya. Erlang adalah software bebas dan bisa diperoleh di website Erlang. Erlang didesain oleh Joe Armstrong dan kebanyakan digunakan di berbagai proyek telekomunikasi dari Ericsson. Nama Erlang diambil dari 2 hal yaitu Ericsson Language serta nama orang (A. K Erlang). Erlang kebanyakan digunakan pada aplikasi yang bersifat Fault-Tolerant, Real Time, dan Concurrent. Erlang juga mendukung pengembangan aplikasi untuk SMP (Symmetric MultiProcessing) sejak rilis R11B (bulan mei 2006).

Versi Software

Tulisan ini menggunakan versi R13B04 (rilis 24 Februari 2010). Erlang tersedia untuk versi Windows (binary) dan versi source code. Beberapa distribusi Linux (dan BSD?) menyertakan Erlang ke dalam masing-masing distro (diantaranya adalah Arch Linux, Fedora, CentOS, dan lain-lain). Jika memilih menggunakan paket dari distro maka bisa digunakan mekanisme instalasi (yum, pacman, apt-get, etc) dari berbagai distro tersebut. Tulisan ini akan menggunakan distribusi source code.

Untuk bisa mengkompilasi, diperlukan paket development tools (gcc toolchains, serta berbagai pustaka dan paket software lainnya). Untuk mengkompilasi Erlang menjadi paket binari diperlukan berbagai paket berikut (beberapa merupakan paket opsional, tergantung parameter pada saat kompilasi):
  • Perl 5
  • GNU m4
  • ncurses
  • OpenSSL
  • JDK
  • X Window
  • sed
  • Flex
Instalasi

Ada 1 paket source code yang harus diambil dan ada 2 dokumentasi (HTML dan man) yang sifatnya opsional. Semua distribusi ini bisa diperoleh di:
http://www.erlang.org/download.html.
Untuk keperluan ini, Erlang diasumsikan diinstall di direktori /opt/software/erlang (buat dulu direktori ini jika belum ada) dan direktori tempat kita menyimpan hasil download erlang ada di /home/bpdp/master/erlang. Berikut adalah langkah-langkah untuk instalasi:

cd /home/bpdp/master/erlang
tar -xzvf otp_src_R13B04.tar.gz
cd otp_src_R13B04
./configure –prefix=/opt/software/erlang –enable-smp-support  –enable-hipe
make
make install

Hasil dari langkah tersebut adalah:

[bpdp@bpdp-arch otp_src_R13B04]$ ls -la /opt/software/erlang
total 16
drwxr-xr-x 4 bpdp users 4096 2010-03-15 06:49 .
drwxr-xr-x 9 bpdp users 4096 2010-03-15 07:02 ..
drwxr-xr-x 2 bpdp users 4096 2010-03-15 06:49 bin
drwxr-xr-x 3 bpdp users 4096 2010-03-15 06:49 lib
[bpdp@bpdp-arch otp_src_R13B04]$

Keterangan:
  • bin adalah direktori tempat link ke berbagai script executable
  • lib/erlang merupakan direktori utama tempat Erlang diinstall

Konfigurasi Environment Variables

Supaya instalasi Erlang dikenali setiap kali login, letakkan baris-baris berikut pada $HOME/.bashrc

E_HOME=/opt/software/erlang
PATH=$PATH:$E_HOME/bin
MANPATH=$PATH:$E_HOME/lib/erlang/man
export PATH
export MANPATH

Instalasi Dokumentasi

Dokumentasi harus diletakkan pada lokasi instalasi dari Erlang (/opt/software/erlang/lib/erlang). Berikut ini adalah cara instalasi dokumentasi:

cd /opt/software/erlang/lib/erlang
tar -xzvf /path/to/otp_doc_man_R13B04.tar.gz

Let’s Try Erlang!

Untuk mencoba Erlang, berikut akan digunakan salah satu contoh untuk mencari fakturial yang diambil dari manual Erlang. Source code disimpan dalam file tut1.erl berikut ini:

-module(tut1).
-export([fac/1]).

fac(1) ->
1;
fac(N) ->
N * fac(N - 1).

File source code dari Erlang akan dikompilasi menjadi file .beam yang akan dijalankan oleh Erlang VM. Berikut adalah langkah untuk mengkompilasi dan menggunakan modul yang telah terkompilasi tersebut (ini hanya sebagai gambaran awal saja):

[bpdp@bpdp-arch erlang]$ erl
Erlang R13B04 (erts-5.7.5) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.7.5  (abort with ^G)
1> c(tut1).
{ok,tut1}
2> tut1:fac(4).
24
3>
User switch command
--> q
[bpdp@bpdp-arch erlang]$


Untuk keluar dari Eshell, tekan [Ctrl]-G kemudian tekan q.

Selamat mencoba!