Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: Reflections on the design of a pure-Moose web app...

by sundialsvc4 (Abbot)
on Mar 23, 2009 at 19:28 UTC ( [id://752691]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Reflections on the design of a pure-Moose web app...
in thread Reflections on the design of a pure-Moose web app...

The application is built on top of a fully normalized and very well-constructed database. (That I didn't even have to construct! It was already there!)

The advantage of the approach that I took in this application is that “almost all of the web application” did not have to be concerned with the vagaries of the structure of that database. The “Things” know how (and when...) to retrieve information from it, and to post information back to it. Having done so, they can retain the information, and make not-yet-permanent contemplated changes to it, without “hitting” the production database at all.

I posit that such an approach provides for excellent separation-of-concerns within the application, and that it strictly avoids the problem of having the software design be subtly linked-to, hence dependent upon, the schema of that production database. Unstructured information of a reasonable size (i.e. a Perl object) can be stored separately for a reasonable time, in an altogether separate data-store, and then posted to the database only when, and if, necessary. Information is retrieved only on-demand, yet only the object need be aware of when such a “demand” has actually taken place.

So... am I arguing any of your points? Absolutely not. Instead, I am just here to say:   “Hey! Looky! This approach worked really well for me!” It is a very noticeable improvement that is going to stay at the top of my tool-bag for a while.

Replies are listed 'Best First'.
Re^4: Reflections on the design of a pure-Moose web app...
by stvn (Monsignor) on Mar 23, 2009 at 20:01 UTC

    To perrins point about concurrent access to the serialized JSON files, you might want to take a look at KiokuDB, the BDB backend provides full ACIDy transactional goodness and works even more transparently then MooseX::Storage does.

    -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://752691]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2024-04-20 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found