Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

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

Good localtime friends,

I recently inherited a project at work that requires storing information about collections of images. Essentially each image that comes through has the following attributes:

1)Name of the collection it belongs to
2)Number of images in collection
3)Image number _ of _ in collection
4)File name of image

As these come in I need to store the information above until the final image of the collection is processed. I was thinking about creating a file (collectionname.dat) using a format like ...

Number of images => 5 1 => image1.jpg 2 => image2.jpg 4 => image4.jpg 5 => image5.jpg

So in the example above I have not received the third image of the collection.Each time I receive an image I have to perform the following:

1)Check for existence of dat file. Create one if required
2)lock the file (concurrency)
3)check to see if the latest image completes the collection
  3a)If not, write the image information to a file
  3b)If it does, send the collection out and delete my dat file

Now on to the question. Any ideas on suggestions to make this quicker and easier? Currently the use of a DB is not an option.

Cheers,
Hok


In reply to Caching Format by hok_si_la

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 exploiting the Monastery: (4)
As of 2024-04-24 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found