Reputation: 2103
I am trying to fetch large tabular data from a remote url which send data in binary format. To read this data I am using a C program that runs (inbuilt) with server. The C program fetches fetches data in binary format from various sources, convert into readable form and send it to frontend.
The I have two option:
I want to to operations like sorting and grouping of data in frontend. So can you suggest me which is better option to use in this scenario.
Updates:
1 -> frontend will just receive the data and may do sorting or grouping
Upvotes: 2
Views: 1889
Reputation: 19093
If you must send all the data to the front end, you could use a json array to wrap each row. This minimises the amount of extra data you are adding e.g.
data:{
columns:["A","B","C"],
rows:[ [1,2,3],[4,5,6],[7,8,9] ]
}
However, I would try to avoid sending all the data to the fronend application if possible. It should be possible to show pages of data by fetching the required data on demand using ajax calls. The server can do the heavy work of sorting, grouping etc. Consider storing the data in a database.
Upvotes: 3