开发者

How to transfer large data between pages in Perl/CGI?

I have worked with CGI pages a lot and dealt with cookies and storing the data in the /tmp directory in Linux. Basically I am running a query for millions of records using SQL, and am saving it in a hash format. I want to transfer that data to Ajax ( which eventually will perform some calculation and return a graph using Go开发者_JAVA百科ogle API.

Or, I want it to transfer that data to another CGI page somehow.

PS : The data I am talking about here is in forms of 10-100+ MB's.

Until now, i've been saving that data on the file in the server, but again, it's a hassle to deal with that data on the server for each query.


You don't mention why it's a hassle to deal with the data on the server for each query, but assuming the hassle is working with the file, DBM::Deep might make it relatively easy to write the hash out and get it back again. Once you have that, you could create a simple script to return it as JSON and access it as needed from Javascript or other pages. Although I think the browser might slow down with 100MB JSON data structure.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜