To build a Java based stock trading application, you need to point to the technology to be used
I am using Java (with jQuery front end) to build an application that needs to communicate with third-party applications It needs to update the interface every two seconds
Is it a good idea to use comets? If so, how do they fit into the picture?
What other methods / techniques can I use to improve the application?
The application will poll the stock price from the third-party application, write it to the database, and then push it to the front end every second. For polling, I have a timer that runs once every second to call the data of the third-party application. Then I must display it on the front end using JSP or other things,
So at this point, I'm not sure if I should write it to the front end using a servlet. What would you recommend? What should I do?
Can I use any new technology instead of servlets?
I also use Berkeley DB to store data. Do you think it is a good choice? What are the disadvantages of using Berkeley
I'm absolutely incompetent, so any suggestions will be appreciated
thank you!
Edit: I intend to do this so that desktop applications constantly poll from the thrid part and write to the database, and web applications only read and display from the database, which will reduce the load of web applications and all do must be read from DB
Solution
Look at using a web application framework instead of a servlet - unless it's a really basic project with a screen Unfortunately, there are many in the Java world, and it may be a minefield Stick with spring MVC or struts 2. The worst part is to set them up, but take a look at the sample application plus one or two tutorials and start working from there
http://www.springsource.org/about
http://struts.apache.org/2.x/index.html
Another option is to use template frameworks such as Appfuse to start and run without integrating a large number of frameworks. See:
http://appfuse.org/display/APF/AppFuse +QuickStart
It provides you with a template to set up spring MVC, using MySQL as a database and spring as a POJO framework This may be a quick way to get started and prototype
It's wise to judge an Ajax framework based on your 2 second delay requirement - jQuery or prototype / scriptaculous are good starting points
http://jquery.com/
http://www.prototypejs.org/
To do better in other technologies, you will want to consider a build system. Ant / Maven is very good for maven, and the two are a little more complex
http://ant.apache.org/
http://maven.apache.org/download.html
Also, consider using JUnit to test your application You may need to consider selenium for functional testing of the front end
http://www.junit.org
http://seleniumhq.org/