Hi Andrew , Thanks for your inputs.
To be more precise - I have an application which is used by users and administrate by admin using swing GUI. When i say connected i mean that users has their active session on client application which is invoking web services. For maintenance purpose , Admin may see who all are connected and can click on GUI button to disconnect them from system (They will be shown a timer that you will be disconnect in 5 minutes , after 5 minutes their application will be closed automatically.Logon module will ensure that they can't login until unless maintenance is over (with some bolean value in database table indicating logonallowed). I was thinking of using optimized solution but didn't found webservice call back , asyn mechanism , WS_Addressing very useful and optimized. I was looking for something which can push message to client ... I am Ok with HTTP reuest / WEb service request , But i dont want server and client to continiously check and decide that its ok. You know real maintainance will happen weekly/monthly but if i keep on polling server just to see if i am being asked to get disconnected...its more resource consuming. If i get a mechanism where rather than continiously polling , if i get some message from server when disconnection is required it would make things more optimized...It may be something similar to push services... You more input on this is well appreciated !! Thanks SKS Andrew Clegg wrote: > > 2009/1/11 SKS <[email protected]>: > >> I have a thick swing client used by users to perform actions. Business >> logic >> is on server and exposed as CXF web services. I have a requirement where >> Admin user can see list of connected user and disconnect them for some >> reason , if required. I want a communication alert to be shown on >> disconnection so that they can save their changes. > > When you say connected/disconnected -- is there actually any sort of > permanent connection between the client and server? Or is "connected" > just essentially shorthand for "web services will respond to client's > requests"? > >> Can anybody advise me a good solution ..I can implement it many ways like >> background thread continiously checking with webservice & sleeping for >> some >> time and checking again , HTTP connection to servlet etc. I want to put >> an >> optimize solution to ensure that it should not affect performance of >> client >> & server both. > > Hard to say much without knowing more about the system, but your first > suggestion seems fairly sound. Maybe with an operation called > something like getTimeToDisconnect -- if it returns null, the > background thread just sleeps for a preset interval, if it returns a > positive integer N the client warns the user "You will be disconnected > in N seconds". > > You'd have to decide on the right two values to use (thread sleep > interval, and initial disconnect notification time) based on how many > users you have, how many WS requests the server is handling, etc. > > If you wanted to optimize it *slightly* you could use a plain old HTTP > GET instead of a real SOAP op, but that might add extra complexity to > your codebase, since presumably you're already using SOAP for the real > services. > > Don't know if this is the best way but it would be my first solution to > try... > > Andrew. > > -- > New site launched: http://biotext.org.uk/ > > I am retiring my old email addresses. > Please use [email protected] (i.e. andrew) in the future. > > -- View this message in context: http://www.nabble.com/Thick-client-notification-from-web-service-tp21397749p21400082.html Sent from the cxf-user mailing list archive at Nabble.com.
