Add documentation for the API service interaction
Signed-off-by: Akashdeep Dhar <akashdeep.dhar@gmail.com>
This commit is contained in:
parent
7020219651
commit
e9e576fc26
2 changed files with 71 additions and 0 deletions
58
docs/webhook2fedmsg/api_service.rst
Normal file
58
docs/webhook2fedmsg/api_service.rst
Normal file
|
@ -0,0 +1,58 @@
|
|||
.. _api_service:
|
||||
|
||||
Interaction using API service
|
||||
=============================
|
||||
|
||||
Elements involved
|
||||
-----------------
|
||||
|
||||
This implementation of the Webhook To Fedora Messaging service project requires
|
||||
the involvement of the following entities.
|
||||
|
||||
Database service
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
1. The database service is expected to allow for creating, reading, updating
|
||||
and deleting webhook forwarding requests per user.
|
||||
2. It is recommended to use an structured database management service like
|
||||
Postgres with an asynchronous means of communication.
|
||||
3. The deployment is suggested to be done either in the same device as the API
|
||||
service or at least in the same network.
|
||||
4. The service should not be exposed on the public internet and any interactions
|
||||
with the service should be resolved internally.
|
||||
|
||||
API service
|
||||
^^^^^^^^^^^
|
||||
|
||||
1. The API service is expected to manage requests for creating messages on the
|
||||
Fedora Messaging bus for the interacting users.
|
||||
2. It is recommended to use an asynchronous web framework like FastAPI or
|
||||
Litestar with object relationship model support.
|
||||
3. The deployment is suggested to be done either in the same device as the
|
||||
database service or at least in the same network.
|
||||
4. The service should be exposed on the public internet and needs to be behind
|
||||
Fedora Account System authentication check.
|
||||
|
||||
API documentation
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
1. The API documentation is expected to elucidate how a contributor can
|
||||
leverage the API service to send messages on the bus.
|
||||
2. It is recommended to let the choice be dependent on the API service
|
||||
technological stack for automation and convenience.
|
||||
3. The deployment is suggested to be done either in the same device as the API
|
||||
service or at least in the same network.
|
||||
4. The service should be exposed on the public internet but needs not be behind
|
||||
a Fedora Account System authentication check.
|
||||
|
||||
Message producer
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
1. The message producer is expected to interact with the Fedora Messaging bus
|
||||
by sending messages requested by the API service.
|
||||
2. The Fedora Messaging library is a good fit for interacting with the service
|
||||
but asynchronous processing is greatly advised.
|
||||
3. The deployment is suggested to be done either in the same device as the API
|
||||
service or at least in the same network.
|
||||
4. The service should not be exposed on the public internet and any interactions
|
||||
with the service should be resolved internally.
|
|
@ -58,6 +58,19 @@ Following it the design document for webhook2fedmsg.
|
|||
|
||||
design_of_webhook2fedmsg
|
||||
|
||||
Implementation
|
||||
--------------
|
||||
|
||||
There are two ways with which we can go about implementing the project. Each
|
||||
of these methods show a variety of advantages to the users with varying
|
||||
requirements from the team building and maintaining the project.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
api_service
|
||||
web_service
|
||||
|
||||
The Good Points
|
||||
---------------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue