DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦c588b6802⟧ TextFile

    Length: 3078 (0xc06)
    Types: TextFile
    Names: »B«

Derivation

└─⟦149519bd4⟧ Bits:30000546 8mm tape, Rational 1000, !projects 93-07-13
    └─ ⟦124ff5788⟧ »DATA« 
        └─⟦this⟧ 
└─⟦a7d1ea751⟧ Bits:30000550 8mm tape, Rational 1000, !users!projects 94_04_11
    └─ ⟦129cab021⟧ »DATA« 
        └─⟦this⟧ 
└─⟦f64eaa120⟧ Bits:30000752 8mm tape, Rational 1000, !projects 93 02 16
    └─ ⟦6f12a12be⟧ »DATA« 
        └─⟦this⟧ 
└─⟦2f6cfab89⟧ Bits:30000547 8mm tape, Rational 1000, !projects 94-01-04
    └─ ⟦d65440be7⟧ »DATA« 
        └─⟦this⟧ 

TextFile

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;