comp.lang.ada
 help / color / mirror / Atom feed
* Distributed Systems Annex, data sharing between programs
@ 2012-06-04 18:49 Adam Beneschan
  2012-06-05  7:36 ` Maciej Sobczak
  0 siblings, 1 reply; 30+ messages in thread
From: Adam Beneschan @ 2012-06-04 18:49 UTC (permalink / raw)


I haven't had much need to look at the Distributed Systems Annex until recently.  I'm finding that the answer to a simple question is eluding me: Can the execution of a single partition be part of the executions of two or more Ada program executions (whether executions of the same program, or of different programs)?  To explain further: Suppose a program P WITH's a Remote_Call_Interface package R, and R has global data in its body, and R provides operations that modify and retrieve this data.  Suppose that R (and everything it needs) is put into its own partition, while the rest of P is put into another partition. Now, if the partition containing R is run just once, and the other partition is executed multiple times, do they share the same data in R's body?  That is, if one execution of P calls a routine that modifies the global data, and another execution calls a routine that retrieves it, will the second execution retrieve the data that was set by the first execution?  Similarly, suppose that two different programs WITH R, but the partition containing R is executed just once; do the two programs share the data in R's body?

My first impression is that the answer is "no".  The introduction to Annex E talks about "multiple partitions working cooperatively as part of a single Ada program" and other similar wording, which seems to preclude the possibility of partitions being part of more than one program.  Also, the note in E(7) says that the resulting execution is semantically equivalent if the program is partitioned differently; and since two executions of the same program obviously can't share data like this if the entire program is put into one partition, it wouldn't be semantically equivalent if they shared data when R is put in its own partition. Still, 10.2 is somewhat vague about the different ways partitions can be executed, and I'm confused by examples such as 
http://www.adacore.com/adaanswers/gems/gem-111-the-distributed-systems-annex-part-5-embedded-name-server
that appears to be set up so that multiple executions of the same "client" partition cause data to accumulate in a server partition. This strikes me as being outside of the paradigm defined by the RM--but is it, or am I just confused?

If my understanding is correct, my next question is: is there any language-defined support for sharing data between programs (besides file I/O), or does this require using an outside library for (say) socket communication or memory sharing? 

                                -- thanks, Adam



^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2012-06-14 20:29 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-04 18:49 Distributed Systems Annex, data sharing between programs Adam Beneschan
2012-06-05  7:36 ` Maciej Sobczak
2012-06-05 16:02   ` Adam Beneschan
2012-06-05 18:35     ` tmoran
2012-06-06  7:14     ` Jacob Sparre Andersen
2012-06-06  7:39     ` Maciej Sobczak
2012-06-06  8:07       ` Dmitry A. Kazakov
2012-06-06 10:09       ` Niklas Holsti
2012-06-06 11:40         ` Maciej Sobczak
2012-06-06 12:08           ` Dmitry A. Kazakov
2012-06-06 19:17           ` Simon Wright
2012-06-08 11:38             ` Peter C. Chapin
2012-06-08 16:29               ` Simon Wright
2012-06-06 20:02           ` Niklas Holsti
2012-06-07 10:37             ` Maciej Sobczak
2012-06-08  2:11               ` Shark8
2012-06-08  6:31                 ` Pascal Obry
2012-06-08 21:26                 ` Maciej Sobczak
2012-06-09  1:10                   ` tmoran
2012-06-09 12:02                     ` Maciej Sobczak
2012-06-09 12:25                       ` Pascal Obry
2012-06-09 20:29                         ` Maciej Sobczak
2012-06-09  6:59                   ` Dmitry A. Kazakov
2012-06-13 10:55                     ` Marius Amado-Alves
2012-06-13 13:26                       ` Dmitry A. Kazakov
2012-06-14 20:29                       ` tmoran
2012-06-09  9:59                   ` Pascal Obry
2012-06-09 15:14                   ` Robert A Duff
2012-06-09 20:40                     ` Maciej Sobczak
2012-06-07  0:55           ` BrianG

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox