Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have two projects, implemented using these technologies:</p> <ul> <li><strong>Apache Tomcat</strong></li> <li><strong>PostgreSQL</strong></li> <li><strong>Hibernate</strong></li> <li><strong>JPA</strong></li> <li><strong>Spring</strong></li> <li><strong>Spring security</strong></li> <li><strong>JAX WS</strong></li> <li><strong>GWT</strong></li> <li><strong>MVP4g</strong></li> </ul> <p>I use Spring only for putting all technologies together.</p> <p>I have two different applications and I'd like to share experience of using these technologies together in this apps. Both apps have no difficult logic on server, even in the second one all logic was put on client and server was only storing/getting data to/from db. GWT solved this nice. I think, minimum calculations on server is the best for cloud apps. </p> <p><strong>1. The first one is a monitoring system, that was built to solve these tasks:</strong></p> <ul> <li><p>Collect statistical information from main company server(from every 30secs to every 5 mins)</p></li> <li><p>Make some simple calculations on server side</p></li> <li><p>Store data in db</p></li> <li><p>Show this data in graphical representation for end user (my colleges, dialers, etc)</p></li> </ul> <p>So, the main problem was to get and show in charts big amount of data, that was stored in one table (about +1 million rows every 5 days). We had to show about from 5k to 20k points on one graph, and reload this graphs periodically to get actual info from server. We decided to use hibernate+jpa, but I think it was not the best way, cause we started to get problems from getting and sending 10k+ rows. </p> <p>So, we decided to migrate from spring+hibernate+jpa to <strong>spring+jdbc</strong> as it works faster than the first one and uses less memory in my case. So it is better <strong>not to use hibernate</strong> if you:</p> <ul> <li>have few entites (in my case 6)</li> <li>have big amount of data</li> <li>need fast load</li> </ul> <p>Always remember that you need to get as less data from db as you can, using different filters etc( It didn't work in my case, cause I had to show as much info as I could to have best statistics for operator, but you also can use mathematics to average some values, numbers, etc)</p> <p>As for client side, the Google Charts works pretty good with GWT. As app was placed in local network we had no problems with loading big amounts of data on clientside. I'v deployed app in clouds (<a href="http://jelastic.com" rel="nofollow">Jelastic</a>), just for test, and faced slow client loading, because of big amount of data transferings in small periods of time.</p> <p><strong>2. The second app is a cloud application for managing sales, orders, contacts, etc:</strong></p> <p>It was built to solve these tasks:</p> <ul> <li>fast storing, getting, calculating data</li> <li>provide user simple and pleasant interface to operate tasks, mentioned above</li> </ul> <p>This app had no logic on server side. Server was only getting and storing data from db. We have devided app into few modules with help of maven (entities+daos, spring services and web GWT).</p> <p>So hibernate+jpa was acting good here as we had big ammount of entities and not big tables. Plus, all clientside grids had default filters that loaded less than 100 rows, also user had to filter his search. So in case of hibernate+jpa usage in this project I have opposite directions:</p> <ul> <li>small amount of data transferings</li> <li>big amount of entities</li> </ul> <p>As for GWT, It was great to write client side logic on pure Java, debugging code and testing newly created logic by refreshing page. <strong>I also should advise you to use <a href="http://code.google.com/p/mvp4g/" rel="nofollow">MVP4g</a> as model view presenter framework</strong> to build GWT app the right way :) It really simplifies the development process and code unerstanding.</p> <p>As for tomcat we had no big problems with it in both projects.</p> <p>I think these basic advises will help you to build good project! Good luck!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload