web stats
Capabilities to throttle the mirth connect processing - Mirth Community

Go Back   Mirth Community > Mirth Connect > General Discussion

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2011, 06:18 AM
alan_farquhar alan_farquhar is offline
What's HL7?
 
Join Date: Mar 2011
Posts: 2
alan_farquhar is on a distinguished road
Default 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.
Reply With Quote
  #2  
Old 03-26-2011, 02:09 PM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

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
__________________
JJ Mouris
FFE Luxembourg
IT-Department

Last edited by mourisj; 03-26-2011 at 02:14 PM.
Reply With Quote
  #3  
Old 03-28-2011, 05:41 AM
alan_farquhar alan_farquhar is offline
What's HL7?
 
Join Date: Mar 2011
Posts: 2
alan_farquhar is on a distinguished road
Default 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.
Reply With Quote
  #4  
Old 03-28-2011, 10:32 AM
mourisj mourisj is offline
Mirth Guru
 
Join Date: Feb 2007
Location: Luxembourg
Posts: 407
mourisj is an unknown quantity at this point
Default

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
Reply With Quote
Reply

Tags
mirth connect, network throughput, performance, throttle

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:54 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation