so, I have a django REST API Server to save all data stream from my client
apps. The Client used some kind python application to send the data to the
rest api through this architecture :

   1. Client apps
      - [1.1] MQTT Client used publish mode
   2. REST API SERVER
      - [2.1] Django REST Framework
      - [2.2] Celery
      - [2.3] MQTT Client used subscribe mode
   3. MQTT Server

The client send data stream that he produced from IoT Device and send the
data to the Server [*2. (REST API SERVER)]* through the with *[1.1.] MQTT
Client publish method*]. On the REST API Server *[2]*, I have a *STANDALONE
SCRIPT *that live in server *[2.3] *to subscribe all message from all user
from MQTT Server and will save the data to the rest api server db *[2.1.]*

The question... how do I make this standalone script running with django
and process the data stream per user thread or process (some kind of
backgroud process that execute parallel based on user thread or process) ?.
So if I have 5 user online to send data, all this 5 online can send the
data to the rest api without wait from another user complete their process.
How do i do that in celery? is it only execute with delay method? or is it
any something best practice that i missed??


On Sat, May 9, 2020 at 9:50 AM Motaz Hejaze <trapper...@gmail.com> wrote:

> please can you put your question in a more clearer way ?
>
> On Sat, May 9, 2020 at 3:33 AM Riska Kurniyanto Abdullah <
> alternative....@gmail.com> wrote:
>
>> Dear all django users,
>>
>> 1. I want to attach my mqtt client script in django apps, where should I
>> put the script to launch them so the script can run as long task running.
>> 2. In mqtt client i have task to save the message in database? how to
>> make this task possible to handle with celery.
>>
>> Thanks in advance.
>>
>> This e-mail (including any attachments) is private and confidential and
>> may contain privileged material. If you have received this e-mail in error,
>> please notify the sender and delete it (including any
>> attachments) immediately. You must not copy, distribute, disclose or use
>> any of the information in it or any attachments.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAG7yD2J4KPV9SUO5-p_UwsyaGDb39DnsA56g8D1nXiNzscpc4g%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAG7yD2J4KPV9SUO5-p_UwsyaGDb39DnsA56g8D1nXiNzscpc4g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-fOtuHvHsu3ergWB2UijR5LPMHgWVqKLF94qCQVYvzuSg%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAHV4E-fOtuHvHsu3ergWB2UijR5LPMHgWVqKLF94qCQVYvzuSg%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG7yD2KSH7BfF-P7O3LeigzYgEBqtdm0TqeJZPE2v%2ByBjgS%2BSg%40mail.gmail.com.

Reply via email to