Using Persistent Sockets in Tropo.com Applications

September 10th, 2009 by Jason Goecke

While Tropo supports RESTful Web Services as a form of moving data to and from the communication cloud, it may not always be fast enough for all applications. There are apps that require the lowest possible latency, for example, when mobile devices become input devices. The unique approach of Tropo, allowing developers to host scripts in our cloud, allows you the ability to write applications that take direct advantage of persistent sockets. This means that you may open the socket once and then stream data to your remote application in realtime without having to establish HTTP connections each time.

I recently created an example of this using Ruby to serve a socket using EventMachine, and then writing a script on Tropo that opens a socket and sends touch-tones (DTMF) down the socket immediately as they come in. Here it is in action:

The code examples may be found here.

Related posts:

  1. WebSockets and Tropo, Putting the Real-Time in Your Communications
  2. Tutorial: Click-to-Call applications (w/ conferencing)
  3. How-To: Distinguish PSTN, Skype, iNum, and SIP in your Tropo applications
  4. Talking to the Cloud: Build Speech Recognition Applications with Tropo
  5. Introducing Tropo… a new way to develop voice applications in languages you already know…

Tags: , , , ,

Leave a Reply

Please note: By submitting a comment you agree to comply with our Comment Policy. We welcome all comments, positive or negative, but do reserve the right to remove all or part of blog comments that do not comply with our policy.

Additionally, the first time you leave a comment on this blog, it will be held for moderation. After that first comment has been approved, future comments will be posted without delay.

Additional comments powered by BackType