Databroadcast maybe unnecessary PK

Hi,
I receive unnecessary (in my understanding) Primary Keys from Databroadcast, in the following situation:

  • Servoy 6.1.2
  • Developer
  • Smartclient + Webclient open at the same Moment
  • Same Table shown in Webclient and Smartclient, but different limitation of Records ( find/Search)

When I edit a record in Webclient witch is NOT in the limitied Data-Range of the Smartclient, I receive even
though the PK of the edited Record via Databroadcats into Smartclient, regardless if it is NOT in the actual
Foundset of the Smartclient.

Is t this expected ?

Thank you for making me this understanding

Yes, this is expected: DataBroadcast works on table level: if your client has a foundset in memory based on table x, then it will receive databroadcasts events for all create/update/delete activity in that table.

Paul

Good to know.
When I like to do something with the received PK’s, I have to check first if the PK is relevant for my actual Foundset.
So… I changed the title to ‘maybe’ unnecessary :-)

Thank you Paul

… still thinking about this stuff…

What if I have 50 tenants with about 5 User each tenant, access the same postgres-table (separated by tenant-id). Every tenant receives all the databroadcast traffic of all other 49 tenants x 5 User, but useless, because the modified records never can be the same.

Nothing I have to care about ?
Is this a huge traffic, or no problem for a (lets say) standard-virtual server 2008 ?
Or better create 50 separate tabels ? How dou dou handle thouse situations.

Thank you for your thoughts

pbakker:
Yes, this is expected: DataBroadcast works on table level: if your client has a foundset in memory based on table x, then it will receive databroadcasts events for all create/update/delete activity in that table.

I can’t remember seeing this behaviour.
If I’m not mistaken the pk has to be in a foundset before getting it in the onDataBroadcast event.

mboegem:
If I’m not mistaken the pk has to be in a foundset before getting it in the onDataBroadcast event.

That was my understanding as well.

mboegem wrote:If I’m not mistaken the pk has to be in a foundset before getting it in the onDataBroadcast event.

It is my hope…

It is my hope…

For what reason are you hoping this?

Paul

mboegem:
If I’m not mistaken the pk has to be in a foundset before getting it in the onDataBroadcast event.

No, Johan, explained it in detail here: viewtopic.php?f=5&t=14943&p=81674&hilit=databroadcasting#p79701
databroadcast is done on table-level,

if the client than really updates your screen (adding records for example) is dependant of the foundset, or related-foundset.

I’m also seeing some strange behavior with Servoy 6.1 and Sybase 10.0.1

If I edit a record, it generates a broadcast to another smart client working on a different record ( but same Table )

The other client then tries to “Load Foundset”, but hits a deadlock, with the message “can not load form” ( and these error dialogs pile up, as other users edit records )

There is a separate “List” for this Table, that “shows all” records ( and is set as a “separate” found set )

Any suggestions appreciated ! I’ve been at this for over a week …

greg

It seems that when a smart client receives a data broadcast, it tries to load every found set for that Table, whether in use, or not

Since I had three found sets, this created a broadcast storm, and Deadlocks, with every client updating every found set

I now changed all my forms to use ONE found set ( namedFoundSet = DEFAULT )

Feature Request:
we need a way to disable a Form, if it’s not used, but might have a “separate” found set
Similarly, we need a way to exclude a found set from a received data broadcast, e.g. a List View that might Show All Records

greg

PS
I found this by adding an “onDataBroadcast” Method for the Solution, to show the broadcast parameters in a Dialog. The Found Sets still loaded, per the Performance Log

For my understanding we need a limitation of the databroadcasting to handle multi-tenants on the same table :

Databroadcast only records from the same tenants-key ( someting like .BroadcastOnlyThisFoundSetFilterParams(filterName) )

Regards

+1

+1

Possible related bug: Excessive ajax chatter in web client

the request

Thanks to all for this interessting feedbacks and your time !

It appears that the “onDataBroadcast” Method for the Solution triggers AFTER the Found Sets are updated

If this method could override the process, we could write our own handler

greg

Hi,
My Focus in this tread was, to prevent receiving databroadcast for records of other tenants. I can do what ever I want in the OnDataBroadcast() right now, this is not the problem. Maybe you describe your exactly needs on an separate tread to receive mor specific answers ?

best wishes

Perhaps I had it backwards …

What we need is an OnDataBroadcastReceived() Method

greg

I just tried it again, and OnDataBroadcast does trigger on RECEIPT of a Data Broadcast from others

The problem is, the update still happens. We need to be able to override this, so we can add our own handler

greg