T.R | Title | User | Personal Name | Date | Lines |
---|
361.1 | Flip suggestion | EVMS::WALL | Show me, don't tell me | Fri Mar 21 1997 09:44 | 6 |
|
Well, one factor might be size. If there's a need to contain a whole
lot of data at once, it might be better to have a global sections.
Global sections can be enormous, particularly in the wake of V7.1
DFW
|
361.2 | Copies Of Documentation Are Available | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Fri Mar 21 1997 10:13 | 28 |
|
If you have relatively small messages and relatively infrequent
message transfers, mailboxes will work nicely -- large or frequent
transfers would likely be better served by global sections.
(Values of "small", "large", and "frequent" are deliberately
vague -- these values are effectively application dependent.)
:What would be useful is an example of how the global section is used/seup...
See TURRIS::DECC 2123.* for a standalone example of working with
a global section.
Synchronization of access to shared memory requires synchronization.
It likely requires the use of interlocked instruction primitives or
the interlocked PALcode primitives, or use of the LIB$ routines or
language built-ins that call these primitives. (One can also use the
lock manager for synchronization, or one can use any of various other
synchronization techniques. But these primitives are among the most
common synchronization techniques used.)
:Unfortunaltely I do not have any documentation.
You do. See the low-numbered notes for pointers to the bookreader
and postscript documentation. Please skim through the _OpenVMS
Programming Concepts Manual_. Synchronization techniques, as well
as shared memory requirements are documented in that manual. (There
is more information there than I care to retype here...)
|
361.3 | | EVMS::KUEHNEL | Andy K�hnel | Fri Mar 21 1997 12:02 | 8 |
| The only condition under which I would suggest to use global sections
is if you are concerned about performance. Mailbox I/O copies the data
from the sending process to system space and from system space to the
receiving process. Using a global section, you need to copy only to
the section.
Since you mentioned that it's for error handling, I would expect that
the events are rare and that mailboxes are just fine.
|
361.4 | | AUSS::GARSON | DECcharity Program Office | Sun Mar 23 1997 17:16 | 13 |
| re .*
And remember that neither technique can be distributed seamlessly
across a cluster (let alone a network). If those directions are likely
then you would want to consider the implications for your design. Yes,
you can just replicate the error handling process, one for each system,
and using a remote database you could still centralise your error store
if that is desired but it's best to consider it all upfront.
Adequate encapsulation of the error handling will allow a transparent
change of implementation in the future.
Mailbox will probably be easier to program than global section.
|
361.5 | thanks | FLYWAY::GRIFFITHS | Andrew Griffiths @ZUO | Mon Mar 24 1997 04:01 | 22 |
|
Many thanks for all your replies.
It's difficult to know what sort of work load will be envisaged.
My gut-feeling tells me to use mailbox because it is easier to program.
Also, since error informtaion is
not deemed critical (i.e. not real production data), a mailbox seems the
way to start off. I believe OPCOM also uses mailboxes
for its error handling.
Just another thought: mailboxes can only be used for one-way
data flow (write followed by a read);
whereas global sections can be used for sharing data: write followed
by a read, followed by another write etc. Error logging would be
therfore be better served by a mailbox (in my opinion).
Here is a vague question. How long would
it take a programmer to reprogram the mailbox
code to use a global section instead ?? Days, weeks ??
thanks once again,
Andrew
|
361.6 | "It Depends..." | XDELTA::HOFFMAN | Steve, OpenVMS Engineering | Mon Mar 24 1997 13:16 | 17 |
|
:Here is a vague question. How long would
:it take a programmer to reprogram the mailbox
:code to use a global section instead ?? Days, weeks ??
As you are well aware, there can be no answer to this question.
If the programmer designs a "central communications interface" into
the application, and keeps all code that is sending and receiving
messages together in one or a small number of related low-level
modules, one can implement and test and switch over to another
transport in a couple of days.
If the programmer scatters knowledge of the communications techniques
and/or scatters unique-to-a-communications-medium mechanisms throughout
the applications, the changeover could take weeks or months...
|
361.7 | | AUSS::GARSON | DECcharity Program Office | Mon Mar 24 1997 17:00 | 8 |
| re .5
Note that a vanilla global section is also not ideal for mission
critical data unless you specifically program to ensure integrity. That
is, if mission critical data is put in a global section, possibly only
during transit, and a system failure occurs, that data can be lost or
corrupted unless you take steps to handle this. [With a mailbox, system
failure will simply result in loss of data.]
|