summaryrefslogtreecommitdiff
path: root/orbsvcs/examples/PSS/README
blob: bd87fa9ac2c319ac58340091b409712a61bfa2ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58

This example show the usage of PSS for persistently saving data. 


For this example, we will have a simple_naming.idl which will have just
two methods: bind and find. As you can guess, the bind function is to
be used for binding the name of an object with its object
reference. And, the find function helps find the object reference
related to the 'name'. To make it simple, we will just bind the
stringified form of a name to the stringified form of the object reference.

How to Run
----------

As with the naming_service, we will first run the Simple_Naming

% ./Simple_Naming -o simple_naming.ior


Next Run the server giving it the reference to Simple_Naming. As this
is an example, didnt bother about making the Simple_Naming multicast
enabled... kept it simple.


% ./server -ORBInitRef Simple_Naming=file://simple_naming.ior

The Simple_Naming writes down the server -> IOR mapping to a file
(Data_Store) .. this serves as the database used to help make the PSS
persistent.


Then Run the Client

% ./client -ORBInitRef Simple_Naming=file://simple_naming.ior


On Success, you will not get debug statements. 


To test the persistency offered by the Persistent State Service, lets
keep the server running .. but kill the Simple_Naming.

% kill -9 pid_of_simple_naming

Now, restart the Simple_Naming as before

% ./Simple_Naming

And, run the client to see if the Simple_Naming can help get the
request sent to the correct server.


% ./client -ORBInitRef Simple_Naming=file://simple_naming.ior



Note: If running the example fresh, make sure you remove the
previously generated 'Data_Store'.