Hi Nathan,

I am quite interesting in getting involved in the new JMS
implementation.  I am currently trying to put together a JDO based
message store.

I think that the main point I was trying to make is that the Message
Store is potentially very large and the most common way to handle access
to large amounts of data is through a iterator approach (e.g. JDBC
ResultSet) to avoid manic use of resources (memory, bandwidth etc).

I mentioned that I thought (incorrectly) that the List was too complex a
structure to provide this type of interface (although will be a little
inefficient if get(int) is called a lot).  I have also looked at the JDO
implementation and I noticed that the JDOLoad also tries to load all of
the results in memory, which IMHO won't scale very well.  Strangely the
JDO spec says that these results should be results should be returned as
a Collection almost implying that they should.  Therefore I am in the
process of putting together an implementation of the Collection
interface that will utilise a more 'lazy' approach to loading the data
and won't try and store everything in memory (apart from a cache or
buffer).  Extending the implementation to include the List interface
won't be that much more work.  My intention is to provide a patch for
JDO that uses these and then reuse them in my MessageStore
implementation.

Hopefully I'll post something later this week.

Regards,
Mike.

On Sun, 2003-07-20 at 20:40, Nathan Phelps wrote:
> Wow, people are actually looking at the code!
> 
> I must admit that currently, the MessageStore is somewhat nebulous in my
> mind.  The idea of course is to delegate all message storage to
> implementations of MessageStore allowing them to store messages as they
> see fit (in memory, database, file, etc.) not unlike the JBossMQ
> PersistanceManager.  One difference, however, is that it is the
> MessageStore's job to expire messages as well--this may or may not be a
> good thing.  Anyway, I appreciate your suggestion about Iterator vs.
> Collection.  Frankly, I've seen people use them interchangeable and I've
> never developed a preference from one over the other.  But your point is
> well taken.  I choose to return a list because that is how I was storing
> the messages in the SimpleMessageStore.  A MessageStore that stores
> messages in a db would be dealing with a different underlying data
> structure, so your point is well taken.  I'll give this some more
> thought, but I think you are likely right--in fact in a small sort of
> way using List destroys the abstraction that MessageStore is trying to
> create...
> 
> Thanks,
> 
> Nathan
> JMS/JBoss Lead
> JBoss Group, L.L.C.
> 
> > -----Original Message-----
> > From: Michael Barker [mailto:[EMAIL PROTECTED]
> > Sent: Sunday, July 20, 2003 4:19 AM
> > To: [EMAIL PROTECTED]
> > Subject: [JBoss-dev] Suggested interface change for
> > org.jboss.jms.server.MessageStore
> > 
> > Hi,
> > 
> > I am currently looking at the MessageStore part of the new JMS
> > implementation.  I would like to propose the addition of the following
> > method to MessageStore interface:
> > 
> > "Iterator getSavedMessagesIterator()"
> > 
> > The reason being that the MessageStore implementation may not want to
> > store all of the MessageReferences in memory to improve scalability.
> > Implementing an Iterator interface to handle this will be a lot
> simpler
> > than implementing a List interface.  This will also give the caller
> more
> > control as to the resource usage by the system (e.g. the caller can
> load
> > the messages into a list if it so desires).  This should also be the
> > preferred method for getting at all of the messages in the store,
> almost
> > to the point where I would suggest deprecating or removing "List
> > getSavedMessages()".
> > 
> > Regards,
> > Mike.
> > 
> > --
> > Michael Barker <[EMAIL PROTECTED]>
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: VM Ware
> > With VMware you can run multiple operating systems on a single
> machine.
> > WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at
> the
> > same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> > _______________________________________________
> > JBoss-Development mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> JBoss-Development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
-- 
Michael Barker <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to