Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Speeding up my web processes
Old 08-05-2008, 04:11 PM Speeding up my web processes
Junior Talker

Posts: 3
Trades: 0
I'm creating a web site where uploaded english documents get automatically converted to another language. I'm using an inexpensive language converter program and an upload script. All files get uploaded to the Upload Folder. And I'm using a basic command script to send the uploaded documents from the Upload Folder to four separate copies of the language converter programs (so that four documents can be converted simealtaneously).

The command script is this:

Code:
:
Code:
:TOP"
C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderA\" ""sleep 5"C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderB\" ""sleep 5"C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt*|/filter move 0 "C:\FolderC\" ""sleep 5"C:\Program Files\File Mover\File Mover.exe" /showstatus /noerrors /file "C:\Upload Folder\*.txt|/filter move 0 "C:\FolderD\" ""
Sleep 5
GOTO TOP


Language Converter Program 1 grabs the files from FolderA
Language Converter Program 2 grabs the files from FolderB
Language Converter Program 3 grabs the files from FolderC
Language Converter Program 4 grabs the files from FolderD

I know this is a very simplistic way of doing things, but my coding knowledge is very limited. This all talkes place on a Windows server.

The problem I'm looking to solve is that if there are many files in the Upload Folder, the command script will grab all the files, thus many files will be in line waiting to be converted in Folder A, for example, and no files will be in Folders, B, C & D, therefore defeating the pupose of having all these folders so that files can be converted simealtaneously, instead of one at a time.

How can I set up the command file to so that any files in the Upload Folder can get sorted among FoldersA, B, C & D equally, thus insuring simealtaenous conversion, therefore speeding up my web site processes? Or any other ideas, please.

Last edited by alex111; 08-05-2008 at 04:12 PM..
alex111 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 08-05-2008, 06:56 PM Re: Speeding up my web processes
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,515
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Is your server manager mad or a masochist?? Allowing you to run a looping batch file!!!
Uploading is a single stream, sequential process no matter how many files one user is uploading if you are using ASP.
Some components may be able to use separate streams per file for any one user request but I've never come across one that can.

So I would suggest you lose the resource mashing, potential server killing batch (command) file, and implement a "round robin" system for uploading.

As each upload process is requested, it gets a folder from a queue to upload into then increments the queue. The next request would get the next folder in the queue and so on. At the end of the queue the first folder is then brought round to the start again and the cycle repeats.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 08-06-2008, 03:47 AM Re: Speeding up my web processes
TheHosted's Avatar
Skilled Talker

Posts: 64
Name: Michelle
Location: Cyber Space
Trades: 0
I would go more for the masochist answer
__________________

Please login or register to view this content. Registration is FREE
- Hosting Since 2004 With End User Support

Accepting Paypal, Moneybookers, Google Checkout, & More.
Proudly Designed By:
Please login or register to view this content. Registration is FREE
TheHosted is offline
Reply With Quote
View Public Profile Visit TheHosted's homepage!
 
Old 08-06-2008, 12:38 PM Re: Speeding up my web processes
Junior Talker

Posts: 3
Trades: 0
Thank you for your reply.

Could you provide a little more detail on how to set up and accomplish this:

"As each upload process is requested, it gets a folder from a queue to upload into then increments the queue. The next request would get the next folder in the queue and so on. At the end of the queue the first folder is then brought round to the start again and the cycle repeats."
alex111 is offline
Reply With Quote
View Public Profile
 
Old 08-07-2008, 09:59 AM Re: Speeding up my web processes
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,515
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Assuming a few things here.

existing:
User opens the upload page, locates the file(s) to upload and clicks "Go", Serverside code initiates file upload to preset folder. Ok so far?

So;
BEFORE the upload is initialised, you have some code that goes and finds the folder name from a datastore (real database, flat text file, etc).
It then changes the foldername in the datastore to the next in the predetermined sequence ready for the next request.
Now, the upload is initialised with the retrieved foldername as the destination.

rest of operation carries on as existing
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 09-17-2008, 07:17 PM Re: Speeding up my web processes
Novice Talker

Posts: 11
Trades: 0
Wouldn't you or someone who understands the language want to check the outcome of the converted language first before publishing it online?

__________________

Please login or register to view this content. Registration is FREE

No Image Ads. No Pop-Ups. Just a faster Whois.
beewhois is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Speeding up my web processes
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 2.45758 seconds with 12 queries