Databroadcast maybe unnecessary PK

Questions and answers for designing and implementing forms in Servoy

Databroadcast maybe unnecessary PK

Postby stefanoni » Wed Apr 03, 2013 12:20 pm

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
Last edited by stefanoni on Wed Apr 03, 2013 4:04 pm, edited 1 time in total.
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Databroadcast unnecessary PK

Postby pbakker » Wed Apr 03, 2013 12:44 pm

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Databroadcast maybe unnecessary PK

Postby stefanoni » Wed Apr 03, 2013 2:40 pm

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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Databroadcast maybe unnecessary PK

Postby stefanoni » Wed Apr 10, 2013 4:07 pm

... 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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Databroadcast maybe unnecessary PK

Postby mboegem » Wed Apr 10, 2013 5:44 pm

pbakker wrote: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.
Marc Boegem
Solutiative / JBS Group, Partner
Servoy Specialist
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance Developer

Image
User avatar
mboegem
 
Posts: 1749
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: Databroadcast maybe unnecessary PK

Postby ROCLASI » Wed Apr 10, 2013 6:12 pm

mboegem wrote: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.
Robert Ivens
SAN Developer / Servoy Valued Professional / Servoy Certified Developer

ROCLASI Software Solutions / JBS Group, Partner
Mastodon: @roclasi
--
ServoyForge - Building Open Source Software.
PostgreSQL - The world's most advanced open source database.
User avatar
ROCLASI
Servoy Expert
 
Posts: 5438
Joined: Thu Oct 02, 2003 9:49 am
Location: Netherlands/Belgium

Re: Databroadcast maybe unnecessary PK

Postby lwjwillemsen » Wed Apr 10, 2013 6:43 pm

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...
Lambert Willemsen
Vision Development BV
lwjwillemsen
 
Posts: 680
Joined: Sat Mar 14, 2009 5:39 pm
Location: The Netherlands

Re: Databroadcast maybe unnecessary PK

Postby pbakker » Wed Apr 10, 2013 8:04 pm

It is my hope...


For what reason are you hoping this?

Paul
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: Databroadcast maybe unnecessary PK

Postby Harjo » Thu Apr 11, 2013 10:11 am

mboegem wrote: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.
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Databroadcast maybe unnecessary PK

Postby gdurniak » Fri May 03, 2013 6:41 pm

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
File Shoppe
gdurniak
 
Posts: 232
Joined: Thu Jul 08, 2004 7:25 pm
Location: Bayside, NY, USA

Re: Databroadcast maybe unnecessary PK

Postby gdurniak » Mon May 06, 2013 11:19 am

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
File Shoppe
gdurniak
 
Posts: 232
Joined: Thu Jul 08, 2004 7:25 pm
Location: Bayside, NY, USA

Re: Databroadcast maybe unnecessary PK

Postby stefanoni » Tue May 07, 2013 3:50 pm

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
Alessandro Stefanoni ---- gigdoodle.ch ---- stefanoni.ch ----
Stefanoni Informatik Gmbh, CH-8200 Schaffhausen
Switzerland
stefanoni
 
Posts: 313
Joined: Fri Jul 23, 2010 3:17 pm
Location: Switzerland

Re: Databroadcast maybe unnecessary PK

Postby Harjo » Tue May 07, 2013 4:00 pm

+1
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Databroadcast maybe unnecessary PK

Postby ngervasi » Tue May 07, 2013 6:19 pm

+1
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: Databroadcast maybe unnecessary PK

Postby david » Wed May 08, 2013 3:21 am

David Workman, Kabootit

Image
Everything you need to build great apps with Servoy
User avatar
david
 
Posts: 1727
Joined: Thu Apr 24, 2003 4:18 pm
Location: Washington, D.C.

Next

Return to Forms

Who is online

Users browsing this forum: No registered users and 4 guests