Uploaded image for project: 'Apache Avro'
  1. Apache Avro
  2. AVRO-695

Cycle Reference Support

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.6
    • 1.8.0
    • spec
    • None
    • -Cyclic reference support

    Description

      This is a proposed implementation to add cycle reference support to Avro. It basically introduce a new type named Cycle. Cycles contains a string representing the path to the other reference.

      For example if we have an object of type Message that have a member named previous with type Message too. If we have have this hierarchy:

      message
      previous : message2

      message2
      previous : message2

      When serializing the cycle path for "message2.previous" will be "previous".

      The implementation depend on ANTLR to evaluate those cycle at read time to resolve them. I used ANTLR 3.2. This dependency is not mandated; I just used ANTLR to speed thing up. I kept in this implementation the generated code from ANTLR though this should not be the case as this should be generated during the build. I only updated the Java code.

      I did not make full unit testing but you can find "avrotest.Main" class that can be used a preliminary test.

      Please do not hesitate to contact me for further clarification if this seems interresting.

      Best regards,
      Moustapha Cherri

      Attachments

        1. PERF_8000_cycles.zip
          7 kB
          Sachin Goyal
        2. circular_refs_and_nonstring_map_keys_2014_06_25.zip
          11 kB
          Sachin Goyal
        3. AVRO-695.patch
          37 kB
          Doug Cutting
        4. AVRO-695.patch
          35 kB
          Sachin Goyal
        5. avro-1.4.1-cycle.patch.gz
          41 kB
          Moustapha Cherri
        6. avro-1.4.1-cycle.patch.gz
          43 kB
          Moustapha Cherri
        7. avro_circular_refs7.patch
          38 kB
          Sachin Goyal
        8. avro_circular_refs6.patch
          40 kB
          Sachin Goyal
        9. avro_circular_refs_2014_06_14.zip
          7 kB
          Sachin Goyal
        10. avro_circular_references.zip
          4 kB
          Sachin Goyal

        Activity

          People

            rdblue Ryan Blue
            mcherri Moustapha Cherri
            Votes:
            4 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 672h
                672h
                Remaining:
                Remaining Estimate - 672h
                672h
                Logged:
                Time Spent - Not Specified
                Not Specified