Thomas Sampson


Ajax Capabilities & Limitations

I have no official training or background in using Ajax technology, but do use it quite frequently when building web applications.

So far I have found it most effective when an AJAX call to a web service is triggered by the user. For example, they start typing in a search box and filtered results appear beneath, or perhaps they click “add comment” and that comment is posted asynchronously. This all works well and tidily through one javascript connection object, and never kicks up much of a fuss! However this post is more of a question than a solution.

My question is, what are the best practices to use for making continous timed calls to a web service / database?

I am currently building a web application where real time synchronisation between users is a key feature.

At first I wanted to approach this problem by using a technique whereby the client leaves an open connection to the web service, with the web service hooking this to a thread and delivering updates to the client (which i planned to achieve by sending JSON object code back and fourth). However, I was informed that this approach is not scalable and in-efficient on most web servers so i looked to polling.

The polling system I am now using means that the client will query the web server at (very) regular intervals in order to update the page. However I get problems when im doing a post to the webserver (perhaps posting a comment) and the page is auto polling in the background. I also have the question, how often should I asynchronously query the web server in order to keep efficient? Should I use separate connection objects in javascript to handle posts and queries? (although i dont think multiple http objects is an option in IE7? ).

As I mentioned my reading and study in this area is limited. I appreciate I could find tutorials on line and try and sequentially find information to answer my own questions, but expect that those who have experience can guide me (and other blog readers) on the orthodox way to do things when it comes to asynchronous web technology!

Anyone can appreciate that the technology here is very powerful. Only a few days ago Apple announced mobileMe and me.com which looks incredible, and very fast! A perfect example of the results I am trying to accomplish in my current project.

Advertisements


Ajax Capabilities & Limitations

I have no official training or background in using Ajax technology, but do use it quite frequently when building web applications.

So far I have found it most effective when an AJAX call to a web service is triggered by the user. For example, they start typing in a search box and filtered results appear beneath, or perhaps they click “add comment” and that comment is posted asynchronously. This all works well and tidily through one javascript connection object, and never kicks up much of a fuss! However this post is more of a question than a solution.

My question is, what are the best practices to use for making continous timed calls to a web service / database?

I am currently building a web application where real time synchronisation between users is a key feature.

At first I wanted to approach this problem by using a technique whereby the client leaves an open connection to the web service, with the web service hooking this to a thread and delivering updates to the client (which i planned to achieve by sending JSON object code back and fourth). However, I was informed that this approach is not scalable and in-efficient on most web servers so i looked to polling.

The polling system I am now using means that the client will query the web server at (very) regular intervals in order to update the page. However I get problems when im doing a post to the webserver (perhaps posting a comment) and the page is auto polling in the background. I also have the question, how often should I asynchronously query the web server in order to keep efficient? Should I use separate connection objects in javascript to handle posts and queries? (although i dont think multiple http objects is an option in IE7? ).

As I mentioned my reading and study in this area is limited. I appreciate I could find tutorials on line and try and sequentially find information to answer my own questions, but expect that those who have experience can guide me (and other blog readers) on the orthodox way to do things when it comes to asynchronous web technology!

Anyone can appreciate that the technology here is very powerful. Only a few days ago Apple announced mobileMe and me.com which looks incredible, and very fast! A perfect example of the results I am trying to accomplish in my current project.


Leave a comment

DVD to MPEG4 Converter

http://handbrake.fr

I’m currently convering a DVD to MPEG4 and everything is going smoothly! Also has many presets for other ouptuts such as ALL video capable Ipods, Apple TV, Animation, TV, PSP, PS3 etc etc. The software does clearly state that it will not rip commercial DVD’s although I stronly assume that this can be bypassed, perhaps by using DVD shrink to decrypt the dvd first. Earlier today I attemped to convert a DVD (Backed up using DVD shrink) to H264. This failed, not sure why just froze at the final stage of Muxing (Mulitiplexing) the audio / video streams together. Instead i’m now using the mpeg4 encoder on the “film” preset, expect an update on completion.