Jump to content
cikho

ajax server

Recommended Posts

hello everyone!

i'm new here, and not very expert in web languages, my job is actually product design and 3D applications.

i'm writing here because i need a few help with a "ajax server" or at least this is what autodesk says.

first a little introduction..

 

basically, i'm using autodesk showcase, which is a 3D realtime rendering software used for presentations and design review.

This software has a built in "ajax based" web server to allow the user to remotely control the software via LAN.

In our example, we control a powerful workstation which runs showcase with a tablet.

 

The user interface is browser based, so is made out of HTML, CSS, javascript etc, and uses the XMLHttpRequest to send specific messages that showcase converts into commands (change point of view, change object color etc).

 

when you run the autodesk showcase software it automatically starts this "server", which uses the 5555 port.

the user interface is placed in a specific folder in the machine running the software/server, and it works just by naming the first page index.html, like any other website/hypertext.

showcase adds an environment variable to the system to specify the adress of the folder containing the interface.

 

to make the two devices communicate, you basically type XXX.XXX.XXX.XXX:5555 in the browser adress bar (where xxx is the IP of the machine running showcase) of the remote controller (tablet in this case) after starting showcase; or you can use the user interface directly on the machine running showcase by typing localhost:5555 in the PC's browser.

 

and here comes the problem i have:

the communication in localhost is fast, as it should be.

when it comes to lan communication, to retrieve a page it takes seconds.. lots of seconds.

every command has at least 1 second latency.

and somehow, every source the page uses (images, scripts, fonts) is considered a command as soon as it must be retrieved using the server.

so, for example, a page with 3 javascript and 7 images can take up to 10-15 seconds to load even if the images are 2Kb.

 

there's no way to bypass the server since pages must load from it to make showcase recieve commands.

The only way i've found to speed up the process, is having all the resources in a www adress, like "www.website.com/interface". in this way you still load pages from the server, but resources come from the web, reducing the actual number of commands to only a few (page retrieve, initial showcase commands etc).

 

This can work pretty well in a closed office environment, in which we know we have a wifi network which serves both as lan and internet connection.

But as soon as we bring the system to possible customers or exhibitions, things get complicated.

 

i absolutely need to understand how to solve this, my idea was to make the sources load via lan using the "//machine/interface" adress, but chorme, safari and firefox blocks these adresses due to security reasons.

or, maybe, i'm just doing something wrong with interface setup, but this happens with the simplyest of the pages.

 

hope someone have an idea.

also, i'm not sure this is the proper folder for this topic, if it's in the wrong sections i apologize

 

thank you all

 

Share this post


Link to post
Share on other sites

It sounds like a network issue. I would say to use either Chrome or Firefox and open their developer tools, which will let you look at all of the network requests going out (in addition to other things, like Javascript error messages). Each network request will be broken down into parts like connecting, receiving data, etc. I would look there first to try and figure out why the requests are taking so long.

Share this post


Link to post
Share on other sites

It sounds like a network issue. I would say to use either Chrome or Firefox and open their developer tools, which will let you look at all of the network requests going out (in addition to other things, like Javascript error messages). Each network request will be broken down into parts like connecting, receiving data, etc. I would look there first to try and figure out why the requests are taking so long.

 

hi and thanks for the tip!

in the beginning i also thought it was a network related problem, but i then tryed several networks and the problem is the same.

tryed the office network, my home network, mi girlfriend network, a client network and even a dedicated network pc/tablet using wifi, and every time messages are always delayed by seconds.

i'm using mainly chrome for the application, and basically the delays are due to "waiting".. in a sort of cascade effect. the "recieve" is always milliseconds, so that one is ok i think.

 

i also thought it could be a scripting/coding issue of some of my scripts, but the problem also appears in a simple html page consisting of <img> tags.. so 10 imges, 10 seconds loading, even if the image is 1Kb..

Edited by cikho

Share this post


Link to post
Share on other sites

This could be due some sort of antivirus or internet security package scanning everything before it lets a request go out or the response come back. Try disabling your security software and see if that fixes the issue. If so, there might be a setting you can change in the software.

Share this post


Link to post
Share on other sites

oh, forgot to say, this also happens on different machines with different setups xD

 

so, having a laptop, a workstation and the ipad, the problem happens in all possible combinations.. with every network..

 

so basically:

laptop controlling workstation -> problem

Ipad controlling workstation -> problem

ipad controlling laptop -> problem

workstation controlling laptop -> problem

Share this post


Link to post
Share on other sites

no no, imma try it of course!

what i ment is that the two different pc have different protections.. unless it's the windows firewall locking it..

also, it may depend of some sort protection router sided.. i have to investigate..

 

it was just to give the complete view of the problem..

Share this post


Link to post
Share on other sites

Try to simplify the testing. Create the most basic test page you can that will show a problem, and then start turning various things off around the network to see what makes a difference. It definitely sounds like a network connectivity issue and not something to do with the web page code or whatever else.

 

It could also be a DNS issue. If you're accessing the other machine via a host name, try via IP address instead.

  • Like 1

Share this post


Link to post
Share on other sites

it's official.. i'm an idiot..

opened windows firewall options, and looked for autodesk showcase rules..

apparently it created rules automatically for programs update ecc and not for the port transfer permission..

 

i've created a rule both for port 5555 (ajax server) and 5525 (xml server) and the problem seems to be solved..

this obviusly needs better testing, but apparently the 1second waiting seems to be gone..

 

thanks for the help man!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×