Serverside Processing

Serverside Processing

manmamanma Posts: 16Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem: Anybody able to help me to learn

How to use it at server side processing?

Need to know the complete steps from start to end including all scripts.

Any or All helps welcome.

Answers

  • tangerinetangerine Posts: 3,365Questions: 39Answers: 395

    The documentation has a complete working example.
    https://datatables.net/examples/server_side/simple.html

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    You might also be interested in this blog post which describes how to use the server-side libraries for Editor to do server-side processing.

    Or, if you prefer to write your own, the data exchange protocol is documented here.

    Allan

  • manmamanma Posts: 16Questions: 1Answers: 0

    Happily read information from you both.

    So far i learned how to use datables with html tables.

    Before i continue with my learning on server side processing

    needs to know the followings

    Is it possible to use txt or csv or data arrays source to use at server side processing ?

    If so the maximum number of rows that can be handled with fast loading and without any troubles ?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    In terms of number of rows, see this FAQ.

    For server-side processing with txt or csv - you can't just load the files, that would be client-side processing, since the csv / txt file obviously can't perform filtering and ordering itself.

    My recommendation - if you have 10k+ rows, import it into an SQL database and use server-side processing. If less, just load the file directly and use client-side processing.

    Also, make sure you read this section of the manual so you fully understand the difference between client-side and server-side processing.

    Allan

  • manmamanma Posts: 16Questions: 1Answers: 0

    my knowledge is limited on Datatables but also for other matters.

    I am looking to learn to run similar to this at

    https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html

    So to achieve that what are the steps and the scripts required ?

    or simply how to achieve that ?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    They are all listed on that page, and you would need server-side processing (i.e. an SQL database, unless you were to write your own for a CSV file).

    How many records do you have?

    Allan

  • manmamanma Posts: 16Questions: 1Answers: 0

    just for knowing only.

    i would like to take the same number of rows as example at

    https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html

    in the above example the tables is that populated from csv ?

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    Its using ajax as a function to generate the simulated row data. The row data is generated in the for loop. The setTiemout function is used to simulate the delay seen when using ajax.

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    So in the below example link

    https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html

    and in the javascript details as

    new DataTable('#example', {
    ajax: function (data, callback, settings) {
    let out = [];

        for (var i = data.start, ien = data.start + data.length; i < ien; i++) {
            out.push([i + '-1', i + '-2', i + '-3', i + '-4', i + '-5']);
        }
    
        setTimeout(() => {
            callback({
                draw: data.draw,
                data: out,
                recordsTotal: 5000000,
                recordsFiltered: 5000000
            });
        }, 150);
    },
    processing: true,
    ordering: false,
    scroller: true,
    scrollY: 200,
    searching: false,
    serverSide: true
    

    });

    So i need to know how the data is placed like

    same as in the html file under the above script

    or

    in a separate data source file ?

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949
    edited March 5

    That example is using simulated data to demonstrate the Scroller extension with server side processing. The example does not fetch data from the server. The data is generated, at the client, using the for loop:

            for (var i = data.start, ien = data.start + data.length; i < ien; i++) {
                out.push([i + '-1', i + '-2', i + '-3', i + '-4', i + '-5']);
            }
    

    Which then is populated using the callback function. See the ajax docs for more info about using it as a function. Typically a functoin would need need to be used.

    The example is not intended to show how to use server side processing in a production environment.

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html

    Anyhow the said example working what ever the environment it belongs to ?

    so my intention was to know and asked

    how the data is placed like

    same as in the html file under the above script

    or

    in a separate data source file ?

    or simply how the data placed and accessed ?

    The above asked is to understand the matters which are unknown to me only.

    And not get you irritate or make any other situations.

    If the matters needs to be back on the screen then keep it as it is.

    My intention is pure as TRUTH just like to know and understand it.

  • manmamanma Posts: 16Questions: 1Answers: 0

    https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html

    Anyhow the said example working what ever the environment it belongs to ?

    so my intention was to know and asked

    how the data is placed like

    same as in the html file under the above script

    or

    in a separate data source file ?

    or simply how the data placed and accessed ?

    The above asked is to understand the matters which are unknown to me only.

    And not get you irritate or make any other situations.

    If the matters needs to be back on the screen then keep it as it is.

    My intention is pure as TRUTH just like to know and understand it.

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    The example you link to is only a demonstration of Scroller working with large amounts of data. Use the examples here to see how server-side processing actually works.

    Also read the documentation about server-side processing, and if you are using Node.js, PHP, or .NET on the server-side, consider using the server-side processing libraries we provide for Editor.

    You cannot perform server-side processing on a raw CSV file! "Server-side processing" means what it says - search, order and paging is done by the server.

    Allan

  • manmamanma Posts: 16Questions: 1Answers: 0

    now i create a web page to learn the server side processing at

    http://testlearn.infinityfreeapp.com

    but it shows the error as

    ''DataTables warning: table id=test - Ajax error. For more information about this error, please see https://datatables.net/tn/7''

    don't have enough knowledge to rectify it.

    any help ?

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    Did you follow the instructions in the linked tech note? If you did, you would see that the server is returning a 500 error. That is an internal server error and could be anything from a permissions error in the file system, to the database not running.

    Check the server's error logs for any messages to be able to diagnose this issue.

    Allan

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Have you followed the steps in the technical notes linked to in the error? That'll be the place to start. If so, what did you find?

    Also, the console is showing this error:

    Failed to load resource: the server responded with a status of 500 (Internal Server Error)

    so you'll need to check the server logs and see what error is happening there.

    Colin

  • manmamanma Posts: 16Questions: 1Answers: 0

    i don't find any error files.

    could you able to check it for me ?

    https://dash.infinityfree.com/login

    username - manmadhang@outlook.com

    password - infinityfree*7

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    The error is coming from the server. The server logs are what needs to be looked at to debug why the server is returning the 500 internal server error. We won't have access to that by going to the link you provided. Maybe this link will help you with steps to debug:
    https://www.siteground.com/kb/internal_server_error_500/#:~:text=When%20you%20encounter%20an%20error,one%20of%20the%20many%205.

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    i am unable to find it.

    that's why provide the access to the server ?

  • manmamanma Posts: 16Questions: 1Answers: 0

    there is no other files available rather than the said example.

    if you can find out then proceed.

    no worries.

    i grant full access and permission to do so.

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    I connected to the page you linked to. There are a lot of options. Please provide the steps needed to see what you want us to look at.

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    what's the problem that datatable not loading ?

    how to rectify it ?

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    This is the page I see when logging in. PLEASE provide the steps to see the issue. Where is the Datatable?

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    click on ''f0_36100839'' next to the green globe image
    Website for testlearn.infinityfreeapp.com

    it goes to the below page at

    https://dash.infinityfree.com/accounts/if0_36100839

    from the above page click''control panel'' and open page at

    https://cpanel.infinityfree.com/panel/indexpl.php?id=70f054b3e895835c0bc3948a7bec64cde25322b2

    from the above page you can go to ''online file manager'' where the web pages available.

    also you can access databases by clicking '' phpMyAdmin'' and ''MySQLDatabases''

  • manmamanma Posts: 16Questions: 1Answers: 0
    edited March 16

    or you can access control panel from

    https://cpanel.infinityfree.com/panel/index.php

    username - removed

    password - removed

    the above details available on

    https://dash.infinityfree.com/accounts/if0_36100839

    under ''Account Details''

    (click on ''f0_36100839'' next to the green globe image
    Website for testlearn.infinityfreeapp.com

    it goes to the above page at)

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    To solve the 500 server error you will need to look at the server logs. The first link in their tutorials for web sites and PHP is this HTTP 500 error doc:
    https://forum.infinityfree.com/docs?topic=49352

    Follow the steps there to track down the server errror.

    Kevin

  • manmamanma Posts: 16Questions: 1Answers: 0

    i don't have no knowledge to sort it out.

  • kthorngrenkthorngren Posts: 21,325Questions: 26Answers: 4,949

    Supporting your server environment is out of scope for free community support on this forum. The forum is for Datatables specific questions. You can contact Allan to see if he is willing to help through purchasing a support package. Or perhaps use the infinityfree support forum to get help.

    Kevin

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    edited March 16

    Posting your cpanel login on a public forum is a very bad idea! :) I've removed the login details. I would strongly suggest you change your password.

    As Kevin says, I'd be happy to take a look at the issue under the support packages that I offer. The free support I can offer does not extend to logging in and debugging your server. If that is beyond your own ability you either need to learn those skills or hire a developer to do it for you.

    Allan

  • manmamanma Posts: 16Questions: 1Answers: 0

    I THINK NO HUMANS PAID FOR THE AIR, WATER, SUN AND EARTH they using ?

    Posting your cpanel login on a public forum is a very bad idea!

    if i think so i will never give it.

    i don't think so as you said.

    Truth Good Beautiful.

    TRUTH ALONE TRIUMPHS
    ALWAYS & EVER.

Sign In or Register to comment.