Announcement Announcement Module
Collapse
No announcement yet.
Regarding MVC-step-by-step tutorial part4 data persistance Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Regarding MVC-step-by-step tutorial part4 data persistance

    in the last paragraph the author wrote:

    "There are still a few things I would like to improve upon. To begin with, we are not using a connection pool which is a must for any serious web application deployment. We are also using HSQL in a standalone mode, which is limiting us to one connection at a time. This of course will not scale. Another issue that we are not dealing with is concurrency. Two users could increase prices simultaneously and they would be a bit surprised by seeing the combined effect of their actions. I'll leave these improvements up to you for now I might add them in an additional part to this document in the future."



    i have implemented this tutorial application , and all worked fine. I did not use HSQL though , i replaced with MYSQL (myIsam tables).

    My questions are :

    Do i have to deal with the problem refered in the text regarding "limiting us to one connection at a time" ?
    What should i change in the application in order to deal with concurrency?
    What sort of datasource should i use for my application to scale?
    Is there a following to this tutorial?

    thanks
    Last edited by migueljoliveira; Sep 6th, 2007, 06:25 AM.

  • #2
    Originally posted by migueljoliveira View Post
    Do i have to deal with the problem refered in the text regarding "limiting us to one connection at a time" ?
    The configuration is using the DriverManagerDataSource so swapping this for a connection pool should solve that problem.

    Originally posted by migueljoliveira View Post
    What should i change in the application in order to deal with concurrency?
    You might want to look at transaction isolation, optimistic and pessimistic locking. There are some patterns here http://martinfowler.com/eaaCatalog/.

    Originally posted by migueljoliveira View Post
    What sort of datasource should i use for my application to scale?
    Have you had a look at c3p0 or DBCP? I would recommend the first one.

    Originally posted by migueljoliveira View Post
    Is there a following to this tutorial?
    Don't think so.

    Comment


    • #3
      thanks for the reply

      Comment


      • #4
        Not a problem, if you are looking for something following to the the tutorial, there's lots of extra information out there. The reference manual is a good start. The examples that ship with Spring might help.

        Comment

        Working...
        X