NetTalk Central

Author Topic: WebSockets Refresh Question (NetTalk 12)  (Read 1946 times)

Johan de Klerk

  • Full Member
  • ***
  • Posts: 214
  • Johan de Klerk
    • View Profile
    • Designer Software
WebSockets Refresh Question (NetTalk 12)
« on: December 23, 2020, 01:34:38 AM »
Hi Bruce,

I have one WebServer EXE.
Many companies each with their own Data Files in their own folders under the WebServer folder.
c:\mywebserver\Company1\MyDatafiles.TPS
c:\mywebserver\Company2\MyDatafiles.TPS
c:\mywebserver\Company3\MyDatafiles.TPS
Etc.
When a user logs in I open the data files for the company he is allocated to.

Lets say I have 5 users logged in per company, 10 companies.
That means 50 users are logged in.

On the Browse.
If user 1 (Company 1) changes something and the WebSockets fire up to refresh the Browse.
Will it send the Refresh to all 50 users or only to the 5 users that are currently working on Company 1?

On the Form.
If user 2 (Company 2) changes something and the WebSockets fire up to refresh the Form.
Will it send the Refresh to all 50 users or only to the 5 users that are currently working on Company 2?

Regards

Johan de Klerk
Clarion 10, NT 11.57

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: WebSockets Refresh Question (NetTalk 12)
« Reply #1 on: December 23, 2020, 09:25:44 PM »
It will send a refresh to all 50 users (assuming all 50 are on the same browse page of course.)

Cheers
Bruce


Johan de Klerk

  • Full Member
  • ***
  • Posts: 214
  • Johan de Klerk
    • View Profile
    • Designer Software
Re: WebSockets Refresh Question (NetTalk 12)
« Reply #2 on: December 23, 2020, 09:50:07 PM »
Hi Bruce,

Thanks for the reply.

This will create a lot of unnecessary traffic on the webserver, if the webserver is very busy and have a 1000 companies and users are continuously updating data.
Is there a way to make it more clever that it knows who to send it to only for that particular company?

What is going to happen for instance:

On the Browse & Form.
If user 1 (Company 1) has a browse/form open with his data and user 2 (Company 2) changes something.
Let's say both companies have a customer number 1
Company 1
Customer Number: 1
Customer Name: Johan
Address: Rustenburg
Company 2
Customer Number: 1
Customer Name: Bruce
Address: Cape Town

user 1 (Company 1) changes the Address for Customer 1 to Pretoria.
Will it interfere with Customer 1 at company 2?

Sorry if I am asking stupid questions.

Regards

Johan de Klerk
Clarion 10, NT 11.57

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11191
    • View Profile
Re: WebSockets Refresh Question (NetTalk 12)
« Reply #3 on: December 27, 2020, 09:17:27 PM »
Hi Johan,

If you have 1000 users connected, using websockets, then you'll also have 1000 open connections going, which in it's own way will slow things down a bit.

If the users are constantly updating the data then it would be refreshing on their screens without the use of web sockets. So in this situation I would not make use of NetRefresh.

Cheers
Bruce