It is too bad that nobody got around to answering this question (server problems can't have helped). I don't really have an answer either, but I do have some basic ideas.

The basic problem with getting this migration to work is being able to name your resource uniformly and have the same naming work before and after. Therefore I would suggest breaking out the naming logic into an object which Net::Distributed proxies off of, and then have a migration module. There is (as you note) a strong tie between the migration infrastructure and the naming object. There is no issue for children of the Net::Distributed other than the fact that they may need to implement some methods that the migration module will expect. (Note: Storable is likely to be massively helpful for you.)

In order for migration to be able to work you need to have your naming authority set up, persistent, with everyone looks to them for names. When an object wants to migrate it tells the naming authority to delay any name resolutions, it spawns the new child, tells the naming authority where the resource is to be found now, and then exits. Clients just block during the migration process then find the object at the new location.

The naming authority could be something as simple as a relational database. It could be a custom server.

The advantage of the design I proposed is that if someone doesn't want to support migration, they can use a simpler and faster design. If someone thinks it should work differently than it does, they can subclass that proxy object and the difference will ripple properly through all subclasses of Net::Distributed that they might have.

Whether or not you like this design, my suggestion for a good places to look for inspiration are clustering projects like Mosix. Their overall design may differ in key respects, but they have to face the same issue and are likely to have good advice about issues they faced.


In reply to Re (tilly) 1: Organizing my packages by tilly
in thread Organizing my packages by dash2

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.