Jump to content

Performance and Questions in Production


cristianotestai

Recommended Posts

Hi Farshad,

 

I started a few days ago the use of my project in production for two customers.

The application(site) will be centralized for use on the internet, where companies will login and use the application, ie, the server is hosted in a cloud server on the internet.

With this, and some tests in production already achieved, i am concerned about some performance issues, so i'm writing to you.

Some of the problems i'm encountering is related delays at certain times in the execution of relatively simple tasks, but in accordance with issues

local user's computer (processor and memory) and internet connection, there is often an excessive delay and the user remade the procedure

that should be almost instantaneous, but at the moment there was a delay in the response from the server, especially when there is simultaneous access.

In many cases, to not have these problems, i'll need to make the screen controls and processes for client side scripting, but there are some tasks that are more difficult to perform

and so i have this concern with the server response time.

There are cases that will use screen mask to inform the user about the progress of the process, but there are cases where there is no sense in doing this and by

it need to have a faster response time because the project site will be taking a higher proportion.

Other problems encountered is the implementation of that process more quickly than once, since, as is asynchronous, if the user makes a double click for

close a window, ajax error occurs because the object to be released no longer exists. There are other examples like this..

I would ask special attention to these issues about server performance and access for objects, because in my case, the application will not be local and that

my project is as successful as expected, these vital questions need to be considered.

 

If you consider to be interesting, i can enable a user to the site to you see and possibly talk about some of these issues.

 

Thank you for your attention and once again thank you for the great work.

 

Best Regards.

Link to comment
Share on other sites

  • Administrators

Hi Farshad,

 

I started a few days ago the use of my project in production for two customers.

The application(site) will be centralized for use on the internet, where companies will login and use the application, ie, the server is hosted in a cloud server on the internet.

With this, and some tests in production already achieved, i am concerned about some performance issues, so i'm writing to you.

Some of the problems i'm encountering is related delays at certain times in the execution of relatively simple tasks, but in accordance with issues

local user's computer (processor and memory) and internet connection, there is often an excessive delay and the user remade the procedure

 

It is related to internet lag. i.e. ping time. When ping time is > 200ms it may lead users to double click on buttons and cast same command several times. I'm aware of this issue.

 

that should be almost instantaneous, but at the moment there was a delay in the response from the server, especially when there is simultaneous access.

 

Delay can not be related to number of simultaneous access unless you talk about a really heavy traffic like hundreds of concurrent active connections.

 

In many cases, to not have these problems, i'll need to make the screen controls and processes for client side scripting, but there are some tasks that are more difficult to perform

and so i have this concern with the server response time.

 

If your events are synchronous the only way is to block UI until each event is fully processed. There is no other way. There is no way for framework to handle this situation internally. Of course, we can add a mode which UI is blocked after each Ajax request. This will reduce UI experience quality but you need it if your app is designed and works synchronously. If one event can't be executed more than once you need to protect it using client side UI masking techniques.

 

There are cases that will use screen mask to inform the user about the progress of the process, but there are cases where there is no sense in doing this and by it need to have a faster response time because the project site will be taking a higher proportion.

 

 

Other problems encountered is the implementation of that process more quickly than once, since, as is asynchronous, if the user makes a double click for

close a window, ajax error occurs because the object to be released no longer exists.

 

Close window issue when user clicks more than once will be resolved by us.

 

There are other examples like this..

I would ask special attention to these issues about server performance and access for objects, because in my case, the application will not be local and that

my project is as successful as expected, these vital questions need to be considered.

 

I'm aware of your problem as I encountered same issues myself in the past.

 

Actually, there is no performance issue here, only lag from slow or distance internet connection. I don't know how heavy your app relies on Ajax events but if each and every of uset actions fires an Ajax request then your app may not work efficiently over a slow connection.

 

In classical approach web apps were static Forms where user fills offline then click submit and send them to the server. Now with Ajax technology developers tries to use Ajax events in each action which increases number of requests. Biggest problem here is when Ajax events must be executed in certain order and executed only once. In this case several techniques are used to lock UI until Ajax task is processed.

 

In general use of Ajax events can be abused, because some developers forget that they're designing an app for the internet not for the desktop. OK uniGUI promises both desktop and web, but it doesn't mean that developers shouldn't follow proper guidelines for web application development. That's one of the reasons which force me to push VCL part of the framework to background or even remove it from framework, because some developers misunderstand what it is meant to be.

 

One of the misuses here is over-using of Ajax events. It leads to web apps where each user click fires one or more Ajax event. It makes app slow on the internet and difficult to manage when user cast events faster than server can handle.

 

For example several times I've seen that developers do things like below:

 

procedure TMainForm.UniEdit1KeyDown(Sender: TObject; var Key: Word;  Shift: TShiftState);
begin
 if Key = 13 then
 begin
	// do somthing
 end;
end;

 

Which doesn't make sense at all when you deploy your app on the web. It would make sense only in a gigabit LAN, but certainly makes no sense on the internet.

 

If you consider to be interesting, i can enable a user to the site to you see and possibly talk about some of these issues.

 

You must narrow down your issues to specific cases and I'll try to guide to a proper solution. Again, as I said above many times the only solution is masking UI.

 

Thanks

Link to comment
Share on other sites

If your events are synchronous the only way is to block UI until each event is fully processed. There is no other way. There is no way for framework to handle this situation internally. Of course, we can add a mode which UI is blocked after each Ajax request. This will reduce UI experience quality but you need it if your app is designed and works synchronously. If one event can't be executed more than once you need to protect it using client side UI masking techniques.

 

Adding a mode which UI is blocked after each Ajax request will be a great feature.

Nobody can guarantee low ping times or normal internet traffic on client side.

 

BTW , is there an event to help us hide a screen mask when the data finishes loading on the UniDBGrid ?

Link to comment
Share on other sites

It is related to internet lag. i.e. ping time. When ping time is > 200ms it may lead users to double click on buttons and cast same command several times. I'm aware of this issue.

 

 

thanks for the reply, I hope soon to have any possible solution or any specific treatment for this case.

 

 

 

 

If your events are synchronous the only way is to block UI until each event is fully processed. There is no other way. There is no way for framework to handle this situation internally. Of course, we can add a mode which UI is blocked after each Ajax request. This will reduce UI experience quality but you need it if your app is designed and works synchronously. If one event can't be executed more than once you need to protect it using client side UI masking techniques.

 

 

Most of the events of my app must be synchronous, but there are processes that can be asynchronous.. Perhaps, it would to have some form of lock optionally to not perform the same event more than once.

You said about protecting it using client side scripting with masking techniques.

What are existing techniques that can be done? I just know the showmask() and hidemask(). There are some other way or technique to handle this need?

 

 

Close window issue when user clicks more than once will be resolved by us.

 

thanks.

 

I'm aware of your problem as I encountered same issues myself in the past.

 

Actually, there is no performance issue here, only lag from slow or distance internet connection. I don't know how heavy your app relies on Ajax events but if each and every of uset actions fires an Ajax request then your app may not work efficiently over a slow connection.

 

In classical approach web apps were static Forms where user fills offline then click submit and send them to the server. Now with Ajax technology developers tries to use Ajax events in each action which increases number of requests. Biggest problem here is when Ajax events must be executed in certain order and executed only once. In this case several techniques are used to lock UI until Ajax task is processed.

 

In general use of Ajax events can be abused, because some developers forget that they're designing an app for the internet not for the desktop. OK uniGUI promises both desktop and web, but it doesn't mean that developers shouldn't follow proper guidelines for web application development. That's one of the reasons which force me to push VCL part of the framework to background or even remove it from framework, because some developers misunderstand what it is meant to be.

 

One of the misuses here is over-using of Ajax events. It leads to web apps where each user click fires one or more Ajax event. It makes app slow on the internet and difficult to manage when user cast events faster than server can handle.

 

 

 

Yes, this is my biggest problem today that i'm finding, because some processes of my app needs to have the executions in a certain order. What are the various techniques that can be used?

 

I have experience in object-oriented development and DataSnap with Delphi, but i'm beginner in the use of Ajax technology, so maybe at some point may be over-using Ajax events.

 

 

You must narrow down your issues to specific cases and I'll try to guide to a proper solution. Again, as I said above many times the only solution is masking UI.

 

 

I'll be putting in another post some real situations for you to be possible to direct the handling of Ajax events and doing the best possible way.

Thanks for attention and your precious help.

 

Best Regards.

Link to comment
Share on other sites

Hi Cristiano,

 

I have had similar problems but I had to just change my mind to that all is event programming and nothing is modal anymore and im responsible to make sure i do it in right order.

 

Did many mistakes with showmodal until i learned a bit more about masks etc and modal does not stop anything. It's somewhat similar to run threads and multiple request to data server you never know what order you will get the data so you have to look at the process id to make sure you use it in the right order.

 

 

Later,

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...