Announcement

Collapse
No announcement yet.

Capabilities to throttle the mirth connect processing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Capabilities to throttle the mirth connect processing

    Hi,

    Are there any capabilities within Mirth Connect to throttle the processing so that it isn't overwhelming a dicom destination with cstore requests?

    My application does the following. I have a database table that has a few million rows. From the rows in this table I am backfilling new dicom objects to a dicom destination.

    I would like to be able to throttle the processing of my server that is running Mirth Connect so that I don't overwhelm the server at my dicom destination. As well so that I'm not flooding the network with dicom calls. Is there any capability to do this in Mirth Connect? I see some capabilities the Mirth Connect gui that would allow for this control but am looking for some more guidance in this area.

    I can see how I can adjust the priority of my dicom cstore requests but this isn't really what I am looking for.

    I see a polling frequency and polling type on the source of the channel. Is there a capability of setting my polling of my source to occur off hours either through script or configuration? Is there a way to specify a start time and a stop time on a channel?

    I could throttle my database select call by only processing a certain number of rows during each polling interval.

    Is there a way to throttle the network throughput on the mirth connect box somehow?

    Thanks in advance for any guidance you can provide.

    Alan.

  • #2
    Hello,

    I once had the need to switch between day and night processing for one channel. This channel was a database reader.
    So I scheduled switching from night to day processing with the following code:

    Code:
    var PROC_START = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), 22, 00); 
    var PROC_END = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate(), 06, 00); 
    if(PROC_START <= currentDate  || currentDate < PROC_END){ 
    	globalMap.put('lxfdft_nightProcess', true);
    	(more processing)
    	if (old_nightProcess != globalMap.get('lxfdft_nightProcess') ) {
    		logger.info("Switching to NIGHT processing! ");
    		}
    
    else	{ 
    	globalMap.put('lxfdft_nightProcess', false);
    	(more processing)
    	if (old_nightProcess != globalMap.get('lxfdft_nightProcess') ) {
    		logger.info("Switching to DAY processing! ");
    		}
    If you manage to always select one single row for processing (e.g. select min(primary_key) from yourtable where processed = '0' and ...), and you set your polling interval to an adequate value, I think you should get what you described above.
    Don't forget to flag processed records in the on-update javascript , to avoid processing them multiple times
    Last edited by mourisj; 03-26-2011, 02:14 PM.
    JJ Mouris
    FFE Luxembourg
    IT-Department

    Comment


    • #3
      Ability to update channel properties through script?

      Thanks for your response and code example. Where would you put the javascript code you've outlined?

      Next question, are you able then to change the channel properties (ie. for channel interval) through script? If so, could you send an example of how you manipulate channel properties through script?

      How efficient is it to process 1 row per channel execution? For example if I want to open up the channel processing and I set my interval to 1/2 second or less is this an efficient way to process the information from my database. Or would it be better to build in a delay in the java script somewhere in the channel processing?

      Thanks, Alan.

      Comment


      • #4
        I use a database reader as source, which might be appropriate for your needs, too.
        There, I select the "Use javascript" option, which lets me code anything I like in javascript.

        I use static interval, simply setting the value in "Polling frequency"

        I don't know if it wise to create intervals in javascript, nor do I even know if it's possible. (Don't know if there's a "sleep" function or similar available).

        In my channel, first I select one case number, and then, in a second query, all billable activities for this case. These may be from 1 to more than 1000 rows, that's why I dont care about efficiency of doing it this way, as the processing of large result-sets is time consuming anyway.
        And I have no problem in flagging the appropriate rows after processing.
        JJ Mouris
        FFE Luxembourg
        IT-Department

        Comment

        Working...
        X