Skip to content

Instantly share code, notes, and snippets.

@AdamBien
Created October 4, 2016 05:25
Show Gist options
  • Save AdamBien/592a90abcf98258b93f2f35343f9513c to your computer and use it in GitHub Desktop.
Save AdamBien/592a90abcf98258b93f2f35343f9513c to your computer and use it in GitHub Desktop.
32ndAirhacksQ&A.md
@ggam
Copy link

ggam commented Nov 7, 2016

Hi Adam,

When developing a REST application, what's your approach for deploying the (JS based) UI? Do you put it on the same WAR? Create two separete WARs and deploy them to independent server instances? Just copy the JS app to the www folder of an Apache HTTP?

Thanks!

@davidsoles
Copy link

Hi Adam,

My question is about the JDBC vs ORM because almost every project or tutorial includes the use of ORM (eclipselink, hibernate, apache cayenne) but what about the performance because the benefits from the developer's perspective are very clear. Maybe you recomend the use of an enhanced JDBC like Spring JDBC Template or Apache Commons DBUtils.

Thanks in advance.

@AdamBien
Copy link
Author

AdamBien commented Nov 7, 2016

What does mean SERIALIZABLE in transaction context?

@csabee
Copy link

csabee commented Nov 8, 2016

Just a small comment on "JDBC vs ORM" subject (after seeing the podcast):

We have worked on a huge statistical analysis system, where there were KPI graphs for the clients. One of the KPI graphs involved querying about 5-10M records from the database (it was a table with like 700M records). The select speed and transport to application server was nothing (we have been using a very good performing MS SQL server, and we only queried the table by the unique indexes) ~ 1-10 sec.

BUT: processing this amount of data was very slow from JPA side (it doesn't matter if you are using hibernate or eclipselink), since it is instantiating a huge amount of objects through reflection. So, using JDBC was the only option here, if we wanted to process all those records in acceptable time. To my experience, there is a record number, that is the dividing line between JPA and JDBC. So if your queries have no more than 1000-10000 records, you can go safely with JPA. In any other case, just rather use JDBC.

One of my previous colleagues had an experience with querying more records, but he stated, that above selecting 250000 records it had a huge performance impact on hibernate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment