Dario,

That would be great to have such an "app" handled from the database!
I use OOo as frontend. Would your idea work even in that case?
________________________________________________________
Riccard


--------------------------------------------------
From: "Dario Fassi" <[email protected]>
Sent: Monday, November 15, 2010 11:09 PM
To: <[email protected]>
Subject: Scheduler integration

Hi Thomas,
I'm working on a simple and specific Scheduler implementation for H2. Basically a timer thread that can start jobs to start/stop/backup/run_scripts or call UDFs over a target H2 database. This feature need to be useful for installations where H2 is used in embedded or server mode ; and whether web or desktop applications. BTW I know about the wonderful Quartz scheduler, but it'soversized for the typical scenario that I'm thinking.

Will be desirable if this feature can handled from database too, with statements/calls like:

   call  INIT_TIMER( args );   // Tick every  n milliseconds
   // Then sched new Jobs
   call ADD_TASK_SQL( sqlText, triggerArgs ... );
   call ADD_TASK_SCRIPT( sqlFileName, triggerArgs ... );
   call ADD_TASK_MODULE( moduleName, triggerArgs ... );
or
   INSERT INTO INFORMATION_SCHEMA.SCHEDULER values ( ... ) ;
or
CREATE TASK [ SQL | SCRIPT | MODULE ] taskId AS [sqlText | scriptFilename | moduleName ] WHEN timeTriggerExpresion ;

I wish to know your opinion about the best way to integrate this feature with H2:

1) Completely decoupled server that handle H2 at jdbc connection level.
2) As an extension of actual DatabaseListener with a new TimerEvent every n millis.
3) As a new trigger type (TRIGGER ON TIMER) implementation.
4) As an UDF from a class with a singleton to start a timer thread to call scheduled UDFs.

I'm thinking in two types of scheduler/Jobs invocations:
1) External Jobs to start, stop, backup, run_scripts over a target H2 database. In this case the scheduler must to survive an H2 shutdown.
2) Internal database Jobs as tasks over an injected connection, like UDFs.

All opinions are welcome.
regards,
Dario

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.



--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to