Mad::Mapper - Async ORM (kind of)

51 views
Skip to first unread message

Jan Henning Thorsen

unread,
Oct 14, 2014, 12:44:11 PM10/14/14
to mojol...@googlegroups.com
Hi,

I've just started the other day a new project, which is kind of an ORM, but where instead of having the database in center, you simply use it as a place to store your object. So.. How is that different? From what I'm used to, you usually make "export" your database schema into Perl space, and work with the tables and columns, using classes and accessors. What I'm proposing instead is that you simply add some extra methods to your existing objects to enable them to be persistent in some backend storage.

For now, I'm mostly focusing on using Mojo::Pg and Mojo::mysql as backends, but I don't see any harm in using any (async) backend.

The project is on github, and it's working except of the "has_many" in the SYNOPSIS.

https://github.com/jhthorsen/mad-mapper

I'm not sure where to continue on from here or if I even should. Any feedback is more than welcome.

Roland Lammel

unread,
Oct 14, 2014, 12:59:29 PM10/14/14
to mojol...@googlegroups.com

This looks interesting for a lightweight use of perl objects! Caching and preloading are the obvious issues that come up next.

With fresh you seem to target already basic caching stuff with manual invalidation. Looks a little awkward to me, maybe there are better ways to achieve that.

My vote would go for explore the territory further ;-)

+rl

--
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...@googlegroups.com.
To post to this group, send email to mojol...@googlegroups.com.
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

sri

unread,
Oct 14, 2014, 1:03:13 PM10/14/14
to mojol...@googlegroups.com
Death to ORMs! *sets this thread on fire and runs off*

--
sebastian

Jan Henning Thorsen

unread,
Oct 14, 2014, 1:08:49 PM10/14/14
to mojol...@googlegroups.com
The idea about "fresh" comes from this years Mojoconf where we figured out how to do it for Mandel. Mandel https://metacpan.org/pod/Mandel::Document#fresh. Normally I don't see much caching around, but it's quite important when you do async queries and want to keep the data around until rendering the template. I would appreciate other ideas though :-)


On Tuesday, October 14, 2014 6:59:29 PM UTC+2, Roland Lammel wrote:

This looks interesting for a lightweight use of perl objects! Caching and preloading are the obvious issues that come up next.

With fresh you seem to target already basic caching stuff with manual invalidation. Looks a little awkward to me, maybe there are better ways to achieve that.

My vote would go for explore the territory further ;-)

+rl

Am 14.10.2014 18:44 schrieb "Jan Henning Thorsen" <jan.h...@thorsen.pm>:
Hi,

I've just started the other day a new project, which is kind of an ORM, but where instead of having the database in center, you simply use it as a place to store your object. So.. How is that different? From what I'm used to, you usually make "export" your database schema into Perl space, and work with the tables and columns, using classes and accessors. What I'm proposing instead is that you simply add some extra methods to your existing objects to enable them to be persistent in some backend storage.

For now, I'm mostly focusing on using Mojo::Pg and Mojo::mysql as backends, but I don't see any harm in using any (async) backend.

The project is on github, and it's working except of the "has_many" in the SYNOPSIS.

https://github.com/jhthorsen/mad-mapper

I'm not sure where to continue on from here or if I even should. Any feedback is more than welcome.

--
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+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages