Overview
The rdbService example is a complete functional server for accessing SQL databases
such Oracle via an EPICS V4 server, and returning the resulting table ResultSet
data back to an EPICS V4 client. rdbService illustrates a number of facets of EPICS V4's,
use for writing high performance synchronous servers, plus some other stuff:
- channelRPC functionality of EPICSV4
- use of JDBC for accessing Oracle to execute a SQL query within a pattern that retries
the query and can rebuild the connection if any query fails - for high reliability and
to make sure if the database back end ever cycles, the EPICS v4 server need not be restarted.
- Passing string messages back to the client asynchronously - while the server is still
processing the query - in the event of the server detecting an
error or other detecting some other diagnostic.
- Putting complex data into an EPICS V4 pvStructure (the basic complex data object
of pvData), ready for returning results back to the EPICS V4 client.
PvStructures are the basic mechanism for returning "structured" data between
EPICS V4 clients and servers.
- Client side calling the server, and getting the results.
- Unpacking complex data out of a pvStructure
- Illustration of the idea of using the NTTable EPICS V4 "normative type" (though the
definition of an NTTable is likely to change soon)
- Helpers for transformation of array pvData to Java Vectors
- Formatting pvStructure encoded data for printing.
- Use of the NTURI normative type, the EPICS V4 standard for passing requests for
data and arguments.
The "serviceapi" package in src/org/epics/serviceAPI is composed of a single class server and a single class
client, and is intended to illustrate the principles of RPC comms in EPICS V4. It shows
how one defines and populates the pvStructure conforming to the NTURI Normative Type, for making
an RPC query to a pvAccess server, and it shows how the server defines and populates a table of data
conforming to the NTTable Normative Type for encoding the reply.