home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / utilities / utilst / tornado / Info < prev    next >
Text File  |  1995-05-25  |  14KB  |  235 lines

  1. Introduction to the Tornado application standard:
  2.  
  3.  - a proposed method of making writing Wimp apps like riding! (but what!) :-)
  4.  
  5. by N. Douglas
  6.  
  7. In a nutshell, Tornado can be described as 'a Filecore for Wimp apps'. It is
  8. designed to force a standard look onto Wimp apps, while simultaneously making
  9. writing easy, and enhancing life for the user.
  10.    It is a development of RISC-OS that has long been coming, but something
  11. Acorn aren't too keen on changing. They prefer developing their precious
  12. SharedCLibrary, while ignoring the greater good of developing RISC-OS.
  13.    Tornado will also function as a library, a filing system, and general
  14. support. It is intended, that if it ever gets finished, it will form a large
  15. part of RISC-OS's to come, whether Acorn likes it or not.
  16.    <Rousing statement>: Tornado will allow the RISC-OS platform to once again
  17. assume the cutting edge of OS technology, showing what a _real_ OS can do.
  18. Forget Windows '95, forget X. Tornado, when finished, will increase user
  19. productivity to an extent that *the* techie platform will only be the Acorn
  20. one.
  21.    Ok, whether you believe that or not, keep reading. I think you'll find
  22. many of the features described here exciting, if nothing else.
  23.  
  24.    This document intends to describe what this is all about, and to drum up
  25. both support and writers. Anyone can join in, and write for Tornado. Right
  26. now, we need coders for Part A, the support backbone. They have to be pretty
  27. compentent in Assembler, as the vast majority of this section will be in
  28. assembler. Some parts may be in C (without ANSI libs), but little in Basic.
  29. The end product will consist entirely of C or Assembler, with no Basic
  30. (unless someone finishes the BasicSWI coding!).
  31.  
  32. Part A: Support
  33.    In this branch are the low-level facilities provided by Tornado. Upon
  34. these facilities the rest of the standard hinges. It consists of the
  35. following:
  36.    *  Heap+: This is an extension to the OS_Heap standard, remaining backward
  37. compatible with OS_Heap style heaps, but adding the important element of
  38. relocatable blocks and automatic garbage collection. Tasks claiming blocks
  39. can choose either (a) fixed blocks or (b) shifting blocks. Type a are given
  40. handles pointing to their position, ala OS_Heap style. Type b are given
  41. negative handles, and before each access a Tornado_Heap+ SWI must be called
  42. to retrieve the address of this block. Any data within this block _must_ be
  43. relocatable at all times. Anyone wishing to see in more detail this heap
  44. format, see the Basic test program HeapExt.
  45.    *  TornFS: This is a r/w filing sytem holding its data in RMA. Every
  46. Tornado task, after calling Tornado_Initialise gets an account in here, and
  47. all files/Heap+ blocks have associated filenames in the accounts. IE; when a
  48. app claims a block, a new file is created in tfs:, although the actual data
  49. within the file is actually stored in a heap+ after the main code of the
  50. task. All filing system operations can be done on this file (and the block)
  51. as usual, as the data is accessed using Wimp_TransferBlock (which means
  52. we'll be needing tfs: as a module task). Odd? You'll see why it's so
  53. advantageous later.
  54.    *  Wimp and misc utils: These include little things that always prove
  55. themselves really vital. These routines could possibly be in C.
  56.    Ok, for a start programmers are needed for:
  57.       Preemption: Done, but needs tiding up, and extending so it stores the
  58. codes it receives, and can regurgitate them later.
  59.       General Wimp utils, like that supplied with DeskLib: These need to be
  60. recompiled into module format, and accessed through a SWI interface.
  61.       Accessory sub-tasks: Ah, this is interesting. The idea is this: a task
  62. wanting to do some heavy processing, schedules a subtask. This subtask is a
  63. program in its own right, a 'black box' if you like. It takes in data, and
  64. spits out data. Here's how it works:
  65.          Tornado task calls Tornado_StartAccessoryTask, pointing to the input
  66. data and output data (in tfs:). The task called is an actual program, and it
  67. will be called using *Run <taskpath&name> %0 %1 %2 etc. The program may
  68. reside in the home dir of the task, or if frequently used (option in option
  69. window) could reside in tfs:.
  70.          Now, what happens is this: If there is only one processor available,
  71. the subtask is run. The subtask calls Tornado_InitialiseSubTask, which in
  72. this case starts the task up as a wimp app, and starts preemption too. The
  73. subtask runs along, does its stuff, and exits with Tornado_ClosedownSubTask,
  74. with the data processed. The subtask is exited, and the originator task is
  75. told the data is finished.
  76.          Second processor: The subtask code, and its data in/out, are copied
  77. to the 2nd processor's memory, where a Tornado subtask server is running.
  78. Same as above, except maybe without the Wimp getting involved and instead
  79. preemption between multiple tasks occuring, ala VAX VMS style. Finishes as
  80. above, except the results are copied back.
  81.          Remote processor: this could be on the Internet, or on an Ethernet.
  82. The subtask & data is copied over the network(s), to a server running on the
  83. remote machine. As above, is copied back.
  84.          A lot of work, but for now we only need the local processor option.
  85. Not too difficult.
  86.       Internal sub-tasks: a piece of code is called on every poll, and this
  87. does the required job in bits. This may detract from the processor time the
  88. task receives, or maybe not.
  89.       Load/save routines which work under interrupts: Done, but need tidying,
  90. and I'm not happy enough yet. The code should be able to intelligently guess
  91. the ratios required for optimum access depending on the media being accessed.
  92. We'll need a list of access speeds and transfer speeds to do this properly.
  93.       Processor priority program: I think this can be done by having Tornado
  94. send a Wimp_SendMessage no. 0 on every poll. This would double the processor
  95. time the task gets. Or triple, quadrouple, etc.
  96.  
  97. Ok, this is the really dreary bit. Hard work, little gain. Anyone doing work
  98. here can release the code seperately as a stand-alone version too, if they so
  99. wish. But please read the Readme file first.
  100.  
  101.  
  102. Part B: Tying it all together
  103.    Okay, now we start having fun. With the foundations laid, the real fun
  104. stuff starts. It's also probably the hardest and longest bit here, and will
  105. take months of coding. Here is the major preliminary stuff, blow by blow:
  106.    *  Automatic loading: Essentially, a user drags a file (either from filer
  107. or another app) onto something belonging to the task. Tornado loads/transfers
  108. the file into tfs: (multitaskingly if necessary, like it's a slow medium or
  109. a network).
  110.          NOTE: If the file format loaded in isn't a one the app can handle
  111. (eg; loaded=GIF, task can only take Sprite), Tornado may first translate the
  112. file into one the task can understand.
  113.          When finished, Tornado sends a Tornado_Poll message to the app,
  114. indicating which window etc. The task then allocates its own block (which
  115. also appears in tfs:), and copies/loads the file into it. The task recalls
  116. Tornado_Poll, whereupon the original is deleted.
  117.          OR: The task can ask for the block to be preserved, and schedule
  118. either (a) an external subtask to do the processing or (b) an internal
  119. one. Or, if it's lazy, it can ask for preemption on its code (not approved
  120. though!)
  121.    *  Automatic saving: You can guess it from the above.
  122.    *  Automatic OLE: Picture a nice Draw file in a Tornado DTP package. It
  123. sits in its frame, beautifully. Then, the user double clicks on it while
  124. holding down Shift (ala Filer=>Edit style), having noticed it's OLEable
  125. because the pointer changed when it moved over it, and when the user pressed
  126. Shift a double-click pointer came up etc. etc. Tornado gets the OLE request.
  127. It then (optional) returns via Tornado_Poll, asking for preparations. Then it
  128. copies the file out of the tasks heap+, into a tfs: OLE file. This is
  129. DataOpened. Draw, currently loaded (or if not, Alias$RunTypeXXX is done),
  130. picks it up and loads it. User edits. User opens Draw's save dialogue, clicks
  131. on OK. File is saved back to tfs:, where Tornado notices the changed
  132. filestamp, and recopies it back into the task's original block, extending i