On Fri, Mar 22, 2019 at 10:16 AM Luc Larochelle <llaroche...@gmail.com>
wrote:

> I've been thinking a lot about this lately. In a very simple and light
> application, the database is an XML file , around 1000 entries and very low
> IO.
>
> I haven't been orienting my work on XML, but I was wondering if it would
> be easier to CRUD on the XML directly instead of creating a web app +
> migrate the data to a db, etc ...
>

It sounds like the problem that I have is similar to yours.  I'm dealing
with a SOAP-based web API that delivers 500 records at a time.  I'm trying
hard -- probably too hard, but I'm stubborn -- to avoid converting the XML
results into a database.  The schema necessary to map this web service is
300 pages long, so no thanks.  Like you, I'm dealing with low IO and prefer
to handle my processing in-memory with Perl rather than crafting SQL
queries.  So, as I indicated in the thread you linked, I deserialize the
SOAP response into a complex Perl data structure and then I further shove
that into a Mojo::Collection so I can very easily chain methods for grep,
sort, map, each, etc.  I can also modify the data and then send it back to
the web service via SOAP.

I'm getting very close to releasing Mojo::Autotask
<https://github.com/Keystone-Technologies/mojo-autotask/blob/development/lib/Mojo/Autotask.pm>
to
CPAN, but there's the development branch to review if you like.  This also
uses Mojo::Redis for memoizing results.  The included
Mojo::Collection::Role::Autotask expand method is the equivalent of an SQL
'join'.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to