tag:blogger.com,1999:blog-876358347971598886.post8387801917490356518..comments2023-03-25T16:20:46.021+03:00Comments on nothingmuch's perl blog: Using KiokuDB in Catalyst applicationsnothingmuchhttp://www.blogger.com/profile/03855760206940108541noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-876358347971598886.post-65248964136011694722009-05-14T08:52:00.000+03:002009-05-14T08:52:00.000+03:00The current best way is to either use the DBI back...The current best way is to either use the DBI backend's search columns, or Search::GIN::Extract::Callback and Search::GIN::Query::Manual. I will write a short post on the latter soon, but I think it's also covered in the tutorial.<br /><br />If you want to use the extra columns I wouldn't worry about the column, having a NULL value is, after all, what NULL values were designed for ;-)<br /><br />The problem with Search::GIN is that you can't easily compose multiple indexes yet, and the query execution is very low level at the moment (the Query objects are really more like opcodes in a query language's execution optree).<br /><br />However, if you constraint yourself to Callback and Query::Manual things are pretty flexible. it's not what Search::GIN was designed to do in the long term but it's useful right now.<br /><br />I'm off to bed now, but feel free to come to #kiokudb on IRC and I can paste a few examples tomorrow morning.nothingmuchhttps://www.blogger.com/profile/03975438115490089158noreply@blogger.comtag:blogger.com,1999:blog-876358347971598886.post-24447054259760441522009-05-14T06:56:00.000+03:002009-05-14T06:56:00.000+03:00Thanks for the detailed post. This is very interes...Thanks for the detailed post. This is very interesting and clears up many of my question about KiokuDB and even a few about how Moose works in Catalyst v5.8.<br /><br />My nagging question revolves around the search aspect of an OODB. Just thinking through one of the common searches (without going into anything even approaching data mining which I know can be problematic for OODBs) how would you efficiently handle something like a password reset? Say a user gives us their email address, should I search through every User object for the address? Should I use dbi and have a column for each email address, even though most of my objects won't have one (and I can envision potential issues will pulling an email address from the wrong type of object)? Or should I address this with Search::GIN? I think any of these would work, but as I understand them, all have their draw backs. What is the "best" way to deal with something like this.<br /><br />Thanks!Markhttps://www.blogger.com/profile/09695682449145009572noreply@blogger.comtag:blogger.com,1999:blog-876358347971598886.post-56676417374937538512009-05-06T19:31:00.000+03:002009-05-06T19:31:00.000+03:00Yes, I could have definitely used both!.
I though...Yes, I could have definitely used both!.<br /><br />I thought that MX::Declare might be a bit distracting to people who don't know it yet. The code as is is quite readable I think and I wanted to focus on the KiokuDB specific bits.<br /><br />Similarly, the only case for MX::Types involves the 'URI' class type, and digressing into why bareword class names are annoying doesn't seem helpful.<br /><br />These minor issues aside, I whole heartedly recommend using both MooseX::Types and MooseX::Declare, I love both modules!<br /><br />If you want MX::Declare classes with the KiokuDB::Lazy trait just make sure the metaclass is set up correctly (more info in the KiokuDB::Class docs)nothingmuchhttps://www.blogger.com/profile/03975438115490089158noreply@blogger.comtag:blogger.com,1999:blog-876358347971598886.post-64270115109739631592009-05-06T19:16:00.000+03:002009-05-06T19:16:00.000+03:00Great post and shows some of rapid development opt...Great post and shows some of rapid development options with modern Perl. My question for you is if you could have used MooseX::Types and if KiokuDB is compatible with MooseX::Declare?<br /><br />Thanks!Unknownhttps://www.blogger.com/profile/01931127394884250158noreply@blogger.com