Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-3585

Compact protocol implementation for Lua

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.9.3
    • 0.10.0
    • Lua - Library
    • Linux Mac Windows

    • Patch Available
    • Patch

    Description

      This is compact protocol lua implement for thrift.
      Here are some description for each source code file.

      luabpack.c
      To add bits operation function for thrift compact protocol.
      new functions:
      l_i64ToZigza,l_i32ToZigzag,l_zigzagToI32,l_zigzagToI64,l_toVarint32,l_toVarint64,l_packMesgType.

      TCompactProtocol.lua
      new source of lua for thrift compact protocol.

      compact_protocol_client.lua
      test client source code for thrift compact protocol.

      compact_protocol_server.lua
      test server source code for thrift compact protocol.

      rpc.thrift
      test thrift IDL file for test case(compact_protocol_client.lua,compact_protocol_server.lua).

      pcap offset hex of rpc test service.txt
      This is dump file create by tcpdump for test case.

      Test cases:
      client <--------------> server
      compact_protocol_client.lua compact_server.go (golang thrift server)
      compact_client.go (golang thrift client) compact_protocol_server.lua
      compact_protocol_client.lua compact_protocol_server.lua

      Test console log:
      log for compact_protocol_client.lua:
      1 return 1 by FunCall.
      2 return 2 by FunCall.

      log for compact_protocol_server.lua:
      53 54 12 43 11.22 str value
      53 54 12 34 11.22 login
      name namess
      pass vpass
      10 val10
      20 val20
      ele1
      ele3
      ele2
      l1.
      l2.

      Attachments

        Activity

          People

            gityf WangYaofu
            gityf WangYaofu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: