~ubuntu-branches/ubuntu/gutsy/soprano/gutsy

« back to all changes in this revision

Viewing changes to server/Mainpage.dox

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2007-10-12 14:43:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20071012144348-yajzi51v4k23ahxf
Tags: 1.95.0~beta2-1ubuntu1
* Sync with Debian
* Add versioned build-dep on raptor

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * \page soprano_server Soprano Server
 
3
 *
 
4
 * %Soprano provides simple server and client librarys which allow for remote access to %Soprano models.
 
5
 *
 
6
 * \sa \ref soprano_server_protocol, Soprano::Server, Soprano::Client
 
7
 */
 
8
 
 
9
/**
 
10
 * \page soprano_server_protocol Soprano Server Protocol
 
11
 *
 
12
 * \warning The protocol described on this page is used internally by the Soprano TCP and Unix socket server and client.
 
13
 * Normally there is no need to deal with it except if you want to write a client or server in another
 
14
 * programming language.
 
15
 *
 
16
 * The server protocol is quite simple and is based on a set of commands and binary serializations for
 
17
 * data types. It has been optimized for speed and nothing else so it always tries to comunicate as
 
18
 * little data as possible.
 
19
 *
 
20
 * \section soprano_server_protocol_commands Commands
 
21
 *
 
22
 * Commands are identified by unsigned 16bit integer values (native bit order). Issuing a command
 
23
 * is done by sending the command number followed by the command parameters.
 
24
 *
 
25
 * The following table lists the available commands.
 
26
 *
 
27
 * <table>
 
28
 * <tr><th>Command</th><th>Code</th><th>Parameters</th><th>Return values</th><th>Description</th></tr>
 
29
 * <tr><td>Create model</td><td>0x1</td><td>name (string), settings (List of #Soprano::BackendSetting)</td><td>model ID (unsigned 32bit int)</td><td>Retrieve the ID for a model (if the model does not yet exist, it is craeted.</td></tr>
 
30
 * <tr><td>FIXME...</td></tr>
 
31
 * </table>
 
32
 *
 
33
 * \section soprano_server_protocol_types Types
 
34
 *
 
35
 * The default implementation of the protocol uses QDataStream. Thus, all basic types are encoded as QDataStream does it.
 
36
 *
 
37
 * \subsection soprano_server_protocol_types_node Soprano::Node
 
38
 *
 
39
 * A %Soprano node starts with the node type encoded as unsigned 8bit. For the possible values see Soprano::Node::Type.
 
40
 * If it is a literal node (Soprano::Node::LiteralNode) after the type follow the literal value (Soprano::LiteralValue)
 
41
 * and the language (string). If it is a resource (Soprano::Node::ResourceNode) or blank node (Soprano::Node::BlankNode)
 
42
 * after the type follows the URI of the node (URI). If it is an empty node, nothing follows the type.
 
43
 *
 
44
 * \subsection soprano_server_protocol_types_statement Soprano::Statement
 
45
 *
 
46
 * A %Soprano statement is encoded simply by encoding the subject, predicate, object, and context node in that order.
 
47
 *
 
48
 * \subsection soprano_server_protocol_types_literalvalue Soprano::LiteralValue
 
49
 *
 
50
 * A %Soprano literal value is encoded as a QVariant: The type of the data (unsigned 32bit) followed
 
51
 * by a null flag (8bit) and the data of the specified type.
 
52
 *
 
53
 * \subsection soprano_server_protocol_types_bindingset Soprano::BindingSet
 
54
 *
 
55
 * FIXME...
 
56
 */
 
57
 
 
58
/**
 
59
 * \namespace Soprano::Server
 
60
 *
 
61
 * \sa \ref soprano_server, Soprano::Client
 
62
 */
 
63
 
 
64
/**
 
65
 * \namespace Soprano::Client
 
66
 *
 
67
 * The server clients have the following restrictions:
 
68
 *
 
69
 * <b>TCP %Client:</b>
 
70
 * \li No signals are emitted (Model::statementsAdded() and Model::statementsRemoved())
 
71
 * \li No permission handling, i.e. each process running on the machine can access a running %Soprano server,
 
72
 *     indifferent of the user id of the server process.
 
73
 * <!--\li Queries are always transmitted as strings and thus, might be serialized on the client side and parsed
 
74
 *     again on the server side when using Model::executeQuery( const Query& ) const.-->
 
75
 *
 
76
 * <b>Unix Socket %Client:</b>
 
77
 * \li No signals are emitted (Model::statementsAdded() and Model::statementsRemoved())
 
78
 * <!--\li Queries are always transmitted as strings and thus, might be serialized on the client side and parsed
 
79
 *     again on the server side when using Model::executeQuery( const Query& ) const.-->
 
80
 *
 
81
 * <b>DBus %Client:</b>
 
82
 * \li No restrictions
 
83
 * <!--\li Queries are always transmitted as strings and thus, might be serialized on the client side and parsed
 
84
 *     again on the server side when using Model::executeQuery( const Query& ) const.-->
 
85
 *
 
86
 * While the TCP comunication is the fastest due to its missing permission handling it is not recommended to use
 
87
 * it yet. The best solution at the moment is the DBus client. Although being the slowest (slightly slower than
 
88
 * the Unix Socket client) it is reliable and feature-complete (signals are transmitted).
 
89
 *
 
90
 * \sa \ref soprano_server, Soprano::Server
 
91
 */