Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / November 2003

Tip: Looking for answers? Try searching our database.

Querying the databse, any patterns please?

Thread view: 
Ravi Shankar - 18 Nov 2003 15:10 GMT
Hi all,

I have a calendar application( like Microsoft Outlook) writtn in
Java.Whenever an event is created, we can set SMS/EMAIL notification. Hence
when an event is created, I am storing that event info and notification time
into a database.Now the notification can be ranging from 5 minutes to say
one day.Hence I need to query the databse every 5 minutes and fetch the data
and do send the notification directly. I understand that such a querying of
database every 5 minutes is a huge performance penalty. Can any body please
suggest a better way to implement this? Any links please? Any patterns would
be of use? Thanks a lot for the help.

Regards,
Ravi
Neil Green - 18 Nov 2003 22:28 GMT
> I understand that such a querying of
> database every 5 minutes is a huge performance penalty.

Querying a database every five minutes is a minute performance hit.
Unless you need very fine granularity of timing or there are a huge
number of notifications to be sent, the method you've described sounds
like a perfectly reasonable way of handling it.

Regards
Neil
sjefens konto - 19 Nov 2003 11:48 GMT
> Hi all,
>
[quoted text clipped - 10 lines]
> Regards,
> Ravi

Another idea is to implement some sort of TimedEvent class, store all
timed events in a database for persistence, and use some sort of Vector
or other list as storage. Then you only need database access when
starting up the service if you fear performance degradation. This will
be in expence of memory, however.

I've done this as a VB Component, with a MS Access db for persistence,
and have the component to deliver events. Of course this can be done in
java as well.

Regards
tron


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.