Skip to content

Commit fde042c

Browse files
committed
Documentation on the http-based Worker Replication service
1 parent 4d08704 commit fde042c

File tree

6 files changed

+904
-0
lines changed

6 files changed

+904
-0
lines changed

doc/dev/api/TODO.rst

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
TODO
3+
----
4+
5+
6+
Finish in a scope of the current ticket DM-42005 before the X-Mas break:
7+
8+
- [**x**] Think about the locking mechanism of the method WorkerHttpRequest::toJson(). The method
9+
acquires a lock on the mutext while the request may too have a lock on the same mutex
10+
while processing the request in WorkerHttpRequest::execute(). This may result in a deadlock.
11+
Perhaps no locking is needed as all since the resulting data are not lock sencitive?
12+
- [**x**] Finish implementing a hierachy of the HTTP-based worker requests
13+
- [**x**] Finish implementing the request processor for these requests
14+
- [**x**] Add the new service to the Condfiguration and Registry to allow the Controller to send requests
15+
to the worker via HTTP
16+
- [**x**] Display connection parameters of the new service on the Web Dashboard
17+
- [ ] Document the REST services in the documentation tree.
18+
- [ ] Manually test the new implementation externally using ``curl`` or Python's ``requests`` module.
19+
Think about the test cases to cover the new implementation.
20+
- [ ] Extend the integration tests to cover the new implementation.
21+
22+
Finish in a scope of a separate ticket during/after the X-Mas break:
23+
24+
- [ ] Implement the MessengerHttp on the Controller side of the protocol. The class will
25+
be providing the multiplexing API for the Controller to send requests to the worker.
26+
The initial implementation will be based on the simple http::AsyncReq.
27+
- [ ] Create a parallel hierarchy of the HTTP-based request & job classes on the Controller
28+
side of the protocol.
29+
- [ ] Test the new classes.
30+
- [ ] Implement the MessengerHttp to reuse the socket connections for sending multiple requests
31+
to the same worker.
32+
- [ ] Test the new implementation to ensure it works the same way as the old one.
33+
- [ ] Remove the old implementation of the Controller - Worker protocol.
34+

doc/dev/api/index.rst

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.. note::
2+
3+
Information in this guide corresponds to the version **40** of the Qserv REST API. Keep in mind
4+
that each implementation of the API has a specific version. The version number will change
5+
if any changes to the implementation or the API that might affect users will be made.
6+
The current document will be kept updated to reflect the latest version of the API.
7+
8+
##############################
9+
The internal REST API of Qserv
10+
##############################
11+
12+
.. toctree::
13+
:maxdepth: 4
14+
15+
introduction
16+
repl-worker
17+
TODO

doc/dev/api/introduction.rst

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
.. _qserv-api-introduction:
2+
3+
Introduction
4+
============
5+
6+
The Qserv REST API is a collection of RESTful web services that provide access to various components of the Qserv system.
7+
The API enforces a specific interaction model between the client and the server. The following highlights are worth mentioning:
8+
9+
- All ``POST``, ``PUT`` and ``DELETE`` requests must be accompanied by a JSON payload.
10+
- Responses of all but a few select services are in JSON format. Exceptions are documented in the API documentation.
11+
- Schemas of the JSON requests and payloads are defined in the API documentation.
12+
- The API is versioned. The version number is included in the URL path of the ``GET`` requests, and it's
13+
included into the JSON payload of the ``POST``, ``PUT`` and ``DELETE`` requests.
14+
- Critical API services are protected by an authentication mechanism. The client must provide a valid
15+
authentication token in the JSON payload of the ``POST``, ``PUT`` and ``DELETE`` requests.
16+
No authentication is required for the ``GET`` requests.
17+
18+
The general information on the structure of the API can be found in the following document:
19+
20+
- :ref:`ingest-general`
21+
22+
The rest of the current document provides detailed information on the individual services that are available in the Qserv API.

0 commit comments

Comments
 (0)