Databroadcasting Questions

Questions and Answers on installation, deployment, management, locking, tranasactions of Servoy Application Server

Re: Databroadcasting Questions

Postby jcompagner » Tue Nov 23, 2010 5:31 pm

jbader wrote:Databroadcasting Questions
1.Do all native Servoy components receive broadcasts? Meaning, for example, will a label whose value is set to %%dataProvider%% receive a broadcast when dataProvider is changed? Is a label different than a text field as far as databroadcasting is concerned (value vs reference)? Are some components **not** “broadcast aware?”


components are not broadcast aware at all.
They are record changes aware..
Where the record change come from doesnt matter..

Its the same as you edit a field of a record on place X and then when you save place Y on a different form is also updated (this could even happen before you save when you just commit the value (tab out of field))

So databroadcasat is in the data layer not ui.. The datalayer just gets a even that there is new or updated row data. The ui just recieves a value update event.

jbader wrote:2.How are aggregates treated in terms of databroadcasts? Example, I have a related dataprovider placed on a form, which is an aggregate, and any of the related values that it aggregates change? Or new, related values to aggregate are created/deleted. Will the aggregate's select query be automatically rerun, resulting in the aggregate receiving a “broadcast?” How about the same case except instead of placing a field I placed a label whose value is %%relation.aggregate%%. Will that receive a broadcast/rerun the select in the same way (per #1 above)?


Ths is the same as #1 an row update event is generated by a databroadcast (but could also be again by a change of the client itself) then we clear the aggregates and those will be get again when the ui asks for them.

jbader wrote:3.Does the app server know which clients have stale data, or do the clients tell the server they have stale data? If the latter, is there a difference between smart and webclient here, or is the mechanism for determining stale data the same?


the app server only knows which client did touch what data (server/table) and then a client will receive databroadcast events for that server/table combination.
the client then looks if it has stale data.

jbader wrote:4.Are unstored calcs **ever** cached?


calcs are cached yes and calculated when depended data changes
some more info;
http://wiki.servoy.com/display/public/D ... alculation


jbader wrote:5.In webclient specifically, can/does the inherent asynchronicity of AJAX cause problems with broadcasts? Can they happen out of order? For example, if I had a calc (stored or unstored) on a parent table whose value was an aggregate through a relationship, and one of the columns, from one of the records/rows from the related foundset changed, could it ever happen that webclient attempt to first get/receive a broadcast for the calc on the parent table, which in that case would not yet have the related record's changes? If so, this would mean that it's data was indeed stale, and it did indeed got its broadcast, but the broadcast it got didn't take into account the related change!? How are you making AJAX synchronous in this regard?


that ajax poll just aks the webclient state on the server if there is any change where if it maybe.
and will render that. If not then it will take it the next time.
Databroadcast is not triggered or really called by the ajax poll, the ajax poll only updates the html of the ui state the webclient has on the server..
The ui state on the server is the one that gets the databroadcast and will mark all the ui components as changed so that they will be rendered the next time an ajax poll (or a request a user does by clicking a button or something) happens.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Previous

Return to Servoy Server

Who is online

Users browsing this forum: No registered users and 19 guests

cron