| By Basil Voronkov at 2009-04-19 |
It finally happend! Now WideStream can be translated into any language with no need to play with its source code or even to use any development tools such Microsoft Visual Studio. All you should do now is just download the special localization tool - WideStream String Table Editor (which can be always found in WideStream SDK - a set of useful tools that we start to release with Beta 3).
This tool allows you to create new localized string tables for WideStream in XML format. You can edit multiple files at a time. In order to create a new string table first load an existing string table (choose File->Open string table) that will be used as a template for new string table. String tables for WideStream has a .wsresx extension. You can find several inside the WideStream SDK package - for example, en-US.wsrex which is a default one and contains an english language translation of WideStream user interface.
Once you have loaded an existing string table click File->Create new string table. A program will ask you to specify a name of the file for the new string table. Bear in mind that a file extension should always be .wsresx when a file name - a correct IETF tag. For example:
- en-GB.wsrex for english (United Kingdom)
- es-MX for spanish (Mexico)
- fr-BE for french (Belgium)
- de-CH for german (Switzerland)
You can also use more generic language tags if you don't want to specify concrete culture. For example, 'ru' for russian, 'en' for english, 'es' for spanish, etc.
I have generated a full list of available language tags that you can use as a reference.
When a file for the string table is created you will be able to see a grid with three columns - the first one contains a internal string key, the second translation into english (if you use english string table as a template) and the third - your translation:
If you don't provide localized versions of some strings application will acquire them from the default string table which is in english.
In order to use a new string table in WideStream simply copy it to the samefolder where WideStream is installed (or inside Resources folder). After that you will be able to select a desired language in the Options dialog. |
| By Basil Voronkov at 2008-12-19 |
Starting from Beta 2 WideStream supports custom extensions. Moreover it is possible to add a support for a new protocol (by default only HTTP and FTP are supported) without the need to make any changes to the rest of the application. Also you may implement custom download adapters (see previous blog entry for details) as well as custom browser integration providers.
Basically all you need to do is to create a manifest.xml file and place it in the same folder where WideStream is installed. By default an application has an embed manifest that includes configuration of HTTP, FTP protocols and other standard functionality. You can take a look at the standard manifest in the project repository . When you create a custom manifest.xml file in the application folder it is processed in addition to the standard one.
For now manifest has three sections - Integrations, Protocols and Adapters. Inside each of the sections you can declare your own add-in by providing add-in name, description, a fully qualified name of the implementation class and, depending on the add-in type, a fully qualified name of the add-in options class.
As you can see native WideStream functionality such as FTP download support which is present since the very first public release is now being "added" to the application as an add-in. (By the way you can find a list of all active add-ins using a new Add-Ins dialog accessible from Tools->Add-ins menu).
What this functionality gives? For example, WideStream can't download from your favorite site (that requires to perform some actions such as submission of HTML form with some site specific information prior to download) - there is no problem at all, just create your download adapter as it is done now for the VBulletin attachments or YouTube video. WideStream doesn't support integration with your browser? You can teach it how to integrate with it.
Moreover if you are planning to implement your own network application - for example an SSH/SFTP client - you don't have to create all the application from scratch. You can use all the functionality that is already implemented in WideStream such as configuration engine (user interface for your settings is being generated dynamically based on your Options class), host manager, download queue management and much more. You can concentrate your effort on the SSH/SFTP client implementation and save up a lot of time. |
| By Basil Voronkov at 2008-12-16 |
In most cases download process is pretty straightforward – you are requesting a specified file from a specified host and start to read it in chunks in a single or multiple connections. Certain servers however could be more demanding. They might require you to authorize using their own specific authorization technology or to set some special cookies or even to maintain an opened session while downloading a file.
There is a number of ways to solve these problems – the most popular one which is used in most download managers is to obtain all specific download details (such as which cookies to set) through the browser integration.
What does it mean? For example, you see a link on a web page in your Internet Explorer. You have navigated to this page using your browser which means that you already authorized even if you didn’t enter any credentials – the host have sent to Internet Explorer everything it needs to open a user session, your browser has memorized that and now when you click a download link it will send all these “authorization details” as we can call it prior to starting download. That is why it works.
Try to copy this link and manually add it to your download manager. Does it work? Nope. Why? Obviously because your download manager is not a browser - it just requests a file, it doesn’t communicate with the site, asking it which information needs to be set, how to authorize and so forth.
And now – assuming that your download manager is integrated with Internet Explorer – try to download the same file by right clicking a link and selecting your download manager or even, depending on the integration technology, just by clicking a link directly. Do you see the difference? Of course, now it works. Why? The answer is pretty simple – Internet Explorer tells your download manager – hey, man, you need to set up these cookies. And that is what download manager does.
Sounds like a good solution? But in fact it is not as good as it sounds.
- First of all it only works if you click a download link in your browser. It is not really obvious even for me – from a user standpoint – why the hell it works when you click a link in a browser and doesn’t when you click a link in IM sent by your friend? Does it mean that we need an instruction on how and where to click links so they will always work?
- WideStream starting from Beta 2 also has a support for browser integration (at this moment only Microsoft Internet Explorer 6 and 7 and Opera 9) but browser integration should always be integration – it shouldn’t change a behavior of your download manager. It something doesn’t work than it doesn’t work. If it works than it should always work.
- And now the headshot – your download manager obtained cookies from your browser, starts to download, open multiple connections, shows you that resume download is fully supported – everything seems to be perfect except of one thing. The information provided to your download manager is likely to expire after a short period of time (usually 20 minutes). If you pause your download and try to continue it later... well, you will have to start it from the very begging. Because you download manager doesn’t know how to obtain all the authorization details, it simply parasitizes on your browser. And of course you should know about that in advance – your download manager may pretend that pause feature is supported, don’t believe it! It is not always true. Probably we also need a special instructions in which cases we really can pause and in which cases we just pretend to be able to do it.
As for me these are pretty serious disadvantages. Finally all this functionality – which is I believe only semi-working – might be completely broken if you’re using a browser that is not “supported” by your download manager. For example, I am playing with Google Chrome for the past several weeks and most of download managers can’t integrate with it.
Of course after all this criticism it is reasonable to ask – and if there is another way, a different approach without all these annoying contras that we can offer? Fortunately the answer is Yes.
As you can notice we come to all these difficulties because of an assumption mentioned at the very begging of this post – that download manager is not a browser like Internet Explorer. And why not? Of course it doesn’t mean that we should display the web pages and force user to navigate between them before starting our download – but who says that we can’t authorize against a site if a site requires us to do so?
- It will work in all the cases – when you click a link in a browser, when you click a link in IM, when you don’t click a link. It doesn’t matter, it just simply works.
- Guess what? You can pause and resume your download in a day or in a week (of course if a web server supports that).
In the cases when a site requires you to enter credentials in an input form – in other words when some sort of user interaction is needed before a download can start – we can implement site specific handlers that can do all the job. These handlers can automate authorization process, limit the maximum number of connections that can be opened for this site (which will override all other maximum connections settings), set other site specific cookies and so forth.
That is one of the most interesting features along with download acceleration that will be introduced in Beta 2. We call it download adapters. More over this feature will be extendable – so you will be able to write your own download adapters for WideStream or to install adapters developed by other people. And of course a default adapter will try to handle all the requests in a browser way as well.
|
| By Basil Voronkov at 2008-10-28 |
As you could notice many download managers claim that they can speed up your downloads up to 400% or even 500% by using such a feature as download acceleration. It may seems like a magic - you install a small program and it makes your internet connection several times faster. But what actually a download accelerator does?
When you downloading a file from a certain server a speed of your download is a tradeoff between two basic parameters - the speed of your internet connection (let's call it X) and a speed with which a target server is actually fetching your desired file (let's call it Y). If X is smaller than Y than your maximum download speed is X. If X is greater than Y than in a normal situation your maximum download speed is Y. Also bear in mind that all these calculations are correct only for a case when you downloading one file at a time.
In the first case (when X is smaller than Y) there is no known technology to speed up your download. I can't think of one even theoretically. It means that if you have a slow internet connection (like dial-up) or you normally download from fast servers download acceleration won't help you at all (in fact it may even slow down your downloads - I'll explain why a little bit later).
In the second case (when X is greater than Y) there is a method to make your download faster. How it works? When Y is lower than your internet connection speed it means that the bandwidth of a target server is limited (which may be done by a number of reasons) - but it is limited per connection and not totally. Even a server with limited bandwidth allows to download several users at a time. So the recipe is pretty simple. Instead of opening a single connection to this server we open multiple connections that download different parts of a file.
In many cases this will really increase your download speed. Of course it's not a matter of straightforward arithmentics and if your connection speed is 10 Mbs and server bandwidth is only 1 Mbs you will never achieve 10 Mbs speed even if you open 10 simaltenous connections - as soon as service routines required to serve all these connections will also require some bandwidth. But still it will be much faster than an old-fashioned single connection style.
So download acceleration may seem like a perfect solution for certain cases but there are still several important disadvantages:
- First of all ask yourself - why server bandwidth is limited? Probably a server can't handle a greater bandwidth and by opening several simultaneous connections you are taking all "vacant" places for download - so other users won't be able to connect to this server. It may not be a problem for you (when you're a guy who have taken all the connections) but still it's a problem. That's the reason why most of the servers limit a number of simultaneous connections from one IP.
- It works when you want to download only one file at a time. If you want to download several files (like multi file archive) it's not reasonable to use download acceleration - it won't help you at all.
- As stated above it works only when your internet connection speed is greater than a speed of a target server - and it shouldn't be just greater it should be considerably greater in order to notice a serious difference when using download acceleration.
- Video streaming is not fully supported. Download manager will report that say 50% of a file is downloaded but this 50% includes data from different parts of a file - and in best cases your video streaming enabled player will be able to play only first 10 minutes of a movie instead of a half.
And all these disadvantages face with a single advantage - that download acceleration does make your downloads faster in certain cases.
Please, understand this post correctly. I am not trying to say that download acceleration is evil and is not needed at all in your download manager. However a poor implementation of download acceleration is much worse than no download acceleration at all.
Download acceleration should use what we can call a smart approach. Smart download acceleration should always control how many connections it is reasonable to open to the concrete server. If you want to download several files at a time - even if you first added one file and then in a couple minutes other three - it should drop unneccessary connections or start them again if other downloads have finished. Smart download acceleration should allow you to always control when you want and when you don't want to use it.
WideStream doesn't support download acceleration in the upcoming Beta 1 release. However it is considered as a possible feature for one of the next releases (probably even Beta 2). But only if we can make it smart. |
| By Basil Voronkov at 2008-10-04 |
| When I was working on the last release of WideStream - now Murray Alpha 4 – I found a strange problem with FTP in the program. I was testing FTP explorer and FTP download logic – by navigating to an FTP folder through FTP explorer, selecting a file and sending it by double-clicking to the download queue. Everything worked OK with two FTP servers. But not with the third one.
OK, so I don’t have any problems browsing the folder structure of this third server. The server obviously requires authorization and I am absolutely sure that my account has a full read /write access to everything in it. I am trying to download a file that I used to download many times before and WideStream instead of a file returns me a meaningless 505 FTP error (which means that file is either deleted or you don’t have an access or it was never existed or whatever). OK, that’s may be a bug in the program. As soon as I should have an access to this file I am just trying to double-check that it is really a problem with WideStream. I am copying a link to Internet Explorer. And what do you think happens? It fails.
That is becoming more and more intriguing. I am recalling that I still have ReGet installed on my box. So that will be the last test. If ReGet can’t do it then it is absolutely impossible in spite of the fact that I should have this damn access. Supernatural powers, doom, but this file is not downloadable today. And I am copying a link to ReGet. And after generating a long listing of log entries ReGet finally starts to download it.
What actually happened. I had a bug in an FTP explorer – but only in Windows style listing parser, UNIX listing parser was OK – that was adding a space at the very begging of each file name. It wasn’t easy to notice that in FTP explorer – so I didn’t. As a result when I was double-clicking a file to add it to the download queue the generated link was invalid – and WideStream and MSIE obviously failed to download a file. And why ReGet didn’t? According to its download log ReGet first tries to download a file "as is", receives this known 505 error – but it doesn’t stop him. He is listing the FTP directory where file is placed and after doing some sort of analysis understands that the name of the file is not really right – and removes this space from the begging. After that everything works as expected.
So I believe that is something that I can add to my TODO list. It is not that difficult to implement and in certain situations it will look like your download manager can do real magic. |