Results 1 to 5 of 5

Thread: Hot Swappable Software

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2002
    Posts
    379

    Hot Swappable Software

    Hello There,

    I think this is impossible, but since I have learned here many things are possible I thought I would just ask.

    Is there a way to hot sawp/update software without interrupting operation? My software runs radio stations, and they don't want to quit/restart app to update. I know it's crazy but again thought I would ask

    WP

  2. #2
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Hot Swappable Software

    Quote Originally Posted by axisdj View Post

    I think this is impossible, but since I have learned here many things are possible I thought I would just ask.

    Is there a way to hot sawp/update software without interrupting operation?
    Absolutely - we talk about Software... so, "anything goes"...

    It's all about clever modularizing into COMponents (preferrably Dlls,
    since those can be easier loaded in a regfree manner).

    E.g. your App could contain only one (or two) Types of "generic Forms" ...
    a sizeable prototype with normal Borders + one with fixed Dialog-Borders -
    and maybe one ToolWindow-Prototype.

    These Forms can then be loaded dynamically by Controller-Classes, which
    sit inside Active-X-Dlls - and which also don't change often, since they are
    only responsible to "connect the pieces" (receiving and re-delegating Events).

    Then you need GUI-Classes which provide Screen-Renderings (Controls/Widgets) -
    as well as Worker-Classes which handle your Data and the Streaming - all in their
    own Dlls (and these are the Classes which perhaps will change more often - and
    have to be treated more like the Plugins they are).

    With DirectCOM.dll (part of of the Richclient-package) you can then dynamically
    load these Dlls (their Classes) from different Version-Directories without shutting
    down the running process - all regfree without any setup - and on different Threads
    (STAs) if you want.

    Even re-routing a Live-Stream in realtime (from one Stream-Handler-Plugin into
    another with a higher version-number) is doable with a few tricks and preparations
    beforehand.

    It's kinda sad, that many in the VB-Classic-community run away screaming, as soon
    as the terms "ActiveX-Dll-Project" or "COM-Classes" is mentioned - although that's
    exactly the point, where "hacking" ends and "engineering" starts (Modularization,
    separate Testing, Integration and "dynamic-dependency-injection").

    The tools which allow for that kind of stuff in VBClassic are out there for decades.

    But their usage has to be accompanied by a willingness to learn Classes, the
    usage of the WithEvents-Keyword, the usage of Interfaces and the Implements-
    Keyword - and how to develop COM-Dlls in an isolated manner (in smaller Test-
    ProjectGroups, before those Dll/Class-Plugins reach at least Interface-Stability, so
    that Binary-Compatibility can be switched on, and the integration into the Main-
    Project is possible without fuss).

    Olaf

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    21,432

    Re: Hot Swappable Software

    Short answer: you can do it but it's a can of worms.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,930

    Re: Hot Swappable Software

    Quote Originally Posted by dilettante View Post
    Short answer: you can do it but it's a can of worms.
    Not sure, why you'd label something, the VB6-Compiler (and IDE) is capable of:
    "a can of worms" ... it's normal Software-Engineering, using available tools.

    One can develop (or refactor) an Application in that fashion in a very clean and systematic way
    (provided there's a bit of willingness to learn and getting familiar with the concept).

    Even the adaption of an existing App (which comes with a ton of 3rd-party OCXes, which
    "don't change anymore") is possible, when these OCXes are installed once with a kind of
    "Base-Setup" ... In this case only the Code-Parts which are changed the most often,
    would need to get "outsourced" into appropriate COMponents, which then can be loaded
    dynamically, depending on the existence of Version-Directories (below the App-Path).

    @axisdj
    Ask yourself, where the typical code-changes you provided updates for recently, were located...
    1) Was it entirely new OCX-Controls you introduced? (I guess not)...
    2) Or was it Bug-Fixing in existing routines? (more likely)...
    3) Maybe a few new Menu-Points or additional (but existing in a BaseSetup already) Controls
    ... on a Form were added, along with new Event-Code (quite likely)...

    Points 2 and 3 can surely be handled in dedicated Dlls/Classes (critical, often updated Routines belong there,
    and dynamic creation of additional Controls - including their EventHandlers can also be outsourced into Dlls).

    If you give a concrete Example (somewhat simplified in a Mock-Application), with regards to what kind
    of things you updated recently, I could give you a concrete Example, how to isolate and outsource these
    necessary Code-Updates+Changes into Dlls.

    Olaf

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    32,953

    Re: Hot Swappable Software

    Two lifetimes ago I worked on a VB6-based system that used that methodology. We built all our screens as User Controls... we broke up the controls into different projects (OCXs) so we'd have an Admin project, a Pricing project, a Customer project, Billing, etc... I think we ended up with some 20-odd projects... we stored the ProgIDs for each one in the system and setup a user & role system that allowed us to the dynamically load a menu based on the user's access levels, and when they clicked on the option, we'd spawn the UserControl, drop it onto a Form and display it. It was pretty sweet. That modularity allowed us to roll out changes seamlessly, customize for different clients, and when the time came, it made possible a piecemeal conversion to .NET. We had about 20 installed locations, all over the country, and even a few clients that were in multiple locations. Even our reporting system, even though it was Crystal Reports based, it was modular as well, allowing easy updates to reports when needed.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width