× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



> From: Barbara Morris
>
> So I wouldn't use a pointer, I would just pass the DS by reference.  The
> caller can declare as many DS's as he wants.

Ugh.  What was I thinking?  This is of course the right answer.


> And instead of giving the caller a pointer to the DS itself in the first
> place, I'd just give an index into an array (or an occurrence).

This is an interesting design pattern.  Your locator method returns a key,
which you then use with each of your getter/setter methods.  With this
technique, the subprocedure is entirely responsible for data access,
including caching.  What's really interesting about this approach is that
you can conceivably support any manner of collision detection, including
dirty reads and simultaneous updates.

The only thing I don't like is writing having 42 different setters and
getters for any reasonably complex data entity.  There's also the additional
overhead of the procedure call and the data positioning for each call.  But
if you only use the methods to get data immediately after a locate and set
data immediately prior to an update, then the overhead compared to I/O is
probably negligible (though that depends on your caching, but now we're
wandering pretty far afield, and in general the overhead should be
acceptable).  And I can still use my "versioned" data structure method for
highly complex entities.

Thanks, Barbara.  As usual, one of your posts gives me a lot of food for
thought.

Joe





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.