Big step towards SimpleDB

On Saturday (two days ago) I decided to upgrade the sipsorcery service to the latest version of my code. Prior to that apart from a few minor updates around dialplan processing the sipsorcery software hadn’t been updated for nearly two months. The impetus for Saturday’s update was to take another step closer to getting the service ready to migrate from MySQL to Amazon’s SimpleDB.

There were two major parts to the upgrade:

    1. The data access layer code has been rewritten to add SimpleDB as a persistence option in addition to an SQL RDBMS and XML. As part of that rewrite the DbLinq library was removed and a custom very simplified Linq-to-SQL library was written. The main reason to replace DbLinq was performance. I’d already had to revert to a mechanism of using raw SQL for certain high volume queries in the live sipsorcery site and given that the sipsorcery service only requires extermely simple SQL queries to be used I decided to see if I could come up with a smaller, simpler and hopefully faster Linq-to-SQL implementation.
    2. The timestamp fields in the MySQL database needed to be converted to varchar so that when the time comes the data can be migrated to SimpleDB. With SimpleDB select queries are all string based and as sipsorcery relies heavily on timestamp fields for a lot of its operations the format they are stored in had to be changed.

I was a little bit worriead about the update as anytime database schemas need to change on a running system it can be a bit hairy and replacing the data access layer software in-situ is also not for the faint hearted. However everything went suprising well. There were no complications and the only noitceable effect on the system was that calls were not processed for about a minute.

Subsequent to the upgrade a few minor bugs cropped up. One that appeared to cause a few ATAs issues was that the datetime format in the SIP header fields was accidentally changed to a round trip format, which is what the database now uses and looks like 2009-06-15T13:45:30.0900000, instead of the format mandated by the SIP standard which looks like Sun, 8 Nov 2009 12:12:21 GMT. Apparently that can cause some ATAs to reject responses and have other weird and inexplicable consequences.

A good side effect to come from the upgrade was that the new simplified Linq-to-SQL implementation has reduced CPU consumption by nearly half over what the system was getting using DbLinq. That’s good news because the sipsorcery server was starting to creep back up over 80% average utilisation as more people have started using it. Now it’s back down to an average utilisation in the low 40’s.

sipsorcery-cpu-8nov09

SIP Sorcery CPU utilisation with new Linq-to-SQL implementation

So a big step has been taken towards using SimpleDB as the data store for sipsorcery which will result in the ability to run two redundant sipsorcery servers sharing the same data. The next step is to get the SSH and HTTP duplex monitoring sorted out, add in encryption for sensitive databse fields and then do a bit more testing to make sure the extra latency with SimpleDB requests is being handled appropriately.

  1. UK_101’s avatar

    Re: a few ATA issues.

    By way of interest I recorded the following.
    At 05:30 GMT on Sunday I noticed my Speedtouch 716 router’s VoIP LED was off, I checked with sipsorcery.com and it showed both lines were bound OK. I checked the router log and saw “401 unauthorised” for every register attempt. That would suggest sipsorcery was accepting the router’s log on, but the router was interpreting the response as “401”

    At 06:00 I was just about to reboot my router when VoIP registered. Was something reset? Did the SIP header field format get changed back? Either way it’s been all right ever since.

    All in all a fantastic job, so keep up the good work.

    Reply

  2. XP1’s avatar

    Currently, the server is down for me and my ATA won’t connect. Might this be some upgrade effects?

    Reply

  3. UK_101’s avatar

    Same here. Router’s ATA log shows “VoIP Send Register” and is not getting a response.
    http://www.sipsorcery.com does not respond to my browser and I don’t get a ping reply (but that may be blocked in any case).
    It sounds like the server has gone off line.

    Reply

  4. zcharming’s avatar

    this great upgrate is very good news for everyone. thanks a lot about Aaron’s hard work. but today SS live server was down. cauld you announce it in forum? we can wait for SS rework fine.

    Reply

  5. e-guy’s avatar

    i set up the phone system of an organization i volunteer for with sipsorcery just days ago after reading all the rant reviews. now the server is down and the ATA is 50 miles away. i’ve been getting calls from people’s cell phones asking me what to do. is there any info as to how long and how often we should expect outages like this? we just need to determine if sipsorcery.com is a viable and dependable solution. thanks.

    Reply

  6. kashmiri’s avatar

    SS website is down, and SIP server is down, too 🙁

    Any idea, Aaron, as to when the service might be restored? Just an approximate timeframe would be fine…

    Reply

  7. Aries’s avatar

    It has been down a couple days now……….
    Nobody seams to know what is happening……
    Shall we get back to Voxalot or is it perhaps worth waiting?
    I’d really appreciate any feeback

    Reply

  8. Swill’s avatar

    Any news would be nice.. Is it broke beyond fixing??

    Reply

Reply

Your email address will not be published. Required fields are marked *