[Groonga-commit] groonga/express-droonga at 696dc83 [master] model: rename droonga client -> droonga cluster request converer key

Back to archive index

YUKI Hiroshi yuki****@clear*****
Wed Jul 24 10:30:13 JST 2013


HTTPの通信モデルだとrequestConverter/responseConverterで適切なのですが、 
特にSocket.IOを使用したAPIで登場するPublish−Subscribe型の通信のように 
「どっちがリクエストでどっちがレスポンス、という対応関係にない」パターン 
があり得ます。(fluent-plugin-droonga側からプッシュ配信する事が考えられ 
るので)

それらも包括して抽象化した名前付けとして、敢えてrequest/responseの対にせ 
ず toBackend/toClientという対にしていたのですが、その点で問題はないとの 
お考えでしょうか?

自分としては、HTTPのようにreq/repの関係が明確な場合だけはその名前を使 
う、ということであればアリだと思います。
ただその場合も、基底クラス的には自分はより抽象的な toBackend/toClientが 
適切なのではないかと思っていますが……


Kouhei Sutou wrote:
> Author
>     Kouhei Sutou <kou �� clear-code.com>
> Date
>     2013-07-23 22:16:12 +0900 (Tue, 23 Jul 2013)
> New Revision
>     696dc8375ba65de61538bcdff0c0332bea051f3f
>     <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f>
> Message
>
>     model: rename droonga client -> droonga cluster request converer key
>
>     toBackend ->
>     requestConverter
>
> Modified files
>
>       * lib/adapter/api/groonga.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-0>
>       * lib/adapter/api/model.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-1>
>       * lib/adapter/api/rest.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-2>
>       * lib/adapter/http.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-3>
>       * lib/adapter/socket.io.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-4>
>       * test/adapter/rest.test.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-5>
>       * test/adapter/socket.io.test.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-6>
>       * test/express-adapter.test.js
>         <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#diff-7>
>
>    Modified: lib/adapter/api/groonga.js (+1 -1)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L2>
> 3  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L5>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L6>
>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L7>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0L9>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R2>
> 3  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R5>
>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R6>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R7>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L0R9>
>
> 	
>
> @@ -3,7 +3,7 @@var model = require('./model');
>   module.exports = {
>     'groonga': new model.HTTPCommand({
>       path: '/d/:commandName',
> -    toBackend: function(commandName, request) {
> +    requestConverter: function(commandName, request) {
>         return [request.params.commandName, request.query];
>       }
>     })
>
>    Modified: lib/adapter/api/model.js (+3 -3)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L2>
> 3  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L5>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L6>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L7>
>
>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L10>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L42>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L43>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L44>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L45>
>
> 46  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L46>
> 47  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L47>
> 48  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1L48>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R2>
> 3  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R5>
>
>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R6>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R7>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R10>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R42>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R43>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R44>
>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R45>
> 46  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R46>
> 47  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R47>
> 48  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L1R48>
>
> 	
>
> @@ -3,8 +3,8 @@function CommandModel(options) {
>     this._modelTypes = [];
>   }
>   CommandModel.prototype = {
> -  get toBackend() {
> -    return this._options.toBackend;
> +  get requestConverter() {
> +    return this._options.requestConverter;
>     },
>     get responseConverter() {
>       return this._options.responseConverter;
> @@ -42,7 +42,7 @@function HTTPCommand(options) {
>     RequestResponse.apply(this, arguments);
>     this._modelTypes.push(HTTPCommand);
>     // default handler
> -  this._options.toBackend = this._options.toBackend || function(event, request) {
> +  this._options.requestConverter = this._options.requestConverter || function(event, request) {
>       return [event, {}];
>     };
>   }
>
>    Modified: lib/adapter/api/rest.js (+8 -8)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L5>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L6>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L7>
>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L10>
> 11  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L11>
>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L12>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L13>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L14>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L15>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L18>
>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L22>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L23>
>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L24>
> 25  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L25>
> 26  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L26>
> 27  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L27>
> 28  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L28>
>
> 29  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L29>
> 30  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L30>
> 31  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L31>
> 32  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L32>
> 33  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L33>
>
> 34  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L34>
> 35  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L35>
> 36  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L36>
> 37  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L37>
> 38  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L38>
>
> 39  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L39>
> 40  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L40>
> 41  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L42>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L43>
>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L44>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2L45>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R3>
> 4  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R4>
> 5  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R5>
> 6  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R6>
>
> 7  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R7>
> 8  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R8>
> 9  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R10>
>
> 11  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R11>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R12>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R13>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R14>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R15>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R17>
>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R22>
>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R23>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R24>
> 25  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R25>
> 26  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R26>
> 27  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R27>
>
> 28  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R28>
> 29  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R29>
> 30  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R30>
> 31  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R31>
> 32  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R32>
>
> 33  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R33>
> 34  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R34>
> 35  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R35>
> 36  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R36>
> 37  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R37>
>
> 38  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R38>
> 39  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R39>
> 40  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R40>
> 41  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R42>
>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R43>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R44>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L2R45>
>
> 	
>
> @@ -4,42 +4,42 @@var requestBuilders = require('./rest-request-builder');
>   module.exports = {
>   //  'status': new model.HTTPCommand({
>   //    path: '/status/:target',
> -//    toBackend: requestBuilders.status
> +//    requestConverter: requestBuilders.status
>   //  }),
>     'search': new model.HTTPCommand({
>       path: '/tables/:tableName',
> -    toBackend: function(event, request) {
> +    requestConverter: function(event, request) {
>         return [event, requestBuilders.search(request)];
>       }
>     }) //,
>   //  'createtable': new model.HTTPCommand({
>   //    method: 'PUT',
>   //    path: '/tables/:tableName',
> -//    toBackend: requestBuilders.createTable
> +//    requestConverter: requestBuilders.createTable
>   //  }),
>   //  'removetable': new model.HTTPCommand({
>   //    method: 'DELETE',
>   //    path: '/tables/:tableName',
> -//    toBackend: requestBuilders.removeTable
> +//    requestConverter: requestBuilders.removeTable
>   //  }),
>   //  'createcolumn': new model.HTTPCommand({
>   //    method: 'PUT',
>   //    path: '/tables/:tableName/columns/:columnName',
> -//    toBackend: requestBuilders.createColumn
> +//    requestConverter: requestBuilders.createColumn
>   //  }),
>   //  'removecolumn': new model.HTTPCommand({
>   //    method: 'DELETE',
>   //    path: '/tables/:tableName/columns/:columnName',
> -//    toBackend: requestBuilders.removeColumn
> +//    requestConverter: requestBuilders.removeColumn
>   //  }),
>   //  'loadrecord': new model.HTTPCommand({
>   //    method: 'PUT',
>   //    path: '/tables/:tableName/records/:key',
> -//    toBackend: requestBuilders.loadRecord
> +//    requestConverter: requestBuilders.loadRecord
>   //  }),
>   //  'loadrecords': new model.HTTPCommand({
>   //    method: 'PUT',
>   //    path: '/tables/:tableName/records',
> -//    toBackend: requestBuilders.loadRecords
> +//    requestConverter: requestBuilders.loadRecords
>   //  })
>   };
>
>    Modified: lib/adapter/http.js (+2 -2)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L10>
> 11  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L11>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L12>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L13>
>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L14>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L15>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L19>
>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3L22>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R9>
> 10  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R10>
> 11  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R11>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R12>
>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R13>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R14>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R15>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R18>
>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L3R22>
>
> 	
>
> @@ -10,13 +10,13 @@function createHandler(params) {
>     var commandName = params.name;
>     var definition = params.definition;
>
> -  if (!definition.toBackend)
> +  if (!definition.requestConverter)
>       throw new Error('no filter for the backend: ' + commandName);
>
>     return (function(request, response) {
>       debug('adapter.http.createHandler.handle');
>
> -    var result = definition.toBackend(commandName, request);
> +    var result = definition.requestConverter(commandName, request);
>       var messageType = result[0];
>       var body = result[1];
>       var timeout = body.timeout || null;
>
>    Modified: lib/adapter/socket.io.js (+2 -2)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L40>
> 41  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L42>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L43>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L44>
>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L45>
> 46  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L46>
>
> 47  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L47>
> 48  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L48>
> 49  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4L49>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R40>
> 41  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R41>
> 42  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R42>
> 43  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R43>
>
> 44  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R44>
> 45  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R45>
>
> 46  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R46>
> 47  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R47>
> 48  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R48>
> 49  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L4R49>
>
> 	
>
> @@ -41,9 +41,9 @@exports.register = function(application, server, params) {
>         clientOptions = clientOptions || {};
>
>         var event = commandName;
> -      if (commandDefinition.toBackend) {
> +      if (commandDefinition.requestConverter) {
>           try {
> -          var result = commandDefinition.toBackend(event, data);
> +          var result = commandDefinition.requestConverter(event, data);
>             event = result[0];
>             data = result[1];
>           } catch(error) {
>
>    Modified: test/adapter/rest.test.js (+1 -1)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L75>
> 76  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L76>
> 77  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L77>
> 78  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L78>
> 79  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L79>
>
> 80  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L80>
> 81  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L81>
> 82  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5L82>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R75>
> 76  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R76>
> 77  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R77>
> 78  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R78>
>
> 79  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R79>
> 80  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R80>
> 81  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R81>
> 82  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L5R82>
>
> 	
>
> @@ -76,7 +76,7 @@suite('HTTP Adapter', function() {
>       var testPlugin = {
>         adapter: new model.HTTPCommand({
>           path: '/path/to/adapter',
> -        toBackend: function(event, request) { return [event, 'adapter requested']; },
> +        requestConverter: function(event, request) { return [event, 'adapter requested']; },
>           responseConverter: function(event, data) { return [event, 'adapter OK']; }
>         })
>       };
>
>    Modified: test/adapter/socket.io.test.js (+4 -4)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L21>
>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L22>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L23>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L24>
> 25  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L25>
>
> 26  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L26>
> 27  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L27>
> 28  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L28>
> 29  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L29>
> 30  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L30>
>
> 31  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L31>
> 32  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L32>
> 33  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L33>
> 34  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L34>
>
> 35  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L35>
> 36  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L36>
> 37  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6L37>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R20>
>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R22>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R23>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R24>
>
> 25  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R25>
> 26  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R26>
> 27  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R27>
> 28  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R28>
> 29  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R29>
>
> 30  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R30>
> 31  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R31>
> 32  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R32>
> 33  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R33>
>
> 34  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R34>
> 35  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R35>
> 36  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R36>
> 37  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L6R37>
>
> 	
>
> @@ -18,20 +18,20 @@suite('Socket.IO Adapter', function() {
>     var testPlugin = {
>       'reqrep': new model.SocketRequestResponse(),
>       'reqrep-mod-event': new model.SocketRequestResponse({
> -      toBackend: function(event, data) { return [event + '.mod', data]; },
> +      requestConverter: function(event, data) { return [event + '.mod', data]; },
>         responseConverter: function(event, data) { return [event + '.mod', data]; }
>       }),
>       'reqrep-mod-body': new model.SocketRequestResponse({
> -      toBackend: function(event, data) { return [event, 'modified request']; },
> +      requestConverter: function(event, data) { return [event, 'modified request']; },
>         responseConverter: function(event, data) { return [event, 'modified response']; }
>       }),
>       'pubsub': new model.SocketPublishSubscribe(),
>       'pubsub-mod-event': new model.SocketPublishSubscribe({
> -      toBackend: function(event, data) { return [event + '.mod', data]; },
> +      requestConverter: function(event, data) { return [event + '.mod', data]; },
>         responseConverter: function(event, data) { return [event + '.mod', data]; }
>       }),
>       'pubsub-mod-body': new model.SocketPublishSubscribe({
> -      toBackend: function(event, data) { return [event, 'modified request']; },
> +      requestConverter: function(event, data) { return [event, 'modified request']; },
>         responseConverter: function(event, data) { return [event, 'modified response']; }
>       })
>     };
>
>    Modified: test/express-adapter.test.js (+2 -2)
> ===================================================================
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L11>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L12>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L13>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L14>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L15>
>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L20>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L21>
>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L22>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L23>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7L24>
>
> 	
>
> ...  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R11>
> 12  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R12>
> 13  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R13>
> 14  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R14>
>
> 15  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R15>
> 16  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R16>
> 17  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R17>
> 18  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R18>
> 19  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R19>
> 20  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R20>
>
> 21  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R21>
> 22  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R22>
> 23  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R23>
> 24  <https://github.com/groonga/express-droonga/commit/696dc8375ba65de61538bcdff0c0332bea051f3f#L7R24>
>
> 	
>
> @@ -12,13 +12,13 @@suite('Adaption for express application', function() {
>     var testRestPlugin = {
>       api: new model.HTTPCommand({
>         path: '/path/to/api',
> -      toBackend: function(event, request) { return [event, 'api requested']; },
> +      requestConverter: function(event, request) { return [event, 'api requested']; },
>         responseConverter: function(event, data) { return [event, 'api OK']; }
>       })
>     };
>     var testSocketPlugin = {
>       api: new model.SocketRequestResponse({
> -      toBackend: function(event, data) { return [event, 'api requested']; },
> +      requestConverter: function(event, data) { return [event, 'api requested']; },
>         responseConverter: function(event, data) { return [event, 'api OK']; }
>       })
>     };
>
>
>
> _______________________________________________
> Groonga-commit mailing list
> Groonga-commit �� lists.sourceforge.jp
> http://lists.sourceforge.jp/mailman/listinfo/groonga-commit
>

-- 
結城 洋志 <YUKI Hiroshi>
E-mail: yuki �� clear-code.com

株式会社クリアコード
〒113-0033 東京都文京区本郷3-27-12
            本郷デントビル2階
TEL : 03-6231-7270
FAX : 03-6231-7271
WWW : http://www.clear-code.com/




More information about the Groonga-commit mailing list
Back to archive index