25 pts.
 Image upload on multiple servers using classical ASP or VBscript
We have two servers for load balencing, But when we have logged in from one server and upload an image to the server by using simple image upload functionality all work fine but when we try to view image through another server then it doesn't show. Because we store a path of image to DB and image get stored to a specific server. Please give me a way to upload image to both the servers simaltanously, in VBscript or classical ASP(ASP 3.0)

Software/Hardware used:
ASKED: December 30, 2008  8:32 AM
UPDATED: December 30, 2008  11:20 AM

Answer Wiki:
SwapnilD, You should be able to handle this on the backend. You can write a DB trigger that copies the image "record" to the other database after it is committed. Considering that you did not describe the database software you are you using then we can't speak to this more specifically. I would have hoped that you would be using a 3 tier architecture, i.e., 2 servers to load balance web applications [1], another server that has the database [2] and the client software (browser,thin client, thick thick client, whatever) [3]. In this manner you only have to have one place a record has to be maintained. If you insist on having a DB on both servers then they should be mirrored. That is, the database software that is used will do this record copying function for you "automagically". MSSQL Server has mirroring capability; Oracle server has this functionality as well but this would be done either using Oracle's RAC technology or one of the 2 databases would be in a standby-read-only mode that is near-time, not real-time (it uses log shipping from the "hot" database to keep records up-to-date). Otherwise, as stated, the best way to handle this is by writing a database trigger on each database server that fires off a copy of the image record to the database on the other server after the image creation transaction is committed on whichever database server handles the inital transaction.
Last Wiki Answer Submitted:  December 30, 2008  11:20 am  by  Apickel   350 pts.
All Answer Wiki Contributors:  Apickel   350 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _