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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b95a522100671708 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Nick Roberts Newsgroups: comp.lang.ada Subject: Re: For the AdaOS folks Date: Wed, 5 Jan 2005 18:33:53 +0000 Message-ID: References: <1PTAd.1218$0y4.421@read1.cgocable.net> <1vemlj8wqr9ea$.qyecszhsmtqa$.dlg@40tude.net> <1b48kdfqsk3mw.7gajq12fsa82.dlg@40tude.net> <2tsp1psz9462$.1f29l3v513cke$.dlg@40tude.net> Content-Type: text/plain; charset=us-ascii X-Trace: individual.net ofjuvFDUAdNJpycPvBhdCAf02GiOC3jEDbG8onuZL8DwnJ6K0= X-Orig-Path: not-for-mail User-Agent: Gemini/1.45d (Qt/3.3.2) (Windows-XP) Xref: g2news1.google.com comp.lang.ada:7483 Date: 2005-01-05T18:33:53+00:00 List-Id: "Dmitry A. Kazakov" wrote: > The other means would be by mapping everything to L/DSM. The problem is > how to achieve different views on the same storage. I think one would build layers on top of the database to achieve this. For example, you might have a table for text files with the fields "Name", "Encoding", and "Data", of types Char Varying, Enumeration, and BLOB, respectively. The Encoding field would say what the charcater encoding of the data was, so that the binary data in the Data field characters can be interpreted as characters. One might then have a class (of system objects) "Text_File" which has a method to read a sequence of characters; this method would invisibly use the Encoding field to select the correct algorithm to interpret the Data field. > As I mentioned in discussion with Warren, I would like to have something > like Ada protected object with protection enforced by memory mapping. What I envisage is a locking (and transaction) protocol based on the model described by the SQL-92 standard. This would achieve the same essential objectives as an Ada protected object, but with the added functionality of transaction rollback, and more implementational flexibility. I'm not wedded to the use of the SQL-92 standard, however. One possibility is a translator that would generate Ada code from a specification written in a language designed to conveniently describe how database tables (or views) are to accessed in a program. The generator would generate both an Ada package specification and its corresponding body. The spec could contain an interface (to a database table) that would be similar to the interface of a protected object. The body would contain the nasty messing about necessary to access the database. > Then there is of course the issue of reset/restart/upgrade. System objects > have to be organized in a way which would allow restart failed system > parts. One would never be able to restart the whole [distributed] system > once it runs. This is why a comprehensively transactional system would be so important. The system would be designed so that transactions were guaranteed to be effectively atomic, even for changes spread across the network; in particular, rolling back would be guaranteed atomic as well as committal. This way, any failure anywhere in the network would cause the affected transactions to be rolled back -- and this would be guaranteed to succeed in getting the system to a stable (consistent) state -- and then the remainder of the network could proceed correctly from there, with software components restarted as necessary. -- Nick Roberts