From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ccc3531aba8db12,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,UTF8 Path: g2news1.google.com!news4.google.com!news.glorb.com!proxad.net!usenet-fr.net!news.enst.fr!melchior!cuivre.fr.eu.org!melchior.frmug.org!not-for-mail From: Preben Randhol Newsgroups: comp.lang.ada Subject: Dynamic Plug-in Loading with Ada Date: Sat, 25 Jun 2005 09:35:16 +0200 Organization: PVV Message-ID: NNTP-Posting-Host: lovelace.ada-france.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Trace: melchior.cuivre.fr.eu.org 1119684987 87337 212.85.156.195 (25 Jun 2005 07:36:27 GMT) X-Complaints-To: usenet@melchior.cuivre.fr.eu.org NNTP-Posting-Date: Sat, 25 Jun 2005 07:36:27 +0000 (UTC) To: comp.lang.ada@ada-france.org Return-Path: Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at ada-france.org X-BeenThere: comp.lang.ada@ada-france.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Gateway to the comp.lang.ada Usenet newsgroup" List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: g2news1.google.com comp.lang.ada:11643 Date: 2005-06-25T09:35:16+02:00 I don't know if you have seen this paper: http://www.gnat.com/pressroom_20.php# Maintenance of high-availability systems (e.g., servers) requires the ability to modify, enhance, or correct parts of the application without needing to shut down and re-link the entire system. This is relatively straightforward in an interpreted or virtual-machine based language such as Java, in which new code is loaded upon demand. In a language with static executable images this capability can be realized though dynamically loaded / linked libraries ("DLLs"). However, in practice this causes problems, because the protocol for invoking subprograms in a DLL is very low-level and sacrifices type safety. Object-oriented programming makes this approach practical by using dynamic dispatching to invoke dynamically loaded functions with a more robust, high-level protocol. In an OO paradigm, a �plug-in� contains new classes that enrich the class set of the original application. Calls to subprograms in the shared library (plug-in) are done implicitly through dynamic dispatching which is much simpler, more transparent to the programmer, more type-safe, and thus much safer.A paper by Cyrille Comar and Pat Rogers shows how Ada � a statically-typed, statically-built, object-oriented language� can fully implement dynamic plug-ins as in Java, but without needing to rely on a comparatively inefficient virtual machine. This paper, which will be available on the AdaCore website, shows how to use GNAT Pro to build an extensible application and illustrates adding new functionality at run time through plug-ins, without needing to shut down the program. The paper explains the procedure for doing this in Windows. Does anybody know if one could do the same in Linux with shared libraries? Thanks in advance Preben -- Preben Randhol -------------- http://www.pvv.org/~randhol/Ada95 -- �For me, Ada95 puts back the joy in programming.�