Alternate way of storing data in In-process memory RRS feed

  • Question

  • Hi ALL

    I am working on one application which is a WCF Service which is hosted as Windows Service

    Application is related to Transport

    Application receives 10 Request in 1 second so needs to be fast to process the request. It has lots of data which is used for processing so i have used in-process memory in which i have loaded the data. This data is used for processing  and it helps me to give fast result as process is done with in memory data and it do not need to go to DB for every request.

    But Size of data which is required for processing has reached to approx 3GB and it has started giving Out of memory exception.

    Can anybody suggest how this kind of real time application can be prepared or what changes should i do to make my application quick and should not crash due to out of memory exception.

    Please let me know if there is other was of storing unlimited data and can be accessed quicker to reach the goal to process request quickest.



    Monday, July 2, 2012 5:43 PM


  • There are two ways to handle scalability. You scale-up and you scale-out.

    Scale up means you invest more on high performance Hardwares like your servers, memory, CPUs.

    Scale-out means replicating the application in different servers.

    All realtime highly scalable applications are deployed in Web-Farm enviroment to handle the scalabilily. Even if you have written the most high performance software but it will have issue if you are expecting millions of calls (like google). So you should consider deploying your solution in Web-farm environment.

    Secondly, you should think about redesigning your application. In memory data handling is not always reliable. As you are loosing on persistancy and also if you have multiple user access the same data you will face some issue. I would suggest you to implement SOA based application with a message bus capability. This will ensure your request are always served, however it wont guranteed you 'the out of memory' will go away if you still loading lots of data in memory.

    You can also consider putting up an in memory database (like oracle times ten ... search for 'In memory database in google'). But still you need a dedicated database server for this.

    Hope that helps

    Tanvir Huda Application Architect/Consultant http://thetechnocrate.wordpress.com/

    • Marked as answer by Yi-Lun Luo Monday, July 9, 2012 9:38 AM
    Monday, July 2, 2012 11:09 PM