Debian Codegraph @

wac/README

raw
1 This is the AC library - a C interface to acedb
2 Authors: Mark Sienkiewicz, Jean Thierry-Mieg (2003)
3 --
4
5 There are two implementations here:
6
7 acclient is a client library. It is known to work with RPC servers
8 (e.g. gifacemblyserver) and AceTCP servers (tgifacemblyserver). It has
9 code to support Sanger Acedb 4.9, but that support is incomplete.
10 [3/2003]
11
12 acinside provides the same interface, but it runs inside the database
13 (either in tace or a server) and takes advantage of direct access to
14 database functions to improve performance. It is fully tested [11/2003]
15
16 If you limit yourself to using only AC calls, your code can run equally
17 correctly either inside or outside the database.
18
19 Note that you might expect acinside to always be significantly faster,
20 but in fact many applications use a pattern of transactions where the time
21 spent transmitting data between the client and server is dwarfed by the
22 time spent performing the actual query.
23
24
25 Compiling with AC
26 --
27
28 Your program should
29 #include <wac/ac.h>
30
31 wac/acctest.c contains test code that exercizes the library. It can also
32 serve as sample code for some of the features.
33
34 To compile your application:
35
36 in the AceDB makefile:
37 include $(LINK_ACC) in your dependencies
38 include $(LINK_ACC) in the list of object files to include
39
40 outside the AceDB makefile
41 get the value of LINK_ACC from wmake/truemake and link
42 with those object files
43
44
45 Compiling the actual library
46 --
47
48 You can compile the library by the command
49 make libaccl.a libacs.a
50 or, relying on dependencies, by compiling a program that uses it, e.g.
51 make accmd
52
53 The supported transport mechanisms are selected by defines in
54 wac/acclient_.h; you can add/remove transports as you wish. The
55 dependencies are correct for this library, so it is sufficient to
56 change the include file and re-compile.
57
58
59 Test code
60 --
61
62 acctest is the "ac client test" program.
63 acstest is the "ac autonamous test" program.
64
65 1) initialize the database:
66
67 pushd wac/testdb
68 sh init
69 popd
70
71 2) test the autonomous ac code type
72
73 bin*/acstest wac/testdb all | tee acstest.out
74
75 3) test the client ac code type
76 a) Start a server
77
78 bin*/saceserver wac/testdb -port 65432
79
80 b) run the client code
81
82 bin*/acctest s:localhost:65432:: all | tee acctest.out
83
84 4) verify the outputs, they may differ from the standard out put by dates and machine names
85
86 diff wac/testdb/acstest_correct_output acstest.out
87 diff wac/testdb/acctest_correct_output acctest.out
88
89 The last paramenter (here all) is a list of tests to run in order.
90 Test "all" performs a test of much of the library, and the expected output is available.
91
92 If you change the test program or library, you must update that file.
93
94
95 5) clean up
96
97 pushd wac/testdb ; sh ./clean_up ; popd
98
99 Files here
100 --
101
102 Common code
103 --
104
105 ac.h
106 common include file. clients only need this file
107
108 ac_.h
109 internals common to both library implementations. If you are
110 adding something, chances are that it does not really belong
111 here.
112
113 actable_.h
114 actable.c
115 AC_TABLE section of the code - used in both libraries
116
117
118 Client library
119 --
120
121 acclient_.h
122 acclient.c
123 the AC client code.
124
125 acclient_acetcp.c
126 // acclient_rpc.c removed, mieg may 17 2003
127 acclient_socket.c
128 Ace network protocol implementations. all of these files are
129 included in acclient.c, but each file is mostly ifdefed out
130 if it's protocol is not wanted
131
132 ace-conn-hacked.c
133 code for acclient_socket.c to talk to the socket server - copied
134 from Sanger's Ace-Conn and hacked extensively to work in our system.
135
136 acctest.c
137 a test program for testing the database client code. uses the
138 database in testdb
139
140 accmd.c
141 sends commands to the database using ac_command(). This is much
142 like aceclient, and will replace aceclient eventually.
143
144
145 Internal library
146 --
147
148 acinside_.h
149 acinside.c
150 the AC inside-the-database implementation
151
152
153
154 Documentation
155 --
156
157 README
158 this file
159
160 list
161 checklist of which features are present in each implementation
162 NOT CURRENT
163
164 show-c
165 description of the "show -C" format used by the client library
166
167 implementation
168 some notes on database commands that an alternate
169 implementation of the client library might use
170
171 testdb
172 scripts to initialize a test database. The database contains
173 exact data that acctest expects to find.
174