×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

准备用Java做一个web-based Appointment Remiding System,有些问题想请教一下

I'm going to develop an appointment remindig system,which is a web based application.One of its important functions is to pop up a window at some certain time to remind the user for an coming appointment .

So I think there're 2 options to implement this requirement:

1.Refresh page automatically in a certain interval.

2.set up a daemon thread to moniter all appointments which should be stored in a database,when there's an appointment coming,this thread send a message to front end to pop up a window.

Do you gus think option 1 is good idea?

And for option 2, I got something troublesome, how can I send a message from server to a client browser without a http request from this client browser?

Please answer these for me ,thank you in advance.
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 准备用Java做一个web-based Appointment Remiding System,有些问题想请教一下
    I'm going to develop an appointment remindig system,which is a web based application.One of its important functions is to pop up a window at some certain time to remind the user for an coming appointment .

    So I think there're 2 options to implement this requirement:

    1.Refresh page automatically in a certain interval.

    2.set up a daemon thread to moniter all appointments which should be stored in a database,when there's an appointment coming,this thread send a message to front end to pop up a window.

    Do you gus think option 1 is good idea?

    And for option 2, I got something troublesome, how can I send a message from server to a client browser without a http request from this client browser?

    Please answer these for me ,thank you in advance.
    • RMI
      • RMI可以给在无request的情况下给browser发消息吗?虽然RMI有Stub 和 skeleton始终是server-side的技术啊。
        • 没问题,JDK1.1 有可RMI 例子,可户端注册一个REMOTE OBJECT。服务器段回叫这个REMOTE OBJECT
    • go for option 1, It's easy to implement. just a piece of java script code to keep the page auto refresh.
    • Use java applet to read appointment data and javascript to communicate with applet and refresh IE window.