Webserver with Ajax and XML
|
|
![]() ![]() ![]() |
Webserver with Ajax and XML
| DonGato |
May 26 2006, 18:27
|
|
Group: Admins Posts: 5493 Joined: 21-January 03 From: The Pampas, The land of the Gaucho! |
I sugest another approach:
Don't use templates. Just serve an HTML and use the JS to fecth the data as per AJAX code. |
|
Post
#31
|
|
| Fuxie - DK |
May 26 2006, 18:31
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
Do you mean to build both templates into eMule.exe or simply to have ONE look (as if there was only one templste)???
|
|
Post
#32
|
|
| muleteer |
May 26 2006, 18:36
|
|
Group: Betatesters Posts: 8261 Joined: 29-February 04 |
Whichever method we choose, I think we should also look seriously at supporting partial rendering of large pages. Break up the page into manageable chunks, transfer each chunk as soon as it is ready, and on the remote side render in the browser whatever is received instead of waiting until all the data is received before rendering.
Eg. this forum supports partial rendering. When I open a long thread, a few posts are shown first, then a few more, then more, until finally the page is done. |
|
Post
#33
|
|
| DonGato |
May 26 2006, 20:23
|
|
Group: Admins Posts: 5493 Joined: 21-January 03 From: The Pampas, The land of the Gaucho! |
QUOTE(Fuxie - DK @ May 26 2006, 15:31) Do you mean to build both templates into eMule.exe or simply to have ONE look (as if there was only one templste)??? No, I mean to remove templates and just have static HTML content, but just realized we offer translations (that I never used) and that would be a problem. |
|
Post
#34
|
|
| Darklord |
May 26 2006, 21:39
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(DonGato @ May 26 2006, 18:27) I sugest another approach: Don't use templates. Just serve an HTML and use the JS to fecth the data as per AJAX code. Its good practice to allow usage to non ajax adopters. I think a static usage should be kept. But it was me who sugested the xml+xslt combo, so.... QUOTE(DonGato @ May 26 2006, 20:23) No, I mean to remove templates and just have static HTML content, but just realized we offer translations (that I never used) and that would be a problem. Yep, this was a problem i found. See Implementation Notes for possible solutions. Tried to find other implementation cases that used i18n and l10n but still havent found anything, looking on a possibility. |
|
Post
#35
|
|
| Aw3 |
May 27 2006, 01:04
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
QUOTE(Darklord @ May 26 2006, 16:19) QUOTE(Aw3 @ May 26 2006, 03:19) The thing is that the main slow down is not because of data reloading, it is because of data preparation. I think we can make it 10 times faster just by rewriting a couple of places in WS... That is also an advantage of the ajax way, since a lot less needs to be prepared and sent.QUOTE(Darklord @ May 26 2006, 17:02) I believe the biggest cpu sink its the search and replace operations (correct me if im wrong). Actually no, search & replace is not the bottleneck. And it is not that slow as you think, because every page is split into several templates and you don't process the whole page every time. The replace as its done now will search all over the document for a given tag to substitute, even if theres only one ocorrence and EVEN if there isnt that tag. |
|
Post
#36
|
|
| Darklord |
May 27 2006, 09:27
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Aw3 @ May 27 2006, 01:04) QUOTE(Darklord @ May 26 2006, 16:19) QUOTE(Aw3 @ May 26 2006, 03:19) The thing is that the main slow down is not because of data reloading, it is because of data preparation. I think we can make it 10 times faster just by rewriting a couple of places in WS... That is also an advantage of the ajax way, since a lot less needs to be prepared and sent.Tue, but there is not getting around that, i think. QUOTE(Aw3 @ May 27 2006, 01:04) QUOTE(Darklord @ May 26 2006, 17:02) I believe the biggest cpu sink its the search and replace operations (correct me if im wrong). Actually no, search & replace is not the bottleneck. And it is not that slow as you think, because every page is split into several templates and you don't process the whole page every time.The replace as its done now will search all over the document for a given tag to substitute, even if theres only one ocorrence and EVEN if there isnt that tag. Thats the point, although its split into templates, they are assembled (some, at least) BEFORE the substitutions; as those are added, the bigger the string to check gets; and the problem i pointed of checking the whole string remains. |
|
Post
#37
|
|
| Darklord |
May 29 2006, 20:37
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(muleteer @ May 24 2006, 19:40) Fuxie's client is our test bench for WS performance. It is an extreme scenario with older hardware, so processing time is significant. Its not just the number of files in his downloads; his upload queue size is about 7000. We seldom dare to expand his upload queue in the WS. Now that i have the XML response for the upload queue, it would be fun to see how long it takes. Here is the new client. The request is http://[webserver url]/?ses=[valid user session]&channel=xml&request=getUpQueue (be careful, the url is case sensitive). Also added the debug lines to the log, to check the metrics. Dont mind the size sent, gzip isnt used. |
|
Post
#38
|
|
| Darklord |
Jun 5 2006, 21:37
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
Added upload list to xml requests, still havent changed the template.
Here is the new client. The request url is http://[webserver url]/?ses=[valid user session]&channel=xml&request=getUpList (case sensitive). |
|
Post
#39
|
|
| Fuxie - DK |
Jun 6 2006, 15:49
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
Please explain IN DETAIL what we're supposed to test?
|
|
Post
#40
|
|
| Darklord |
Jun 6 2006, 16:42
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 15:49) Ok.
|
|
Post
#41
|
|
| Fuxie - DK |
Jun 6 2006, 17:04
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
QUOTE(Darklord @ Jun 6 2006, 18:42) QUOTE(Fuxie - DK @ Jun 6 2006, 15:49) QUOTE(Darklord @ Jun 6 2006, 18:42) [*] Download the binary package. QUOTE(Darklord @ Jun 6 2006, 18:42) CODE
[*] a upload queue request, using the url: CODE
[*] a upload list request, using the url: CODE
When trying these three URLs all I get in MSIE is the display of a XML file.. Can't use that for much... |
|
Post
#42
|
|
| Darklord |
Jun 6 2006, 17:16
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 17:04) You're using an old template.. There are some incorrections on the Login-Page.. Ya, havent updated that one, only the executable. QUOTE(Fuxie - DK @ Jun 6 2006, 17:04) When trying these three URLs all I get in MSIE is the display of a XML file.. Can't use that for much... Actualy thats the point What you can do is check the request times on the debug log and see if the preparation times arent too big, like you did before. |
|
Post
#43
|
|
| Fuxie - DK |
Jun 6 2006, 17:28
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
The main problem from my PoV isn't the process time in eMule.exe... It's the time it takes for MSIE to prepare the page AFTER the page has been generated and sent to MSIE...
Transfer Page is the main problem, and the way I see it, that hasn't been dealt with at all yet.. |
|
Post
#44
|
|
| Darklord |
Jun 6 2006, 18:20
|
|
Group: Members Posts: 80 Joined: 18-December 05 |
QUOTE(Fuxie - DK @ Jun 6 2006, 17:28) The main problem from my PoV isn't the process time in eMule.exe... It's the time it takes for MSIE to prepare the page AFTER the page has been generated and sent to MSIE... Transfer Page is the main problem, and the way I see it, that hasn't been dealt with at all yet.. Yep, and that is also one of the strong points of the ajax way, since it doesnt reload the entire page, just the changing bits. And no, only the stats bar is updated that way yet, like i said, there isnt any update to the template. The XML requests are an essential step for it (the transmition of the data in a way the browser can understand), but can be of a lot of value by themselves, as i will show... soon. |
|
Post
#45
|
|
![]() ![]() ![]() |
| Lo-Fi Version | Time is now: 22nd May 2013 - 20:43 |