Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

upload logged data

by pashanoid (Scribe)
on Sep 30, 2012 at 11:12 UTC ( #996496=perlquestion: print w/replies, xml ) Need Help??
pashanoid has asked for the wisdom of the Perl Monks concerning the following question:

Dear Bretheren, I'm logging data from a wind generator onto a sqlite database. I want to upload this data onto a server and use DB::Chart to plot the data. What is the best way to do this? Dump the database inbetween logging, or generating charts on that notebook and uploading individual charts? Any suggestions? Many thanks!

Replies are listed 'Best First'.
Re: upload logged data
by NetWallah (Canon) on Sep 30, 2012 at 15:02 UTC
    How about double-logging:
    Log to the local SQLite database, AND create an incrementing log file containing SQL statements.

    A separate process (Either local, or on-request from the server) can periodically ship the incrementing file to the server, and delete them.

    The server can apply the received logs and maintain the equivalent of a replicated database, to generate charts.

    This has the advantage of being scalable for multiple logging sources, for centralized data processing (I'm an old-time mainframe guy).

                 I hope life isn't a big joke, because I don't get it.
                       -SNL

Re: upload logged data
by Anonymous Monk on Sep 30, 2012 at 11:48 UTC
    Either or -- though its probably simpler to install all prerequisites on your dev machine, and to just upload images -- web hosting can be PITA
Re: upload logged data
by CountZero (Bishop) on Sep 30, 2012 at 18:17 UTC
    It depends. How much control do you have over the web-server? Is your webserver able to run Perl, SQLite and has it all necessary modules and GNUPlot installed? Do you need these charts to be dynamically generated at arbitrary times and for various periods or will you only offer standard charts for fixed periods? Is there enough disk-space available to keep a large number of pre-rendered charts on-line?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://996496]
Approved by Corion
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (1)
As of 2018-07-21 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (450 votes). Check out past polls.

    Notices?