Multiple file watchers?  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Multiple file watchers?

Postby neil.interactit » Tue Jun 16, 2015 10:58 am

Hi guys,

A question on best practice and possibility ...

I have a client with a growing number of file watch folders and processes. Having started with your demo watcher ... and stripped it down to the initial few needed ... I am now progressively adding back in extra watcher code as needed. I am following the multiple watchers within the single plugin paradigm per the demo. Is this best?

I have both implementation and robustness concerns ... asynchronously needing to implement new watchers ... and trouble when new code breaks existing functionality.

Can I divide and conquer ... a plugin per watcher ... will this be cool within Jiwa and handled OK by the service? And if so, is this best practice?

Cheers,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Multiple file watchers?  Topic is solved

Postby Mike.Sheen » Wed Jun 17, 2015 8:39 pm

Hi Neil,

Either approach - either watching multiple folders in the one plugin, or having several plugins - is perfectly acceptable and supported.

Choosing which approach comes down to a management choice - is it likely at some point one of the watchers will need to be disabled (temporarily or permanently)? If so, then it might be best to have multiple plugins, as the customer can easily disable the plugin in question and not need to worry about modifying the code to disable a watcher.

I personally like to use separate plugins for discrete pieces of functionality. If the purpose of the watchers are isolated and not co-dependant, then having separate plugins makes sense. If the functions are related, then it probably makes more sense to have one plugin.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Multiple file watchers?

Postby neil.interactit » Thu Jun 18, 2015 11:00 am

Thanks Mike ... will go that way.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Multiple file watchers?

Postby neil.interactit » Tue Jul 07, 2015 6:24 pm

Hi again, a quick follow up question ...

I have a Helper class in my file watcher plugin ... allowing me to FileWatcherManager.WriteLog(), FileWatcherManager.GetWatchFolder(), FileWatcherManager.SendEmail(), etc.

With multiple plugins for multiple file watchers, it would be nice (and ease maintenance) not to need to duplication the FileWatcherManager in each plugin. Can I add it to its own plugin and then add a reference (to its subsequent compiled DLL) somehow?

Cheers,
Neil.
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6

Re: Multiple file watchers?

Postby Mike.Sheen » Tue Jul 07, 2015 9:34 pm

neil.interactit wrote:Hi again, a quick follow up question ...

I have a Helper class in my file watcher plugin ... allowing me to FileWatcherManager.WriteLog(), FileWatcherManager.GetWatchFolder(), FileWatcherManager.SendEmail(), etc.

With multiple plugins for multiple file watchers, it would be nice (and ease maintenance) not to need to duplication the FileWatcherManager in each plugin. Can I add it to its own plugin and then add a reference (to its subsequent compiled DLL) somehow?

Cheers,
Neil.


I was wondering when someone would ask this.

I tested this a while back, and the short answer is yes you can reference another plugin. The trick is to make sure the execution order is set so that the plugin you want to reference is compiled before any others referencing it, and then you can add a reference to the plugin dll in the ProgramData\Jiwa Financials folder.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Multiple file watchers?

Postby neil.interactit » Tue Jul 07, 2015 10:18 pm

Thanks Mike, I will give it a spin!
neil.interactit
Kohai
Kohai
 
Posts: 232
Joined: Wed Dec 03, 2014 2:36 pm
Topics Solved: 6


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests