To put it simply, SOAP has nothing to do with object-oriented programming. It is a way to present a (very slow) functional interface to external systems. You should treat it as such, and make the API very coarse-grained so that you can reduce the number of calls it will take to get things done. Yes, the performance is bad enough that you have to care about things like that.

To maintain state, think of it more like a typical web browser interaction. Give clients a cookie, or a session ID or something that you can use to re-establish the current state of a multi-part interaction on the server side.

If you want something lightweight that does allow objects to be passed, there are some older RPC mechanisms on CPAN that are faster, simpler, and more capable. However, they are Perl-specific, they still just pass things by serializing with Storable, and they have mostly been abandoned in favor of more general standards like SOAP.


In reply to Re: Blessed Objects and RPC by perrin
in thread Blessed Objects and RPC by submersible_toaster

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.