Deferred rendering by DataTables
Deferred rendering by DataTables
I see that there are Ajax / Server Side Scripting available for DataTables to render multiple rows.
We have setup like Browser -> Apache -> Python Script -> DB setup. Our DB will contain millions of rows.
Now I understand that when request goes from Browser to Python Script to fetch values from DB, the script would/should return all millions of data in one call.
The Ajax / Server side scripting does not calls backend Python or other script periodically for deferred rendering.
In other words backend script would render data to UI once and from UI via datatables we cannot call periodically or upon requirement a backend script to render its next set of data.
Can anyone please let me know the concept of Ajax / Server side scripting in regards to deferred rending?
We have setup like Browser -> Apache -> Python Script -> DB setup. Our DB will contain millions of rows.
Now I understand that when request goes from Browser to Python Script to fetch values from DB, the script would/should return all millions of data in one call.
The Ajax / Server side scripting does not calls backend Python or other script periodically for deferred rendering.
In other words backend script would render data to UI once and from UI via datatables we cannot call periodically or upon requirement a backend script to render its next set of data.
Can anyone please let me know the concept of Ajax / Server side scripting in regards to deferred rending?
This discussion has been closed.
Replies
[quote]Instead of loading all data at once, DataTables will send information about the current page, the number of items that should be shown, filtering condition, column ordering, etc. to backend and it will expect that the backend script will return the appropriate data in JSON format.[/quote]
So DataTables would really have concept of "deferred rendering" ..
I am more fascinated by DataTables.
and documentation here: http://datatables.net/usage/server-side
In server-side processing, exactly as the quote you found says, an Ajax call is made to the server for every draw of the table. Useful for large (many millions) of results, since you can use the power of the server and the SQL engine which has been designed for exactly this sort of thing.
"Deferred rendering" in DataTables terminology is a "one shot" Ajax call to the server, where only one Ajax call is made and it returns all of the data, but the TR elements for the table are created on-demand. This can give a massive speed increase over rendering all rows at load time - example: http://datatables.net/release-datatables/examples/ajax/defer_render.html .
Hope that helps :-)
Allan