File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Architecture for market picture of trading system Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Architecture for market picture of trading system" Watch "Architecture for market picture of trading system" New topic
Author

Architecture for market picture of trading system

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I am debating with my team for the architecture of market picture of our trading system. Every time when new trade arrives into database (it's also stored in JMS queue for other processing), system should refresh all users' browser with latest market picture. Most likely Flex 2.0 will be used for UI. Flex has some concept of "server push", which upon receiving new trade in queue, can "push" new data to users (browsers). I am not Flex exprt so not much sure about this technique.

We are using Spring in business layer including SPring JDBC to interact with database. I was thinking to use some kind of webservice, which will be invoked when new trade is entered in the database, refresh will occur on user's browser. However I am not sure how it can refresh all users' browser? Or should Spring consumer be created for such requirement to fire an event (create latest market picture) and "push" to all clients? Again, I am not sure how "push" technique can be used in Spring, J2EE world? (pushlet? how reliable? which is also resource intenvise with open socket connections)

Other simpler way could be using Ajax for market picture and poll the database at certain interval of time. I am not sure how efficient this technique could be. If there is no new record in the db, still it will hit database and run a query, frequent database hits will hit the performance, which is a prime concern of the application. Any better suggestions, ideas?
Jeroen T Wenting
Ranch Hand

Joined: Apr 21, 2006
Posts: 1847
HTTP is in principle a stateless protocol so the server will have no knowledge of connected clients (certainly not if you use sessions) and push processing is finnicky at best).

Instead you should consider a component on the client that polls the server for available updates and retrieves them if any.

There are other architectures, but I'm not at liberty to discuss those with a competitor (company I work for has very similar services...).


42
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Architecture for market picture of trading system