On Thu, Feb 23, 2017 at 6:39 PM, Cédric Krier <cedric.kr...@b2ck.com> wrote:

> 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.


Hey Cedric,

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.

Perhaps I should remove the term queue from the model as this model just
stores what was sent to the actual queue.

Cheers,

-- 
*Vincent Bastos*
*Lava Lab Software*

-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/CACLX58BPakmJCwmur9xrgr-JL8iOFND4Qmdyt6dAXOWd3iQs3Q%40mail.gmail.com.

Reply via email to