Skip to main content
Solved

Lobby performance and concurrent users

  • October 26, 2021
  • 2 replies
  • 237 views

Forum|alt.badge.img+5

If multiple concurrent users are accessing a lobby and the data is set to refresh automatically, will FSM run the SQL query once (at predefined data refresh interval) and send the data over to users or run the query separately for each user who has the lobby open?

 

 

Best answer by SanjeewaJ

Hi Neville,

 

As per my understanding, answer is "query separately for each user". Lobby element refresh is connected with sessions. So, a database query is executed independently at each interval per user session.
Example: I am having a list element in a lobby page with refresh rate 30 sec. Every 30 sec you can observer below perform_exec_db_query per user session.
<perform_exec_db_query>
  <parameters>
    <sql_command>select (TASK_ID) AS TASK_ID_ALS,(PLACE_ID_CUST) AS PLACE_ID_CUST_ALS from task where place_id_cust = 'A100' order by task_id</sql_command>
    <light>false</light>
  </parameters>
  <authentication>
    <session_info>
     <session_id>NdcUykDiVy+y0txbLM9BL5lhUDZaU+jzPZAJ3FZvcSZQoyMRjaDiJQZv7NDWbp2TC3bFkx7clXXzd6kthmy3OA==DPKxm9zy0T/waif2AX6nfA==g3YW/QTPxrpcEtJ4CMAomQ==</session_id>
      <token_id>aEJ+XcOHwK6eUCOOESkNUvMqzadJaQb2Y3ixcM3NnY6m/YABAvQ07TZKSdk4kEzNhctbTZ608a9MeycH+PQ8HBguwJaQSb49KSNgiPr1rHORVILhFb1ibqyFLGzLSwJR</token_id>
    </session_info>
  </authentication>
</perform_exec_db_query>

 

Regards,
Sanjeewa

View original
Did this topic help you find an answer to your question?

SanjeewaJ
Superhero (Employee)
Forum|alt.badge.img+12
  • Superhero (Employee)
  • November 5, 2021

Hi Neville,

 

As per my understanding, answer is "query separately for each user". Lobby element refresh is connected with sessions. So, a database query is executed independently at each interval per user session.
Example: I am having a list element in a lobby page with refresh rate 30 sec. Every 30 sec you can observer below perform_exec_db_query per user session.
<perform_exec_db_query>
  <parameters>
    <sql_command>select (TASK_ID) AS TASK_ID_ALS,(PLACE_ID_CUST) AS PLACE_ID_CUST_ALS from task where place_id_cust = 'A100' order by task_id</sql_command>
    <light>false</light>
  </parameters>
  <authentication>
    <session_info>
     <session_id>NdcUykDiVy+y0txbLM9BL5lhUDZaU+jzPZAJ3FZvcSZQoyMRjaDiJQZv7NDWbp2TC3bFkx7clXXzd6kthmy3OA==DPKxm9zy0T/waif2AX6nfA==g3YW/QTPxrpcEtJ4CMAomQ==</session_id>
      <token_id>aEJ+XcOHwK6eUCOOESkNUvMqzadJaQb2Y3ixcM3NnY6m/YABAvQ07TZKSdk4kEzNhctbTZ608a9MeycH+PQ8HBguwJaQSb49KSNgiPr1rHORVILhFb1ibqyFLGzLSwJR</token_id>
    </session_info>
  </authentication>
</perform_exec_db_query>

 

Regards,
Sanjeewa


Forum|alt.badge.img+5

Hi Sanjeewa,

 

Thanks for clarifying.

It maybe beneficial from performance point of view if FSM can run the query once and distribute the results among the users. I have seen a few reporting applications doing this. For e.g., SSRS server reports have the option of pulling the data from cache and it is particularly useful when we have too many concurrent users or the query is too complex. Similarly, the Power BI services has the option of refreshing data at predefined intervals and the users will not initiate separate queries pulling data from the production database.

 

Thanks

Regards

Neville

 


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings