Server Side processing in PHP for Phoenix

Server Side processing in PHP for Phoenix

arohit91arohit91 Posts: 7Questions: 1Answers: 0

Hi,

I am using datatables editor and I have successfully implemented a sample table that I was testing in MySQL database and I am using the server side processing code as is(PHP). I want to implement the same for Phoenix by pulling data from HBase. But the problem is PHP does not seem to have drivers for Phoenix. So is there any way that I could do the server side processing in java? Also, I am worried if that affects pagination and search since we will be having around 5 million records.

Replies

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    So is there any way that I could do the server side processing in java?

    Yes, but I'm afraid I don't provide Java software for server-side processing. You'd need to write it yourself using the server-side processing specification documentation.

    Allan

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

    ...and also

    I am worried if that affects pagination and search since we will be having around 5 million records.

    I wouldn't worry about that, DataTables is happy enough with a few million records.

  • arohit91arohit91 Posts: 7Questions: 1Answers: 0

    @allan So does that mean I have to implement the part which checks which row has changed and send data correspondingly as well? If not can you tell me how do I get the changed row json?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    I slightly misunderstood before - sorry. I thought you were specifically asking about server-side processing, but actually the question is about how to process Editor's submitted data at the server-side (as I understand it now).

    Editor will do everything on the client-side for, including submitting the information to the server. What you need to do is have a server-side script / program which will accept that data and write it to the database. The client / server communication Editor uses is documented here.

    There is a third party Java library for Editor called JED which you could check out. I haven't used it myself, but the author is super helpful.

    Allan

  • arohit91arohit91 Posts: 7Questions: 1Answers: 0
    edited August 2017

    Thanks for all the help @allan I have implemented my own java server side implementation for this. Now i am having trouble with a small part i.e. when i have columns listed in the editor function, can i have them hidden for the edit functionality because when i remove them from editor function i do not get their values after i perform a change. I will need atleast the primary key value to update/delete rows. Also, is there any example in editor that does excel style editing. For example: If i want to change a column value for all rows to HX_<originalfieldvalue>?

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

    can i have them hidden for the edit functionality

    The Editor has a set() option which will display the data item but not allow editing on it if "false" is passed..
    PHP code:

    Field::inst( 'your_field_name' )->set(false),
    

    Is that what you mean?

  • arohit91arohit91 Posts: 7Questions: 1Answers: 0

    @tangerine Is there any way we could do that in the javascript code? Because I am not using the PHP code.

  • arohit91arohit91 Posts: 7Questions: 1Answers: 0

    I figured out how to hide the columns for update/delete. Can you tell me if there is an option for excel style editing like giving expressions (rowB= rowA+rowC)?

  • allanallan Posts: 63,471Questions: 1Answers: 10,467 Site admin

    I would suggest you use a renderer to perform calculations on data.

    Allan

This discussion has been closed.