On 2017-02-22 23:04, Vincent Bastos wrote:
> I would like to suggest a module to manage an SMS queue. I am interested to
> get feedback/comments.
>
> I need to create a module to send SMS's via an SMS gateway provider called
> Twilio [1]. The reason for this queue is because users should be able to
> tell if messages have been sent or not without having to access another
> system.
>
> The idea is that we could have a generic SMS queue module which is
> basically a single model: SMSQueue.
Very bad idea to implement a queue with SQL table, especially using
isolation level as repeatable read.
This is even worst if the queue has to work with external system which
does not support 2 phases commit.
The best solution is to interface with the information system of the
gateway.
On 2017-02-23 18:53, Vincent Bastos wrote:
> On Thu, Feb 23, 2017 at 6:39 PM, Cédric Krier <cedric...@b2ck.com> wrote:
> The way the Twilio API works is that you send it a request to send a
> message and it manages the queue. In effect, The queue is not in Tryton,
> but in Twilio, but Tryton has a record of what messages were sent to Twilio.
>
> When you send a "request to send an sms" to Twilio it allows you to add a
> call back url that Twilio will call when the state of the message changes.
This will be doable if twilio support 2 phase commit and if it retries
the callback if they failed.
But I do not see a generic design here, at best a twilio module.