This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 Q: Why prefetching?
2
3 Possible prefech calls 
4 a) for array fields
5 b) for pointer fields
6 c) for typecasted oid's
7
8 e.g.
9 ====
10 x.y.z
11 x.y.r
12 x.y.r.t
13 x[i].z
14 ((Integer) x).z
15
16 control = 1 byte, oid = 4 bytes, new oid = 4 bytes,  depth = 1/ 2 bytes, name/type = 2 bytes, offset = 2 bytes, index = 2 bytes, typecastcheck = 2 bytes, 
17
18         new oid = The oid found at the Participant side that can be sent to Coordinator sending prefetch message
19
20 Assumptions
21 ===========
22
23 1. Assume a max object size
24         Q: Why? 
25 2. 
26
27 Procedure:
28 1. Compiler identifies which oids and oids.offset field to prefetch(analysing the C code)
29 and supplies that information to the Coordinator machine wanting to commit transaction.
30         Q: How does compiler convey this to a machine? (Design compiler interface)
31
32 2. Machine distinguishes and classifies tuples as "shared" or "unique"
33         e.g. while prefetching x.y.z and a.y.z  if variable x == a then considered shared else unique
34         also consider the case of x.y.z and a.y.z.t  where x == a ( Then prefetch only a.y.z.t)
35 3. If not available in local machine, look up location table and make piles to send 
36    prefetch control messages to all the Particpant machines from which prefetch is required.
37 4. Iteratively look up the data field of the objects at the Particpant side to find objects
38   and send them across to Coordinator.
39 5. Coordinator takes inventory and finds out the location of the objs not found yet.
40         Q: How to implement if some objects are not found through prefetch? 
41         
42 Coordinator messages:
43
44 <TRANS_PREFETCH  - control, participant machine id + tid, tuples of {oids, offsets/index/typecastcheck, offset2,  .....end of chain symbol}, one special
45 oid to indicate end of TRANS_PREFETCH
46 e.g of tuple for x.y.z
47 { depth of the tuple = 3, oid "x", # of bytes of offset "x", # of array index "x" (in this case is -1),  # of bytes of offset "y",
48  # of array index "y" = -1, #of bytes of offset "z" (in this case = -1 to mark  special character for end of tuple), # of bytes of array index "z" = -1}
49         
50
51 Participant messages:
52
53 <TRANS_PREFETCH_RESPONSE - control,tuples of{oids, object header + object)
54 e.g. of tuple for x.y.z  where x and y are found but z is not found
55 {{oid of x, 0 , object header + obj x, special character}, {oid of x , oid of y, object header + obj y, special character},{
56         oid x, oid of z, NULL, special character}}  
57 Q: How can we represent offset, or index or typechecking .....in bytes i.e. short type number?
58 TODO : handle the NULL cases here
59
60         
61