none
Generating Documents on the server side with 500 concurrent users? RRS feed

  • Question

  • I've a rare problem. I need to support generating documents (word 2007) on the server side from the templates after populating the values from the database. Some time, I need to merge two or more templates and make it as a single document. The issue I'm facing is, Is there any way to merge two documents (.docx files) without opening the Word Instance? I mean, using the openXML itself?
    Second issue is, the client is looking for more than 500 concurrent users generating the documents on the server side. It can grow to 1000 in a year time. They are looking for a scalable solution which can support this many concurrent users to generate documents from the templates, that too within 4-6 seconds.
    Any help is appreciated.
    Thanks in Advance.
    Tuesday, December 22, 2009 11:00 AM

All replies

  • Thanks for your question, Jords
    Actually, sdk can manipute open xml documents directly without any app installed, so yes, you can use sdk to merge two Word2007 documents without opening Word App.
    There is some tools can guide you how to do it.
    You can install Open XML SDK 2.0 Dec CTP and its productivity tool, the tool has a feature called Reflector, which will generate sample code for how to create an document, also it can provide code for modify a document to another.
    Try to use it:
    1. create your sample document
    2. open it by OpenXmlSDK productivity tool
    3. click reflect

    Or
    1. Create a document1.docx
    2. Add some content to document1.docx, and save as document2.docx
    3. Open the tool and select compare files
    4. In the "File Comparison" tab, click "View/Hide Code"
    5. Then you'll get the sample code to change one document to another

    Please have a try and let me known if it can help you.

    And also could you provide more info on what kind of content you want to merge so I can give you some suggestions.

    • Edited by Cherry Du Friday, December 25, 2009 8:34 AM
    Wednesday, December 23, 2009 7:14 AM
  • Thanks a lot Cherry. I didn't test whatever you said, but, thought of replying your questions.

    It's pure text merge. I've different templates and each template is having place holders to replace the value from the database. I am able to replace the values, but, when it comes to merging two documents as one, I have to open the word instance (visible=false)

    Surely, I'll investigate on whatever you mentioned, but, the issue is, opening the word instance to merge to documents is not feasible. It take long time, say almost 2 sec. When you consider 500 concurrent users, it's going to be big delay for the users, which is not acceptable for the customer.

    I'll update you after doing some research on Reflector.

    Merry Christmas and a very happy New Year to all

    Jords
    Thursday, December 24, 2009 6:21 PM
  • Thursday, December 24, 2009 9:43 PM
  • I've used AltChunk element and it worked fine. I ran a test tool (silk performer) and ran for 100 users. I got 300 documents generated in 60 seconds. This is in a normal desktop. Not sure, whether this will satisfy 500-600 concurrent users generating documents on the server. (4 load balance web server, 1 DB server - all high end configurations)

    Any thoughts?
    Wednesday, December 30, 2009 9:34 AM