This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Realtime Applications

 
Karamjeet singh
Ranch Hand
Posts: 52
Flex jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to all,

I want to develop Realtime Applications in java

Any help and workaround is very helpful.

Thanks
 
Wouter Oet
Saloon Keeper
Posts: 2700
IntelliJ IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since you posted in Beginning Java: could you give us your definition of realtime? (I've heard several very different ones).
 
Henry Wong
author
Marshal
Pie
Posts: 20894
75
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Karamjeet singh
Ranch Hand
Posts: 52
Flex jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 5399
52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 52
Flex jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
Chrome Fedora Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 :-)
 
Stephan van Hulst
Bartender
Pie
Posts: 5399
52
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15207
36
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Karamjeet singh
Ranch Hand
Posts: 52
Flex jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@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
Posts: 12086
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Paul Clapham
Sheriff
Pie
Posts: 20758
30
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic