java - Do I need a web-service for this case? Data-synchronization over multiple clients -
i'm new in area , little bit confused current thoughts on web-service implementation application. want synchronize connected clients current data on mysql db. came use web-services coordination purposes, got stuck.
the way tried implement is...
the web-service running deamon check/listen on crud operations affecting db data. once crud operation has been occured undetakes notify connected clients , each client in turn refreshes jtable current db data , informs user change took place on db.
this i'm stuck...
the way i'm thinking it's (maybe?) wrong, since conceptually web-services awaiting client requests , send him corresponding response. here, there no client requests. web-service sends response (noification), must multicast since it's unaware of "calling" client -there's no request.
therefore, in order client send request must "cron" time web-service if change on db has been occured. web-service responts true or false crud details (crudeventfired(event_type, event_details)). but, not optimal create big , (much of time) useless traffic when there no crud operation occured. also, there 2 different deamons (one in web-service , other in client-app) check/listen same type of event , that's redundant.
also, implementation seems there's no need web-service @ , code check db changes implemented in client. on other hand setting client responsible db changes require code same functions in different platforms (desktop, ios, android, etc), while setting web-service coordinator data synchronization between clients require code once appropriate function , each client implement own notificationlistener().
is wrong way i'm thinking using web-services? how should changed? need use web-services?
i attach diagram convinience.
Comments
Post a Comment