Fwd: Re: [Glorp-development] Sharing of readonly data

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: [Glorp-development] Sharing of readonly data

Alan Knight-2

X-Mailer: QUALCOMM Windows Eudora Version 7.1.0.9
Date: Wed, 13 Dec 2006 09:54:30 -0500
To: "Mark Plas" <[hidden email]>,
        <[hidden email]>
From: Alan Knight <[hidden email]>
X-magma-MailScanner-Information: Magma Mailscanner Service
X-magma-MailScanner: Clean
X-Spam-Status:
X-Spam-Score: 1.7 (+)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
        See http://spamassassin.org/tag/ for more details.
        Report problems to
         http://sf.net/tracker/?func=add&group_id=1&atid=200001
        1.0 FORGED_RCVD_HELO       Received: contains a forged HELO
        0.2 HTML_TEXT_AFTER_BODY BODY: HTML contains text after BODY close tag
        0.0 HTML_MESSAGE           BODY: HTML included in message
        0.5 HTML_20_30             BODY: Message is 20% to 30% HTML
Subject: Re: [Glorp-development] Sharing of readonly data
X-BeenThere: [hidden email]
X-Mailman-Version: 2.1.8
List-Id: <glorp-development.lists.sourceforge.net>
List-Unsubscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
List-Archive: < http://sourceforge.net/mailarchive/forum.php?forum=glorp-development >
List-Post: <[hidden email]>
List-Help: <[hidden email] >
List-Subscribe: < https://lists.sourceforge.net/lists/listinfo/glorp-development >,
         <[hidden email] >
Sender: [hidden email]
X-pstn-levels:     (S:98.44905/99.90000 R:95.9108 P:95.9108 M:97.0282 C:98.6951 )

It would be possible to manually put add those to the cache in other sessions when initializing them. Something like
readOnlyObjects do: [:each
    (targetSession cacheForClass: each class)
        at: each id
         ifAbsentPut: [each]].

(There actually isn't an at:put: on caches, thus the ifAbsentPut:)

My thinking on this, although not fully fleshed out, is to add the ability to have main and subordinate sessions (perhaps with better names). A main session would be a normal one, with a database connection. A subordinate session would get its objects from the main session. For objects designated read-only, it could share them. For others, it could make copies. This could also be useful in dealing with web applications where you don't want to have a database connection per user. But it's not implemented yet, and I'm still somewhat thinking about the issues.

At 04:51 AM 12/13/2006, Mark Plas wrote:
Content-class: urn:content-classes:message
Content-Type: multipart/alternative;
         boundary="----_=_NextPart_001_01C71E9C.33F08762"

Hi,
 
This mail is part of a set of glorp questions I have (see some other mails I've sent recently).
 
The topic I would like to address here is:
 
I have a few tables containing ‘readonly’ data. I would like to read in this data once and reuse (import) it in all my separate Glorp Sessions in the image, so that when a proxy fires, it would no longer try to read it from the database but get it from the session’s cache. Is it possible and allowed to do this ? How would I import these objects from the readonly session into the others ?
 
Thanks,
Mark
 
 
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development
[hidden email]
[hidden email]
http://www.cincom.com/smalltalk

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Glorp-development mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/glorp-development

--
Alan Knight [|], Cincom Smalltalk Development

"The Static Typing Philosophy: Make it fast. Make it right. Make it run." - Niall Ross