mosquitto-users team mailing list archive
-
mosquitto-users team
-
Mailing list archive
-
Message #00039
Re: Mosquitto+Python+MySQL+APNS
Hi Yun,
Yes, you're correct but with one additional point. Your special client
isn't just for saving messages to the database, it's for the server
side application processing - i.e. turning it into a chat application
rather than simply clients connected to an MQTT broker. It would also
be doing the client online/offline detection and sending notifications
via ANPS for example.
Just one other point - the Python module mosquitto.py is to allow you
to implement MQTT clients in Python, it isn't a wrapper around the
broker. It's still what you want though!
Cheers,
Roger
On Tue, Sep 18, 2012 at 10:28 AM, Yun Kong Tech
<contactyunkong@xxxxxxxxx> wrote:
> for the "client" you are talking about here, just want to make sure i
> understand correctly:
>
> what i should do is:
>
> 1. just run a regular broker as the original mosquitto broker on the server
> side. I should not modify it at all;
> 2. meanwhile, i should implement a special client on the server side, adding
> the database saving functionality to it;
> 3. for all the messages received by the broker, the special client will
> subscribe/receive it and store it to the database;
> 4. the broker will distribute the message to all the regular subscribers on
> mobile client side.(should I add the database storing method on the mobile
> mosquitto client, depending on do i need to do the same database saving
> thing on mobile)
>
> so the sole purpose of the special client on the server side is just "saving
> the messages to database".
>
>
> -Horace
References