Query_sm command

Query_sm command SearchSearch
Author Message
ashot shahbazian
New member
Username: Animatele

Post Number: 35
Registered: 06-2004
Posted on Tuesday, August 18, 2009 - 01:40 pm:   

Hi Bryce, Des

Is there support for query_sm command? We have a few customers who need it, and I recall we've tried testing it in some pervious version of the product without success.

From what I understand it isn't a difficult thing to implement, the command would query the existing database of DLR and return the response in a specified format. Any chance you could make it work?

Kind regards,
Ashot
Bryce Norwood - NowSMS Support
Board Administrator
Username: Bryce

Post Number: 7836
Registered: 10-2002
Posted on Thursday, August 20, 2009 - 05:09 pm:   

Hi Ashot,

This is something that we have considered.

We have also had a few requests from customers who want to query the status via HTTP.

It would be a good addition for us to implement.

The only problem is that right now, we don't actually track the status in our database.

We could, but we've been concerned about the performance implications.

Currently, when a receipt is received, we query the database to match the message ID, but we don't write the status to the database.

The question is how much impact the extra database write would have on performance.

Performance in this area has been a long time struggle. Since we've made so much improvement in the receipt tracking performance over the past 18 months, we've been hesitant to do anything that might slow it down. Since we wouldn't be updating a key or index field and would likely just be toggling a single byte field, I can't imagine it having that much impact ... but we're being cautious.

I'll put this in my follow-up list to revisit in a few weeks.

-bn
Alex Kaiser
New member
Username: Alex_k

Post Number: 32
Registered: 07-2006
Posted on Friday, August 21, 2009 - 04:43 pm:   

Hi!

I suggest to implement that feature over http callback. But that is only possible if NowSMS duplicates all CDR in database (like MSSQL).

Client create Query_SM command, NowSMS generates HTTP request (query to db) and then sends back the response. I think that isn't resources consuming operation, everything can be made in separate threads.

Regards,
Alex K.
ashot shahbazian
New member
Username: Animatele

Post Number: 36
Registered: 06-2004
Posted on Saturday, August 22, 2009 - 02:22 pm:   

Hi Bryce,

Understood. I think the status should be written to the database only if a specific configuration parameter is set, such as RetainMessageStatus=Yes. Thus, any possible issues with performance would be isolated to customers who want query_sm functionality.

If the parameter is set, the response to the query_sm command would return the real status. If the setting is not enabled it should return something like FAILED.

We can in fact test the impact on performance if you could make it work quickly enough. As you know, we have a "thin" layer of our own applications built around SMPP servers. What we can do is not only watch the query_sm and resp from some live customers, but also trigger the "thin" layer to send a query_sm every time a DLR is fetched, for all traffic. Traffic is very dense and varied, so I'm sure the feedback on how that'd affect performance would be invaluable.

Other cool features can be implemented, if retaining the stat proves to be light on performance. For example, monitoring delivery rate per-link and/or per-destination network, or means for triggering automatic switchover to a backup uplink.

Such extra features could even be implemented by customers if you publish the format of the db.

Kind regards,
Ashot