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

Re: [soapbuilders] Re: Sparse array interoperability

Expand Messages
  • Andrew Layman
    Thanks. This thread, with the explicit connection to DCE, adds a lot to the description. Andrew Layman http://strongbrains.com -- Resources for
    Message 1 of 60 , Aug 31, 2001
      Thanks. This thread, with the explicit connection to DCE, adds a lot to the

      Andrew Layman
      http://strongbrains.com -- Resources for Self-Education
      ----- Original Message -----
      From: "Rich Salz" <rsalz@...>
      To: "Bob Cunnings" <cunnings@...>
      Cc: <soapbuilders@yahoogroups.com>
      Sent: Friday, August 31, 2001 5:41 PM
      Subject: Re: [soapbuilders] Re: Sparse array interoperability

      > Let me try to rephrase this. What you are saying is that the sparse
      > array is the result of a "masking" operation of sorts on a source
      > array?.

      Sort of.

      Think of it more like each side allocates the whole array, but only part
      of it is transmitted at any one time.

      Using the "hello world" of web serivces: stock quotes.

      Client connects to server and sends up a list of 200 stocks it's
      interested in. It sends up an array of <ticker,last-known-price>.

      Later on, client sends "gimme the big gainers" request. Server sends
      down a sparse array of <ticker,last-known-price>. The client
      application can just unpack that array directly on top of the client's
      previous copy, updating only the changed values. In this case, sparse
      arrays are used for "transmitting delta's".

      Another application is search a huge crypto keyspace, or SETI@HOME.
      Everyone gets an array with "the big picture," but each worker machine
      gets a sparse array that has the set of data they are working on. This
      used to be real popular in the early days of distributed computing with
      RPC/mandelbrot demos.

      > 5. Echo back as a sparse array.
      > int[1] = 1, int[3] = 2, size = 4
      > => int[1] = 1, int[3] = 2, size = 4

      I believe that yes, this is what you have to do. Unless of course you
      change the WSDL array definition to have a default value.

      Hope this helps.
      Zolera Systems, Securing web services (XML, SOAP, Signatures,

      This group is a forum for builders of SOAP implementations to discuss
      implementation and interoperability issues. Please stay on-topic.

      To unsubscribe from this group, send an email to:

      Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    • 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
        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?


        // 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.