terox / smpp-cli

Simplifies the way to handle SMS to SMPP server
MIT License
9 stars 2 forks source link

Production ready? #1

Open zspine opened 6 years ago

zspine commented 6 years ago

Hi

@terox This is the first library I have ever seen providing proper way to handle smpp with php. Is it safe to use it in a production environment? like 1 million sms a day

terox commented 6 years ago

Hello :)

We are using this library on production without many problems, but 1M of SMS are a lot of SMS. Maybe there are better enterprise solutions.

We known that there are little bottlenecks when DLRs are enabled. This library uses also other library to handle SMPP underthehood.

If you want I can help you to improve the library.

zspine commented 6 years ago

Hi terox,

Thank you very much for the quick response. okay now I understand :)

Yes it makes sense to improve this library, but don't you think it's better to handle it through a queue server? for example:

  1. PHP (Any language) > RabbitMQ > NodeJS PHP publishes the smpp parameters to rabbitmq and nodejs acknowledges it at this point nodejs can publish the status of the message through another queue

  2. SMPP acknowledgement and dlr can be updated back to PHP via a queue or a callback url

(PHP is just an example and this can be achieved from any language)

terox commented 6 years ago

Hello @zspine ! Thank you for you answer.

You are right. The point 1 is "the way". On production we are using this architecture. We create a RabbitMQ message for each SMS; then the consumer catch a message, connects to smpp-cli (through DNode, but could be a another type library/protocol) to sent the message to SMPP without close the connection. Keep in mind that many providers are very sensitive on this issues, and sysadmins maybe will block you especially on high volumes. You should maintain the permanent connection to SMPP.

The point 2 is made (in our case) by a command line callback. But the queue example that you provides I think that is much better. We known that there are issues and bottlenecks on this point. The much part of DLRs for example are not received until the process is restarted and it keeps lock until a major part of DLRs are received. This part, definitivily needs improvements. Maybe creating a pool of process workers for each tasks (send and receive) like nginx or other programs. I need research on this points and the SMPP protocol, but it is not easy.

I hope that it helps! ;)

zspine commented 6 years ago

@terox thanks for the update!

I agree with your points and YES it is very helpful!

Cheers!

terox commented 6 years ago

@zspine there are lot of work to do in our ("official") PHP client and smpp-cli. Any contributions are welcome. I will try to help you if is necesary. Open any PR or issue to talk about it. Your points helps me to detect other user/companies needs and try to still improve ;)

zspine commented 6 years ago

@terox definitely 👍 AFAIK most important part is adding support for different smpp operations. PR is the way to go....

Cheers!