开发者

Client Server Apps+java

I have a java requirment contains both client and server side program.

Server side

Server program frequently check the data base and checks if a new order came, if order came it check the order and send it to the corresponding client machine using IP address and port.The client machines are out side the LAV and has static IP address.

Client side

Client program listen a its on port , when an order came, read it and process.

For implementing these app, which java package is best,java socket communication or any other.Anybody开发者_运维技巧 know please suggest one.

Help is highly appreciated,

Thanks, vks.


Don't go for low level programming like Sockets etc. Use RMI. Your program will have following two entities

  1. Server side :
    • An RMI Client for calling client machine to send update after checking the database
  2. Client side :
    • An RMI server application listening for Server update requests and do processing.

If you are new to RMI check out this tutorial . You can search for better tutorials if don't find these good enough :).


I remember I had to do something similar in the university and I used JMS (Java Messaging Service), documented here:

http://www.oracle.com/technetwork/java/jms/index.html

The Server will create the messages from the DB by checking it periodically and will send messages to the clients which will process the info.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜