1

I am working on a Web Application, to be designed in Java using Play Framework. This application will have high traffic so performance will be a major concern. The performance cause is thus preventing me from using an Object Relational Model (ORM). On searching I found that ORM can be replaced architecturally using a Data Access Layer (DAL) also using database access via "raw" JDBC. However, since I am a novice, I don't understand what "raw" JDBC is. Is this similar to the one in this tutorial. Moreover, how can we implement a modular and manageable DAL using this pattern?

3
  • I would avoid that and go with a proven ORM as they will already have solved issues of performance that you would have to solve. Raw JDBC probably means that you write your own using JDBC. Commented Mar 17, 2014 at 15:22
  • Yes, that's plain JDBC in Vogella's tutorial and you should evaluate a framework that helps you use plain JDBC while having the expected performance. @onesixtyfourth I used plain JDBC in a project since performance was a key term and we ended creating our own naive framework for the DAL. Commented Mar 17, 2014 at 15:23
  • My suggestion is to stick with any ORM. Code maintenance with raw JDBC is a nightmare for such a huge application. performance tuning always be there with any framework. Commented Mar 17, 2014 at 15:27

1 Answer 1

1

Your best bet would be to initially implement your program as quickly as possible ( lightweight Object Relational Modal may be a good choice). Your aim is speed of creation (but make sure you "hide" elements of your program so the use of an ORM or direct JDBC is not "known" by much of your program.

Once you have your program running, measure where your performance blockers are ... you may be surprised an what you find. Reducing the time to get "running" pays great dividends on focusing your improvement efforts on actual issues rather than "expected ones".

Sign up to request clarification or add additional context in comments.

3 Comments

What if the most desired quality attribute is not maintenance but performance? Have you ever debugged through an ORM framework to see how much time it takes to execute simple queries against plain raw JDBC?
Yes .. however if one "hides" the exact choice of underlying data access, you can see where you are having performance problems before you go about "performance improving". Without knowing the nature of the program nor the actual vs. expected activity of the users, it would be wrong to predict what underlying mechanism will always perform best. Get to "minimum viable product" (testable product) as fast as possible, and instrument it.
Absolutely and one could have a MVP with file access or something else. My recommendation is to get to a "playable" state as fast as possible (with good class structure) and then measure / improve/ repeat. If you can do that faster with native JDBC data access then fine, if a lightweight ORM gets you there faster, use that. Just don't commit to a particular implementation that is unchangeable too soon (or ever).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.