Updating plugins in Middle Tier

This forum is for programmers who have questions about the source code.
Post Reply
User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Updating plugins in Middle Tier

Post by wjstarck » Tue Aug 17, 2021 11:00 am

Hello OD staff -

I have used automatic updater software for many years to automatically update users of my software to match the plugin assembly version with the running version of OD.

For regular OD, this requires the user to set the dll name to Anesthesia[VersionMajMin].dll in the Program Links setup. Then OD parses the OD Program folder and selects the matching version, strips the version number and build off of the file name and saves it as 'Anesthesia.dll' and then loads that.

This method has worked really great, but breaks down in Middle Tier because apparently the plugin dll name has to match the assembly name exactly.

Any solutions for this problem? Should this be a feature request?

I could have the automatic updater put the various versions in a subfolder in the OD program folder if need be.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
jordansparks
Site Admin
Posts: 5739
Joined: Sun Jun 17, 2007 3:59 pm
Location: Salem, Oregon
Contact:

Re: Updating plugins in Middle Tier

Post by jordansparks » Tue Aug 17, 2021 6:10 pm

I don't have any brilliant ideas. It would get lost as a feature request because you would be the only one who cared. I sort of thought that if the middle tier computer was the computer where the update was performed, then that computer would be all squared away right after the update. Then, each workstation would update like normal. It sounds like there just might need to be some manual involvement or some sort of script that you run. But would this need to be done each time OD was updated, or would this need to be done each time you released a new version? That's what I'm a little unclear about.
Jordan Sparks, DMD
http://www.opendental.com

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Updating plugins in Middle Tier

Post by wjstarck » Wed Aug 18, 2021 9:12 am

It's a little of both.

I push out new versions that match the running version of OD and updates to existing versions (bug fixes). So in desktop OD, everyone gets all the updates for all versions of OD that are running our plugin. The plugins phone home and I track which versions people are running, so I can deprecate older versions that no one runs anymore. So in the OD program folder, there will typically be multiple versions:

Anesthesia18.4.dll
Aneshesia20.5.dll
Anesthesia21.1.dll
Anesthesia21.2.dll

And OD selects the matching plugin and runs it.

When my plugin starts, all of the computers will automatically check for updates. Once one PC is updated, it writes its version to the preferences table. A workstation will check its version against the freshest update and update itself if it isn't running the latest version. This keeps all the workstations in sync.

This has worked great because OD doesn't mind if there are multiple Anesthesia dlls in the OD program folder. But Middle Tier does not allow this, hence the problem. I can run some kind of script but not sure how to integrate that with OD.

I hope that makes sense.
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

User avatar
wjstarck
Posts: 935
Joined: Tue Jul 31, 2007 7:18 am
Location: Keller, TX
Contact:

Re: Updating plugins in Middle Tier

Post by wjstarck » Sat Aug 21, 2021 8:45 pm

I solved this by making a .NET app which will install the proper Anesthesia.dll based on the corresponding OpenDental.exe version number.

The user will just use this to launch OD each time. It automatically updates the AnesthesiaXX.X.dll on the Middle Tier server, renames it to Anesthesia.dll, then launches OD.

Image
Cheers,

Bill Starck, DDS
Big Idea Software, LLC
Developer, EASy(Electronic Anesthesia System) for Open Dental
817-807-1709
TX, USA

Post Reply