HAYASHI Kentaro
null+****@clear*****
Thu Feb 26 18:28:15 JST 2015
HAYASHI Kentaro 2015-02-26 18:28:15 +0900 (Thu, 26 Feb 2015) New Revision: 8af46ab6b8aaa80cfe80d1d3245e1e19a6826c6e https://github.com/groonga/groonga/commit/8af46ab6b8aaa80cfe80d1d3245e1e19a6826c6e Message: doc: drop GQTP section from tutorial Recommends HTTP for remote access Modified files: doc/source/spec/gqtp.rst doc/source/tutorial/network.rst Modified: doc/source/spec/gqtp.rst (+66 -1) =================================================================== --- doc/source/spec/gqtp.rst 2015-02-26 18:13:07 +0900 (27aeb12) +++ doc/source/spec/gqtp.rst 2015-02-26 18:28:15 +0900 (5bcacc3) @@ -206,7 +206,72 @@ use ``MORE`` flag. Example ------- -TODO +How to run a GQTP server +^^^^^^^^^^^^^^^^^^^^^^^^ + +Groonga has a special protocol, named Groonga Query Transfer Protocol (GQTP), for remote access to a database. The following form shows how to run Groonga as a GQTP server. + +Form:: + + groonga [-p PORT_NUMBER] -s DB_PATH + +The `-s` option specifies to run Groonga as a server. DB_PATH specifies the path of the existing database to be hosted. The `-p` option and its argument, PORT_NUMBER, specify the port number of the server. The default port number is 10043, which is used when you don't specify PORT_NUMBER. + +The following command runs a server that listens on the default port number. The server accepts operations to the specified database. + +Execution example:: + + % groonga -s /tmp/groonga-databases/introduction.db + Ctrl-c + % + +How to run a GQTP daemon +^^^^^^^^^^^^^^^^^^^^^^^^ + +You can also run a GQTP server as a daemon by using the `-d` option, instead of the `-s` option. + +Form:: + + groonga [-p PORT_NUMBER] -d DB_PATH + +A Groonga daemon prints its process ID as follows. In this example, the process ID is 12345. Then, the daemon opens a specified database and accepts operations to that database. + +Execution example:: + + % groonga -d /tmp/groonga-databases/introduction.db + 12345 + % + +How to run a GQTP client +^^^^^^^^^^^^^^^^^^^^^^^^ + +You can run Groonga as a GQTP client as follows: + +Form:: + + groonga [-p PORT_NUMBER] -c [HOST_NAME_OR_IP_ADDRESS] + +This command establishes a connection with a GQTP server and then enters into interactive mode. HOST_NAME_OR_IP_ADDRESS specifies the hostname or the IP address of the server. If not specified, Groonga uses the default hostname "localhost". The `-p` option and its argument, PORT_NUMBER, specify the port number of the server. If not specified, Groonga uses the default port number 10043. + +.. groonga-command +.. include:: ../example/tutorial/network-1.log +.. .. % groonga -c +.. status +.. .. > ctrl-d +.. .. % + +In interactive mode, Groonga reads commands from the standard input and executes them one by one. + +How to terminate a GQTP server +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +You can terminate a GQTP server with a :doc:`/reference/commands/shutdown` command. + +.. groonga-command +.. include:: ../example/tutorial/network-2.log +.. .. % groonga -c +.. .. > shutdown +.. .. % See also -------- Modified: doc/source/tutorial/network.rst (+0 -70) =================================================================== --- doc/source/tutorial/network.rst 2015-02-26 18:13:07 +0900 (b775c03) +++ doc/source/tutorial/network.rst 2015-02-26 18:28:15 +0900 (2ad9e78) @@ -12,76 +12,6 @@ Remote access You can use Groonga as a server which allows remote access. Groonga supports the original protocol (GQTP), the memcached binary protocol and HTTP. -Groonga Query Transfer Protocol (GQTP) --------------------------------------- - -How to run a GQTP server -^^^^^^^^^^^^^^^^^^^^^^^^ - -Groonga has a special protocol, named Groonga Query Transfer Protocol (GQTP), for remote access to a database. The following form shows how to run Groonga as a GQTP server. - -Form:: - - groonga [-p PORT_NUMBER] -s DB_PATH - -The `-s` option specifies to run Groonga as a server. DB_PATH specifies the path of the existing database to be hosted. The `-p` option and its argument, PORT_NUMBER, specify the port number of the server. The default port number is 10043, which is used when you don't specify PORT_NUMBER. - -The following command runs a server that listens on the default port number. The server accepts operations to the specified database. - -Execution example:: - - % groonga -s /tmp/groonga-databases/introduction.db - Ctrl-c - % - -How to run a GQTP daemon -^^^^^^^^^^^^^^^^^^^^^^^^ - -You can also run a GQTP server as a daemon by using the `-d` option, instead of the `-s` option. - -Form:: - - groonga [-p PORT_NUMBER] -d DB_PATH - -A Groonga daemon prints its process ID as follows. In this example, the process ID is 12345. Then, the daemon opens a specified database and accepts operations to that database. - -Execution example:: - - % groonga -d /tmp/groonga-databases/introduction.db - 12345 - % - -How to run a GQTP client -^^^^^^^^^^^^^^^^^^^^^^^^ - -You can run Groonga as a GQTP client as follows: - -Form:: - - groonga [-p PORT_NUMBER] -c [HOST_NAME_OR_IP_ADDRESS] - -This command establishes a connection with a GQTP server and then enters into interactive mode. HOST_NAME_OR_IP_ADDRESS specifies the hostname or the IP address of the server. If not specified, Groonga uses the default hostname "localhost". The `-p` option and its argument, PORT_NUMBER, specify the port number of the server. If not specified, Groonga uses the default port number 10043. - -.. groonga-command -.. include:: ../example/tutorial/network-1.log -.. .. % groonga -c -.. status -.. .. > ctrl-d -.. .. % - -In interactive mode, Groonga reads commands from the standard input and executes them one by one. - -How to terminate a GQTP server -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -You can terminate a GQTP server with a :doc:`/reference/commands/shutdown` command. - -.. groonga-command -.. include:: ../example/tutorial/network-2.log -.. .. % groonga -c -.. .. > shutdown -.. .. % - Memcached binary protocol ------------------------- -------------- next part -------------- HTML����������������������������...Download