Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

My question is this: is it possible, in my C app, to save off the state of the interpreter and restore it later?

Sure you can, just as you can write a relational database in assembly.

Realistically you need to ask bigger questions of why? Why not just put it in hibernate? Why not save off the whole OS run-state which I believe you can do with hypervisors like vmware. You need to be able to ask the bigger question of why you want to do this.

It may be as easy as using Storable as one point, depending upon how the c/perl is stitched together.

Are there just a few global type objects, singletons, from which all other data within your perl code hang?

My suggestion is to draw pictures, I like pictures, and show what is in the perl code, what is in the code, how they communicate, what triggers communication, etc.

You can not well address this issue without a clear understanding of the architecture - yes you may have written it, but take a 50,000 ft view, not the 10 ft view, along with why, what is the driving issues, and the answer will probably pop right out.


In reply to Re: Embedded Perl - Saving State? by otto
in thread Embedded Perl - Saving State? by McD

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (1)
As of 2024-04-24 16:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found