Server Side processing in PHP for Phoenix
Server Side processing in PHP for Phoenix
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
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
...and also
I wouldn't worry about that, DataTables is happy enough with a few million records.
@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?
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
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>?
The Editor has a set() option which will display the data item but not allow editing on it if "false" is passed..
PHP code:
Is that what you mean?
@tangerine Is there any way we could do that in the javascript code? Because I am not using the PHP code.
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)?
I would suggest you use a renderer to perform calculations on data.
Allan