Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Asynchronous communication with Endoints via celery tasks #37

Merged
merged 5 commits into from
Jul 4, 2024

Commits on Jul 4, 2024

  1. Django: integrate Celery task queue to handle asynchronous tasks

    Integrate Celery task queue. Redis serves as the message broker for the
    Celery task queue. Redis can run in a seperate container with
    of-the-shelf available images.
    
    Gevent is used an efficient alternative compared to multiple python
    processes, where each process has to load it's own runtime resulting in
    high memory requirement. Celery is used for functions that wait for ReST
    API calls to Leshan, an IO-bound task. Currently, Celery starts
    1 worker (1 CPU), however, this worker is sufficient to handle more than
    100 simultaneous ReST API calls efficiently.
    
    Signed-off-by: Jonas Remmert <jremmert@gmx.net>
    jonas-rem committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    9fc3434 View commit details
    Browse the repository at this point in the history
  2. docker: reduce stop grace period

    Signed-off-by: Jonas Remmert <jremmert@gmx.net>
    jonas-rem committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    a0284e7 View commit details
    Browse the repository at this point in the history
  3. django: model: add type choices to model

    Signed-off-by: Jonas Remmert <jremmert@gmx.net>
    jonas-rem committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    0ce0471 View commit details
    Browse the repository at this point in the history
  4. django: implement asynchronous requests

    The asynchronous function process_pending_operationss checks the
    database for queued endpointOperations and sends them to the related
    endpoint. The function is called e.g. during data insertion via the
    Admin dashboard or during an registration update of an endpoing.
    
    Signed-off-by: Jonas Remmert <jremmert@gmx.net>
    jonas-rem committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    6ad9305 View commit details
    Browse the repository at this point in the history
  5. doc: Update asynchronous send documentation

    Signed-off-by: Jonas Remmert <jremmert@gmx.net>
    jonas-rem committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    abb3f7f View commit details
    Browse the repository at this point in the history