koool
koool

Reputation: 15527

calling a method on client side on update in database

I have a database in my sql and I have multiple clients using that database. whenever a column in the database is updated I want to call the corresponding java method on the client side. Basically this is the message system, when user get new message I want to give him a notification. Is this the right way to do it? If yes how do I implement it. If not what would be the right way to do it?

Any help appreciated

Thanks

Upvotes: 2

Views: 154

Answers (3)

Gyula
Gyula

Reputation: 71

You might find interesting the following blog post and thread: http://www.unlimitednovelty.com/2009/04/twitter-blaming-ruby-for-their-mistakes.html

The blog was written when Twitter has changed its messaging system platform from Ruby to Scala. It generated an ineteresting flame about messaging systems between experts...

Upvotes: 2

Peter Szanto
Peter Szanto

Reputation: 7722

There are messaging frameworks for such reason for example :

  • Jabber
  • UDP multicast (http://download.oracle.com/javase/1.4.2/docs/api/java/net/MulticastSocket.html)
  • JMS (http://activemq.apache.org/)

Upvotes: 3

JB Nizet
JB Nizet

Reputation: 692231

No, this is not the right way to do it. To send messages, use message-oriented middleware (MOM), using JMS. There are free JMS implementations available (like ActiveMQ, for example).

Upvotes: 2

Related Questions