in reply to Tk vs browser-based applications

The first thing that comes to mind, as to the difference, is that Tk will maintain "state" in a socket connection. A browser running cgi is a stateless, "one-shot-transaction". In your particular example, it probably wouldn't matter.

Also you have the overhead of all the apache software, but if it already is there, that is no problem, except that when apache is overloaded, your cgi app's speed will suffer.

The biggest thing to consider is whether you want to allow people to access this thru the internet(or intranet). If it is to be run only at your place of business, you would likely get more speed with Tk. Why, because all Tk would have to do is get the data, build an image, and display it. With a browser, you need to connect, then the cgi connects to Mysql, then the graphic needs to be built, then the "possible big graphic" has to be sent over the network. With Tk, the only thing needed to be sent over the network is the relatively small mysql data.

If your Mysql server allows remote connections, a Tk app could connect directly to it thru the internet, and that may be you bottleneck, where your Mysql server will only accept connections from pre-desiginated ips, and almost force you to use apache, but you havn't given the details of your Mysql setup.

I would go with Tk , you will have more "programming fun" ( but I'm biased :-) ).


I'm not really a human, but I play one on earth. flash japh