Answered MS Translator API

  • Thursday, September 22, 2011 12:39 PM
     
     
    Which is the fastest of all the MS Translator APIs - HTTP, SOAP or  AJAX

All Replies

  • Sunday, September 25, 2011 1:33 PM
    Moderator
     
     

    Hi,

    Normally, REST service is faster than SOAP service . Compared to SOAP, data transfered by REST services usually is smaller. SOAP requires a complete SOAP envelope, which wraps the actual data. In REST services, you can transfer the data only, without a wrapping envelope. Particularly, most of Translator APIs use GET method, thus using REST service is more conveniently than using SOAP service. As for AJAX, it provides a JavaScript library which is used to let us use Translator REST service more conveniently.

    In addition, since the issue is related to Bing, I would recommend you to post a thread at:

    http://www.bing.com/community/developer/f/12245.aspx

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • Monday, September 26, 2011 5:48 AM
     
     Answered

    Hi Sujata,

    While Ming's answer is generally correct for any API with these flavors, for the Translator API it really doesn't make a difference. The size of the packet determines network latency, which has only a small contribution to the overall latency: translation is a relatively complex and thus slow operation, compared to the time the packet spends traveling.

    Use whatever is most convenient:

    - If you are a .Net/C# developer, use SOAP. You get all the convenience of the Visual Studio IDE. Just add http://api.microsofttranslator.com/v2/soap.svc as a web reference, and you are good to go, don't need to think about parameters and character encodings or anything.

    - If you write an in-browser app, you are pretty much locked into JScript, unless you handle all translation logic server-side.

    - If you are a PHP or other server-side script developer, use REST. Be aware that you need to do all encoding by hand: the source string needs to be HTML- and URLEncoded UTF-8.

    - If you are using other data sources for instance from Azure Marketplace, you can also use the OData protocol.

    Chris Wendt
    Microsoft Translator

  • Tuesday, September 27, 2011 5:33 AM
     
     
    Thanks
  • Tuesday, September 27, 2011 5:34 AM
     
     
    Thanks