none
confusion between connected/disconnected architecture RRS feed

  • Question

  • hello devs,
    i use a simple submit form in my web page which expects a hit of 12-15 per month...
    so which architecture i should i prefer??
    conected or disconnected??
    Friday, July 3, 2009 7:11 PM

Answers

  • Web application could be connected or disconnected, and, in fact ASP.NET applications are disconnected, due to ADO.NET disconnected model. Disconnected model is getting more popular due to simple implementation and easier troubleshooting. Disconnected means that code opens connection to some sort of data storage (database, file etc), retrieves, modifies or stores data and ten closes connection to that data storage. In  this case application does not keep any cursors, recordsets or any data entities opened against actual connection. After that application closes connection. Good design with ASP.NET application would close all the database connections as soon as data manipulation is complete regardless if it is 15 hit per month or 15 hits per second.  In your case it would be disconnected application.


    Val Mazur (MVP) http://www.xporttools.net

    Monday, July 6, 2009 10:17 AM
    Moderator

All replies

  • "Disconnected" usually involves an application that runs on the end user's computer.  It has its own copy of data (either in memory or on disk) which it synchronizes with the server (frequently or infrequently).  Since you have stated that your application is a simple web page, there is no execution on the end user's computer.  Disconnected is basically ruled out.
    Friday, July 3, 2009 10:28 PM
  • Web application could be connected or disconnected, and, in fact ASP.NET applications are disconnected, due to ADO.NET disconnected model. Disconnected model is getting more popular due to simple implementation and easier troubleshooting. Disconnected means that code opens connection to some sort of data storage (database, file etc), retrieves, modifies or stores data and ten closes connection to that data storage. In  this case application does not keep any cursors, recordsets or any data entities opened against actual connection. After that application closes connection. Good design with ASP.NET application would close all the database connections as soon as data manipulation is complete regardless if it is 15 hit per month or 15 hits per second.  In your case it would be disconnected application.


    Val Mazur (MVP) http://www.xporttools.net

    Monday, July 6, 2009 10:17 AM
    Moderator
  • Typically web applications use both models.  When you want your users to have the most up to date data each incoming web request will open a connection (from the connection pool) and run a query against the back-end database directly and render the response directly without using a DataSet (just use a DataReader and render the output directly to HTML in a single pass fashion).  You don't want to be creating DataSets for each web request due to the scalability costs because lots of concurrent requests creating large DataSets in memory will reduce scalability.  However I have seen customers cache DataSets for common data that does not change very often to improve performance.

    Another advantage of disconnected is you can decouple your web site and data access layer, this can result in a cleaner design (aka SOA).
    Tuesday, July 7, 2009 6:25 PM
    Moderator