DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦14ea80ec8⟧ Ada Source

    Length: 5120 (0x1400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Request, seg_02c8b2, separate Broker

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦5a81ac88f⟧ »Space Info Vol 1« 
        └─⟦this⟧ 

E3 Source Code



separate (Broker)
procedure Request (M : Message.Object) is
    Iter1 : Database.Iterator := Database.Publishers (Message.Get_Method (M));
    Iter2 : Database.Iterator := Database.Subscribers (Message.Get_Method (M));
    S : Message_Transport.Status_Code;

    use Message_Transport;
begin  
    New_Line;
    Put_Line ("+++ Received request for " &
              Method.Image (Message.Get_Method (M)));


    Publishers:
        while not Database.Is_Done (Iter1) loop

            Put_Line ("+++ Found potential server =>" &
                      Integer'Image (Database.Value (Iter1)));
            Put_Line ("--- Forwarding request");

            Message_Transport.Put
               (Message => Standard.Message.Image (M),
                Remote_Host => Identifier.Get_Host
                                  (Identifier.Value (Database.Value (Iter1))),
                Remote_Socket => Identifier.Get_Socket
                                    (Identifier.Value (Database.Value (Iter1))),
                Number_Of_Retry => 10,
                Retry_Delay => 0.1,
                Status => S);

            if S = Message_Transport.Ok then
                Put_Line ("+++ Forward successful");
                exit; --[we forwarded successfuly and continue]
            else
                Put_Line ("++* Forward failed for publisher =>" &
                          Integer'Image (Database.Value (Iter1)));

                Put_Line ("--- Making it stale");
                Stale (Behavior => Database.Value (Iter1));

                Put_Line ("--- Trying next publisher");
            end if;

            Database.Next (Iter1);

            if Database.Is_Done (Iter1) then
                Put_Line ("*** Forward failed for all publishers");
                Put_Line ("--- Method => " &
                          Method.Image (Message.Get_Method (M)));
                Put_Line ("--- could not be handled");
            end if;

        end loop Publishers;


    Subscribers:
        while not Database.Is_Done (Iter2) loop

            Message_Transport.Put
               (Message => Standard.Message.Image (M),
                Remote_Host => Identifier.Get_Host
                                  (Identifier.Value (Database.Value (Iter2))),
                Remote_Socket => Identifier.Get_Socket
                                    (Identifier.Value (Database.Value (Iter2))),
                Number_Of_Retry => 10,
                Retry_Delay => 0.1,
                Status => S);


            if S = Message_Transport.Ok then
                Put_Line ("+++ Propagated notification to subscriber => " &
                          Integer'Image (Database.Value (Iter2)));
            else
                Put_Line
                   ("*** Failed to propagate notification to subscriber => " &
                    Integer'Image (Database.Value (Iter2)));
                Put_Line ("--- Making it stale");
                Stale (Behavior => Database.Value (Iter2));
            end if;

            Database.Next (Iter2);
        end loop Subscribers;
end Request;

E3 Meta Data

    nblk1=4
    nid=0
    hdr6=8
        [0x00] rec0=1b rec1=00 rec2=01 rec3=060
        [0x01] rec0=19 rec1=00 rec2=04 rec3=012
        [0x02] rec0=1a rec1=00 rec2=02 rec3=030
        [0x03] rec0=08 rec1=00 rec2=03 rec3=000
    tail 0x21524ea6e840577927af4 0x42a00088462060003