Loading ...
Sorry, an error occurred while loading the content.

Re: [soapbuilders] Re: Sparse array interoperability

Expand Messages
  • Rich Salz
    It seems that one problem folks are having is that they think sparse arrays are a generic tool, suitable for *any* array. That s not the case. They are an
    Message 1 of 60 , Sep 3, 2001
    • 0 Attachment
      It seems that one problem folks are having is that they think sparse
      arrays are a generic tool, suitable for *any* array.

      That's not the case. They are an efficient and standard way of meeting
      a particular need. I tried to describe that need in a previous message.

      *IF* we want to test sparse interop, designing the test will need some
      thought: a blind echo isn't worth much. How about
      client sends a sparse array, and an array of subscripts and a default
      value
      server responds with the specified values, as an array?
    • NAKAMURA, Hiroshi
      Hi Paul, ... In SOAP4R; Using low level API, user application gets an instance of SOAPArray class in either case of usual array/sparse array. Using high level
      Message 60 of 60 , Sep 4, 2001
      • 0 Attachment
        Hi Paul,

        > From: Paul Kulchenko [mailto:paulclinger@...]
        > Sent: Tuesday, September 04, 2001 9:13 AM

        > > I do not think so. If sparse array is not interoperable
        > > with usual array, it does not have to be an array.

        > If this is correct then question is "how"? How usual array should
        > look like in this case? In my current implementation, sparse array is
        > the same as array with undef/null elements, but I'm not sure it's
        > correct.

        In SOAP4R;

        Using low level API, user application gets an instance of
        SOAPArray class in either case of usual array/sparse array.
        Using high level API, user application gets an instance of
        common Array class in Ruby in either case. Sparse array is
        the same as usual array with nil elements in high level API.
        User application which wants to use sparse array must use
        low level API.

        So I must build echo interop server using low level API
        when the interop echo R2 application adopts Option 5.

        > > We sometimes want the array including indeterminate elements
        > > (such as VARIANT ARRAY with many Empty in COM, array with
        > > many undef-s in Perl). We can reduce transmitted data
        > > using Sparse array to pass these type of array. I believe
        > > SOAP authors introduce Sparse array for this purpose.

        > how implementation should look like in this case? Would you scan
        > EVERY array to check how many nulls are there? Would you allow user
        > (who doesn't care about it) tell that he want to have "sparse" array
        > on wire? It does make sense ONLY if there is already some type in a
        > language that implements sparse arrays. But I do not expect SOAP
        > processor to be so smart and choose between array and sparse array
        > checking number of empty elements.

        In SOAP4R, SOAP node knows whether it is an usual array or
        sparse array. When receiving an array, with "offset" or
        "position" attribute, SOAP4R recognize it as a sparse array.
        When sending an array, user application must define it as
        a sparse array by low level API.

        I mean, SOAP4R consider a partial array with "offset" as a
        sparse array. It could be an error under lexical context
        of SOAP spec, but I think these 2 special arrays is for the
        same purpose.

        > > > It's very similar to difference between multidimensional arrays
        > > and
        > > > arrays of arrays. Will you accept array of arrays as echo for
        > > > multidimensional array?
        > > I disagree here. Common array and Sparse array have same
        > > type of content (arrayType). 1D-Array and 2D-Array have
        > > different arrayType.
        > That's true. My point was different. They look different on wire, but
        > they are the same in some languages (Perl for example). So, you're
        > saying that they are indeed different and you do NOT accept one as
        > echo for another one. That's similar to my point about sparse arrays.
        > Ther MAY look the same as usual array in your language, but they are
        > different. Looks like I'm the only one who support this point of view
        > ;).
        >
        > Let me summarize. This discussion was started from echoArray problem
        > when you send sparse array and I send back usual array where omitted
        > elements are nulls. How correct is it? Definitely what I'm sending
        > back IS NOT a sparse array. So what? Is it proper echo? Andrew's
        > point was that sparse array and array with nulls ARE NOT the same. In
        > theory (sorry, Andrew ;)). How about practice? If I CANNOT echo usual

        In SOAP data model level, we know we cannot define how we
        should do, don't we? In the R2 echo application level, we
        are discussing how we should do for testing inteoperability
        in a most effective way, I think.

        Someone like Option 5, someone like Option 1. I can accept
        Option 5. Which do you like?

        Options:
        http://groups.yahoo.com/group/soapbuilders/message/5128

        Regards,
        // NaHi

        PS. I'm sorry if I'm blunt because of my poor English...
      Your message has been successfully submitted and would be delivered to recipients shortly.