Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-13967

Refactor and improve performance of python thin client marshaller

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • thin client
    • Docs Required, Release Notes Required

    Description

      Currently implemented serialization has questionable design and suffers from some problems
      1. It is tightly coupled with Client object
      2. It doesn't use protocol feature that total length of message is in the header,
      thus it constantly load from Client some data instead of iteration over byte array.
      3. It uses some tricky hacks and sometimes new connection is created when deserializing object.
      4. It constantly allocates bytes (immutable data structure).

      I suggest to rewrite serialization and deserialization:
      1. Pass to corresponding methods specific SerDe context + BytesIO
      2. Context can be sync and async and contains specific flags and methods for loading/uploading binary object schemas
      3. Refactor Client in order to retrieve full packet from socket at once then pass full packet futher.

      These steps can significantly improve performance, reduce amount of allocations and give
      foundation for implementing asyncio version of client.

      Attachments

        Issue Links

          Activity

            People

              ivandasch Ivan Daschinsky
              ivandasch Ivan Daschinsky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m