This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Realtime Applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Realtime Applications" Watch "Realtime Applications" New topic
Author

Realtime Applications

Karamjeet singh
Ranch Hand

Joined: Feb 24, 2010
Posts: 49

Hi to all,

I want to develop Realtime Applications in java

Any help and workaround is very helpful.

Thanks


Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

Since you posted in Beginning Java: could you give us your definition of realtime? (I've heard several very different ones).


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18500
    
  40

Wouter Oet wrote:Since you posted in Beginning Java: could you give us your definition of realtime? (I've heard several very different ones).



I too, noticed that people misuse the term "realtime" to mean commercial applications. Or applications written by professional programmers. This is not true, as realtime has a very specific meaning.


Realtime is a term for applications that has very specific SLA requirements for response time. In Java, it could be doing lots of stuff to simulate it; or using the realtime JVM.... but quite frankly, and many will disagree with me, more realtime applications are simply not done with Java.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Karamjeet singh
Ranch Hand

Joined: Feb 24, 2010
Posts: 49

Realtime means in my sense is thst application responding to our requests at real time like ajax (no page(app) refresh)

i want to develop that like application in windows

Thanks for quick reply
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3573
    
  14

That's also not real-time. That's asynchronous.

Can you be more specific in what kind of application you want to make?
Karamjeet singh
Ranch Hand

Joined: Feb 24, 2010
Posts: 49

If some person on the network insert the data in the database

I want to display or remove that data at runtime without application refresh
Haiti Meid
Greenhorn

Joined: Jun 08, 2011
Posts: 13

karamjeet singh wrote:If some person on the network insert the data in the database

I want to display or remove that data at runtime without application refresh


Hi Karamjeet,

I understand what you mean. If you're going to develop desktop application by Java, then you can do that. (I don't know web application). And not for "realtime", since my English is not well :-)


Sorry for my English...
Stephan van Hulst
Bartender

Joined: Sep 20, 2010
Posts: 3573
    
  14

That's a very vague description, Karamjeet.

Do you mean you want the application in one client to refresh its view of the database when another client sends data to the database?

You can achieve this in two ways. Either you can have your viewer poll the server every now and then to see if there was an update, or your server can keep track of who is interested in changes, and send them a message about a change.

You have to be more clear in what you want though.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

If you're going to do this in a HTML / JavaScript web application, then you can use a technique called Comet to make the server notify the client when something has changed.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Karamjeet singh
Ranch Hand

Joined: Feb 24, 2010
Posts: 49

@Stephan van Hulst

What you are sayng i am only that want
but how and in what kind of application is this possible in java fx or in java
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11150
    
  16

What you are sayng i am only that want

Stephen is talking about the publisher/subscriber design pattern. In a nutshell, each client application registers with the server that it wants to know about whatever changes.

Suppose your application displays weather, stock reports and news headlines (and say 30 other things). The user can configure it to only display certain parts. The client application would tell the server "I care about weather and stock reports". So, the server would only send that client weather and stock updates, but not news headlines.

Alternatively, you could write is so that your client asks the server for the weather and stock updates every 30 seconds, but not the stock reports (assuming that is how the user has it configured).


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Stephan van Hulst wrote:You have to be more clear in what you want though.


Agreed. I would suggest you are approaching this backwards. Normally when you design an application you should first identify what you want to do, and second figure out how you are going to do that.

But in your case it seems you have decided in advance on how you are going to do it, or at least you have some vague idea how you are going to do it, you just don't know what you are going to do. And I suggest that isn't a good way to design an application.

But perhaps this is some kind of homework assignment, where you are supposed to write something which illustrates some particular feature of a language or some particular type of design pattern? If so it might be better if you just told us what the assignment was, instead of providing a brief and inaccurate summary of it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Realtime Applications
 
Similar Threads
Annotation!
compile EJB on WebSphere
Java Real Time
Web dev basic features
iPlanet web server compatible w/. MQ Series