Jump to content
  • Advertisement
Sign in to follow this  

What are my options

This topic is 3601 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a c++ app that runs server side which does some image processing on images uploaded by a user. Th problem is that this program is computationally qite heavy (up t about 4 seconds runtime). Now if multiple users make requests the server will likely not be able to handle it so I want to move this client side. Flash may be an option, however, Id really not like to convert the app and I could imagine flash being slower. Another problem is that I dont want to have to upload the images, download to flash and reupload. Having a downloadable application would obviously work but this is a last resort. I vaguely remember activex maybe being what I need? Is there some way of keeping the application integrated in the browser but running client side, possibly the user has to accept some security warning by the browser. Doesnt windows update work in this way? CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
If it's not possible to optimize the server side application to reduce the time spent on an image, I can see three approaches to making sure that your server doesn't go down under load:

1. Offload the processing to the client side as you suggested. ActiveX might be a solution and would allow you to keep your C++ code. However, it would limit you to the Windows platform. What about using a Java application? I think with up to date versions of the Java runtime environment you can expect reasonably good performance in numerically heavy applications ...

2. Introduce a ticket system as we know it from download sites. That is, make the user wait depending on the server load.

3. Perform processing asynchronously. The user uploads an image and is notified when the server has finished processing.

Just some thoughts. I don't know how applicable they are to your service ...

Share this post


Link to post
Share on other sites
Thanks for the reply.
All good ideas, except I cant really have the user wait very long, a coupe of seconds is ok anything longer wont work. I thought about java but from what I know about it java applets running from a remote website tend to be in a security sandbox that will likely not allow users to input images from their harddrive, then have the app edit them bfore they are uploaded, or is this possible? Apart from that using java would probably be a very good option for me.
Limiting myself to Windows is not too big of a problem, so activex sounds interesting. Sadly I know nothing about it, any ideas to point me in the right direction? Will VS 2008 Express do the job?

-CPprogrammer

Share this post


Link to post
Share on other sites
Signing your applet is the first step to enabling read/write access to the local file system, as demonstrated here. When such an applet is present the user is asked whether he wants to trust the applet or not.

I'd prefer this a lot to having to install yet again another ActiveX plugin.

Share this post


Link to post
Share on other sites
Yeah this is the way to go. Many thanks.
So I have thefile system access and the client side running, only thing I still need is, how do I send a post request with the image data from the java applet to the server. Im sure its simple to get a tutorial to do a post request but how would you send images in memory. Do you happen to know what library can do this in java.

Thanks again.

-CProgrammer

Share this post


Link to post
Share on other sites
Actually while we are on the topic, Im also curious, if java has the ability to sign an application, does flash also have such a thing?
Edit: Apparently flash 10beta can do this, and its just been released last week. I wonder how they worked out the security issues.

-CProgrammer


[Edited by - CProgrammer on July 12, 2008 8:17:24 AM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!