You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(19) |
Nov
(22) |
Dec
(19) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(35) |
Feb
(5) |
Mar
(13) |
Apr
(9) |
May
(3) |
Jun
(16) |
Jul
|
Aug
(6) |
Sep
(15) |
Oct
(5) |
Nov
(3) |
Dec
(7) |
2003 |
Jan
(16) |
Feb
(10) |
Mar
(19) |
Apr
(13) |
May
(5) |
Jun
(20) |
Jul
(33) |
Aug
(9) |
Sep
(1) |
Oct
(12) |
Nov
(17) |
Dec
(2) |
2004 |
Jan
(3) |
Feb
(9) |
Mar
(7) |
Apr
(16) |
May
(6) |
Jun
(6) |
Jul
(18) |
Aug
(8) |
Sep
(27) |
Oct
(8) |
Nov
(14) |
Dec
(29) |
2005 |
Jan
(1) |
Feb
(11) |
Mar
(33) |
Apr
(2) |
May
(4) |
Jun
(21) |
Jul
(41) |
Aug
(6) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2006 |
Jan
(8) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Chris W. <ch...@cw...> - 2002-08-12 16:02:50
|
* Ray Zimmerman (rz...@co...) [020812 09:39]: > Hi Chris, > > Thanks for including the refetch() and field_update() in the latest > SPOPS. Could you clarify what you were referring to in the Changes > file: > > >This updates the values for a limited number of fields, or performs > >an update across several objects at once. > > ... and in the docs for field_update() ... > > >Note that this rubs against the grain of one object == one update. But > >it is quite useful, and useful things tend to stick around. Umm... I was referring to the future change that was just implemented! > I never envisioned doing updates across multiple objects with a > single field_update() call, though it does sound useful. Does it > really work? I assume you'd call it as a class method and specify a > where clause, right? Something like ... > > Class->field_update( { status => 'OFF' }, > { where => 'output = 0' } ); Exactly. > But what about the calls to $self->id_clause( undef, undef, $p ) in > field_update()? ... ah, that just returns undef, eh? Pretty slick. I fixed this so it will only be called if it's an object. > So, assuming I've got it right, maybe we should include an example of > this in the docs as well ... it never would have occurred to me if > you hadn't hinted at it in the Changes file. Yep, docs are now update. I also added a test in t/30_dbi.t for this as well. Thanks for pointing this out! Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988 |
From: Ray Z. <rz...@co...> - 2002-08-12 13:27:45
|
Hi Chris, Thanks for including the refetch() and field_update() in the latest SPOPS. Could you clarify what you were referring to in the Changes file: >This updates the values for a limited number of fields, or performs >an update across several objects at once. ... and in the docs for field_update() ... >Note that this rubs against the grain of one object == one update. But >it is quite useful, and useful things tend to stick around. I never envisioned doing updates across multiple objects with a single field_update() call, though it does sound useful. Does it really work? I assume you'd call it as a class method and specify a where clause, right? Something like ... Class->field_update( { status => 'OFF' }, { where => 'output = 0' } ); But what about the calls to $self->id_clause( undef, undef, $p ) in field_update()? ... ah, that just returns undef, eh? Pretty slick. So, assuming I've got it right, maybe we should include an example of this in the docs as well ... it never would have occurred to me if you hadn't hinted at it in the Changes file. -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Chris W. <ch...@cw...> - 2002-06-26 17:59:01
|
On Wed, 2002-06-26 at 11:42, Perrin Harkins wrote: > It sounds like that would be pretty easy to do, especially since the > hooks seem to be there already. Is there some unresolved design issue > holding you back from doing it, or is it just a matter of not having > time to work on it? No time, plus no motivation compared to other features. I haven't needed the caching yet so I haven't done it. It should be fairly straightforward to implement. If there are any sticky issues with the current design we can just redo that part, since nobody's using caching yet. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Perrin H. <pe...@el...> - 2002-06-26 15:42:54
|
Chris Winters wrote: > I think what you propose should be fine. There's nothing stateful held > in any of the modperl servers, particularly since (hah!) caching hasn't > been implemented yet. It sounds like that would be pretty easy to do, especially since the hooks seem to be there already. Is there some unresolved design issue holding you back from doing it, or is it just a matter of not having time to work on it? - Perrin |
From: Chris W. <ch...@cw...> - 2002-06-26 13:08:07
|
On Wed, 2002-06-26 at 08:48, And...@Be... wrote: > it seems like we will start a new project soon which will be a customer care > system upon OI and think about scaling the servers up to support the load. > The idea is, that we do not want lots of unrelated systems for every > application. > ... I think what you propose should be fine. There's nothing stateful held in any of the modperl servers, particularly since (hah!) caching hasn't been implemented yet. So requests should be able to use any server interchangably. The one caveat would be for sessions, but IIRC you're using the database for this so that's not a problem If you haven't already seen it, read Perrin's article detailing the heavy duty eToys setup.[1] It's well written and extremely helpful. One note: since caching is not implemented in SPOPS or OI, you want to be sure that your DB server rocks like a hurricane. (But you probably already knew that :-) Chris [1] http://www.perl.com/pub/a/2001/10/17/etoys.html -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: <And...@Be...> - 2002-06-26 12:49:09
|
Hey y`all, it seems like we will start a new project soon which will be a customer = care system upon OI and think about scaling the servers up to support the = load. The idea is, that we do not want lots of unrelated systems for every application.=20 What we think about looks like this: DB Host NFS Host=20 | | ------------------------ gigabit ethernet ---------------------------- | | | mod_perl Host 1 mod_perl Host 2 ... mod_perl Host n =20 | | | ------------------------gigabit ethernet------------------------------ | | frontend apache proxy frontend apache proxy From my understanding of OI so far, there should not be a problem, when distributing the mod_perl processes to multiple hosts, but still: = please comment, if you see any problems or have a different idea... Thanks for you time, Andreas Nolte - Leitung IT - ____________________________________ MSN Marketing Service Nordwest GmbH - Bertelsmann Services Group - Olympiastra=DFe 1 26419 Schortens Fon +49 (0) 44 21 / 76 -84002 Fax +49 (0) 44 21 / 76 - 84111 E-Mail:And...@be... Internet:www.bertelsmann-services.de |
From: Chris W. <ch...@cw...> - 2002-06-25 03:34:59
|
On Fri, 2002-06-21 at 11:17, Ray Zimmerman wrote: > I like it. The name 'update' is definitely too generic. I already ran > into a class that already had an update() method doing something else. The ayes have it then. > Another thing that I thought of is that we should probably allow > refetch() to be called without any parameters, in which case it would > re-fetch all fields instead of throwing an exception. That was a ten-second implementation :-) Good idea. > Bummer ... that's what I was afraid of. Well, we want you to know > that SPOPS is a tremendous benefit to our project. With ESPOPS it's > doing most of what we need it to, and the rest has been relatively > easy to build on top. Thanks. This is nice to hear every once in a while :-) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Ray Z. <rz...@co...> - 2002-06-21 15:19:25
|
At 11:47 PM -0400 6/20/02, Chris Winters wrote: >How is 'field_update()' for a method name instead of 'update()'? I like it. The name 'update' is definitely too generic. I already ran into a class that already had an update() method doing something else. Another thing that I thought of is that we should probably allow refetch() to be called without any parameters, in which case it would re-fetch all fields instead of throwing an exception. The difference between ... $object->refetch; ... and ... $class = ref $object; $object = $class->fetch( $object-> id ); ... is that the former would not do pre/post-fetch actions and any other references to the object would still point to the (now updated) object. >PS - As for the other items: someday.... Daily paying nonperl work is >eating up lots of time. There are days when I miss perl... Bummer ... that's what I was afraid of. Well, we want you to know that SPOPS is a tremendous benefit to our project. With ESPOPS it's doing most of what we need it to, and the rest has been relatively easy to build on top. Thanks, -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Chris W. <ch...@cw...> - 2002-06-21 03:06:52
|
On Tue, 2002-06-18 at 08:38, Ray Zimmerman wrote: > I know it's been a while since we've discussed these ideas (around > 8/9/01 on ope...@li...), but I finally > decided to implement a refetch and an update method in SPOPS::DBI. I > know you weren't completely happy with the name 'update' ... feel > free to change it to something you like better. Excellent work! I think this should work fine. I applied the patch and then modified the code a bit -- mostly style this and that. There were a couple of little things (field mapping in 'update', putting a table into an arrayref, etc.), nothing to speak of. Now that I think of it, I should probably create a utility method to filter out private fields and translate mapped fields.... ok, there's a new method filter_fields() in SPOPS::DBI. We'll see how that works. How is 'field_update()' for a method name instead of 'update()'? > This currently does what I need it to do, but that doesn't mean it > won't break some area of SPOPS that I don't normally use (security, > field mapping, etc) It feels good to me. The fact that you're already using this is very reassuring :-) Chris PS - As for the other items: someday.... Daily paying nonperl work is eating up lots of time. There are days when I miss perl... -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Perrin H. <pe...@el...> - 2002-06-20 13:55:23
|
And...@Be... wrote: > monitoring our oi dbs I found, that loading and saving sessions does take > quite some time ( we stuff quite a bit of data in there .. ). You should probably try to move most of that out of the session. Putting a lot of data in a serialized session structure tends to be slower and less reliable than using normalized tables because you have to read/write the whole thing every time. One thing that can help is a write-through cache. You set things up so that it reads from a local cache instead of the db, and every time you write you go to the cache and the db. You have to be sure that people will always return to the same server though, for this to work. > So, thechnically you could improve response > time a bit, if you delay this step until after the page is already returned > to the client. Potentially dangerous if the save failed for some reason and the user didn't find out until later, but probably not a big deal. I'd say go for it. - Perrin |
From: Chris W. <ch...@cw...> - 2002-06-20 12:05:42
|
* Andreas Nolte (And...@Be...) [020620 06:23]: > monitoring our oi dbs I found, that loading and saving sessions does take > quite some time ( we stuff quite a bit of data in there .. ). In > OpenInteract.pm the step finish_cookies_and_session is executed, before the > page is returned to the browser. So, thechnically you could improve response > time a bit, if you delay this step until after the page is already returned > to the client. You could even register this sub to be carried out in the > cleanup phase of apache and not within the content handler like right now. That is an excellent idea. I'll try to implement this early next week and see what happens. Chris |
From: <And...@Be...> - 2002-06-20 10:11:47
|
Hey ! monitoring our oi dbs I found, that loading and saving sessions does = take quite some time ( we stuff quite a bit of data in there .. ). In OpenInteract.pm the step finish_cookies_and_session is executed, before = the page is returned to the browser. So, thechnically you could improve = response time a bit, if you delay this step until after the page is already = returned to the client. You could even register this sub to be carried out in = the cleanup phase of apache and not within the content handler like right = now. Still, I am not really sure, if this would bite you from behind, so I thought I`d ask all you wise guys ;-). later, Andreas Nolte - Leitung IT - ____________________________________ MSN Marketing Service Nordwest GmbH - Bertelsmann Services Group - Olympiastra=DFe 1 26419 Schortens Fon +49 (0) 44 21 / 76 -84002 Fax +49 (0) 44 21 / 76 - 84111 E-Mail:And...@be... Internet:www.bertelsmann-services.de |
From: Ray Z. <rz...@co...> - 2002-06-18 12:39:25
|
Chris, I know it's been a while since we've discussed these ideas (around 8/9/01 on ope...@li...), but I finally decided to implement a refetch and an update method in SPOPS::DBI. I know you weren't completely happy with the name 'update' ... feel free to change it to something you like better. This currently does what I need it to do, but that doesn't mean it won't break some area of SPOPS that I don't normally use (security, field mapping, etc). Now I'll just have to generalize it to make it work in ESPOPS. BTW, the patch is against SPOPS-0.61. Here are some examples of usage ... $new_val = $obj->refetch( 'field1' ); ($new_val1, $new_val2) = $obj->refetch( [ qw/ field1 field2 / ] ); $obj->{field1} = $new_value1; $obj->update( 'field1' ); $obj->{field1} = $new_value1; $obj->{field2} = $new_value2; $obj->update( [ qw/ field1 field2 / ] ); $obj->update( { field1 => $new_value1, field2 => $new_value2 } ); $obj->update( { field1 => $new_value1, field2 => $new_value2 }, { if_match => 1 } ); $obj->update( { field1 => $new_value1, field2 => $new_value2 }, { if_match => { field3 => $val3 } ); $obj->update( { field1 => $new_value1, field2 => $new_value2 }, { where => 'field3 > $val3' } ); Let me know what you think ... btw, any progress on any of my other pet SPOPS enhancements? :-) -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Chris W. <ch...@cw...> - 2002-06-05 14:50:54
|
* Ewa...@ap... (Ewa...@ap...) [020605 10:15]: > How can I extract the class from a variable (object) in a Template? > > The result of an Dump is ([% Dumper.dump(object) %]): > $VAR1 = bless( { 'url' => '/nats', 'security' => 'yes', 'startup_id' => '1' > }, 'oit::Startup' ); > > But how can I get the 'oit::Startup'?? Getting a class within the template is kind of odd -- what would you do with it? -- but you can pass a subroutine to the template to do this for you: return $R->template->handler( {}, { ref_me => sub { return ref $_[0] }, myobject => $object }, { name => 'mypkg::mytemplate' } ); And call it: My class is: [% ref_me( myobject ) %] Chris |
From: <me...@st...> - 2002-06-05 14:19:04
|
>>>>> "Ewald" == Ewald Hinrichs <Ewa...@ap...> writes: Ewald> Hello Chris, Ewald> How can I extract the class from a variable (object) in a Template? By writing a plugin. Do not try to make TT into a programming language. Use Perl for programming, and TT for creating a view. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <me...@st...> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! |
From: <Ewa...@ap...> - 2002-06-05 14:05:54
|
Hello Chris, How can I extract the class from a variable (object) in a Template? The result of an Dump is ([% Dumper.dump(object) %]): $VAR1 = bless( { 'url' => '/nats', 'security' => 'yes', 'startup_id' => '1' }, 'oit::Startup' ); But how can I get the 'oit::Startup'?? Bye Ewald Ewald Hinrichs Applied Software Technology GmbH A BERTELSMANN COMPANY E-Mail: Ewa...@ap... Tel.: 04421/9789-69 Fax: 04421/9789-64 |
From: Chris W. <ch...@cw...> - 2002-06-04 11:04:19
|
On Tue, 2002-06-04 at 03:34, Die...@Be... wrote: > Hi Chris, > > we try to show user or group specific startup pages after login. > Now, after login, the first page is the ../html/index.html. > Could you please tell us how to call user- or group-dependent startup-pages? You could do this one of two ways: 1) Make the normal startup page (/index.html) display certain information based on group membership using normal template directives: html/index.html: ---------------------------------------- [%- is_manager = 0; is_marketing = 0; ... -%] [% FOREACH group = OI.login_group %] [% SET is_manager = 1 IF group.id == 4; SET is_marketing = 1 IF group_id == 5; ... %] [% END %] [% IF is_manager %] Hi manager! Here is your information ... [% ELSIF is_marketing %] Hi marketer! Here is your information ... [% ELSE %] Hi common user! Here is your information ... [% END %] ---------------------------------------- Instead of embedding the information in the page, you could also have the content be templates and do something like: ---------------------------------------- [% IF is_manager %] [% INCLUDE startup_manager %] [% ELSIF is_marketing %] [% INCLUDE startup_marketing %] [% ELSE %] ... [% END %] ---------------------------------------- And create $WEBSITE_DIR/template/startup_manager and $WEBSITE_DIR/template/startup_marketing with the information you want. 2) Create a component to do this for you: In the startup page, just have: html/index.html: ---------------------------------------- [% OI.comp( 'lookup_starting_page' ) %] ---------------------------------------- And then create a component in one of your packages: conf/action.perl: ---------------------------------------- $action = { lookup_starting_page => { class => 'OpenInteract::StartingPage', method => 'handler', }, }; ---------------------------------------- mypkg/OpenInteract/StartingPage.pm: ---------------------------------------- package OpenInteract::StartingPage; sub handler { my ( $class ) = @_; my $R = OpenInteract::Request->instance; unless ( $R->{auth}{logged_in} ) { return 'Sorry, not logged in.'; } foreach my $group ( @{ $R->{auth}{group} } ) { return $class->get_page( 'marketing' ) if ( $group->id == 4 ); return $class->get_page( 'management' ) if ( $group->id == 5 ); } return $class->get_page( 'main' ); } sub get_page { my ( $class, $type ) = @_; # ... code to pull the page from the filesystem/database # based on the type ... } ---------------------------------------- In theory you could also implement a custom login handler to do this, but right now there is no support for short-circuiting the process in this manner to return content directly. I'll get something along these lines (redirects, at least) implemented for the next version since it's pretty useful. Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: <Die...@Be...> - 2002-06-04 07:35:12
|
Hi Chris, we try to show user or group specific startup pages after login. Now, after login, the first page is the ../html/index.html. Could you please tell us how to call user- or group-dependent startup-pages? Thanks a lot Dietmar |
From: Ray Z. <rz...@co...> - 2002-05-06 18:09:40
|
At 1:30 PM -0400 5/6/02, Chris Winters wrote: >On Mon, 2002-05-06 at 11:38, Ray Zimmerman wrote: > > BTW, any news on the inheritance and new has-a stuff? > >I've been working on the modified relationships lately in a different >format (Java) and am wondering if I should use the same procedure for >this. (It's different in style than your example but uses many of the >same concepts -- linking table being a full object, etc.) > >However, I haven't had much luck bringing up an email dialog about this >kind of stuff -- I suspect that's because my emails on design and such >items tend to be very long and scare people away :-) Hmmm ... sounds like someone else I know. >For these sorts of things, I was thinking about installing some form of >Wiki on the OI sourceforge site. We're gearing up to use one of these at >work for design, documentation, discussion, etc. The POE Wiki >(poe.perl.org) is an example of a perl-only project using this, and >there are many more general successful examples (C2 wiki) as well. > >What do you think? I've never used Wiki so I don't really have an opinion, I'm sure I could adapt to it ... but e-mail also works fine for me. -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Chris W. <ch...@cw...> - 2002-05-06 17:34:37
|
On Mon, 2002-05-06 at 11:38, Ray Zimmerman wrote: > Chris, > > I'm getting two failed tests in 30_dbi.t with 0.60 ... this is with > perl_5.005_03 and mysql-3.23.43. > > > t/30_dbi...............NOK 8# Failed test (t/30_dbi.t at line 97) > # got: 'spops_test.spops_id = '45'' > # expected: 'spops_test.spops_id = 45' > t/30_dbi...............NOK 9# Failed test (t/30_dbi.t at line 101) > # got: 'spops_id = '45'' > # expected: 'spops_id = 45' > t/30_dbi...............ok 28/28# Looks like you failed 2 tests of 28. > t/30_dbi...............dubious > Test returned status 2 (wstat 512, 0x200) > DIED. FAILED tests 8-9 > Failed 2/28 tests, 92.86% okay This is fixed in CVS -- at some point in the past it appears that DBD::mysql switched to using the two-argument form of $dbh->quote(). > BTW, any news on the inheritance and new has-a stuff? I've been working on the modified relationships lately in a different format (Java) and am wondering if I should use the same procedure for this. (It's different in style than your example but uses many of the same concepts -- linking table being a full object, etc.) However, I haven't had much luck bringing up an email dialog about this kind of stuff -- I suspect that's because my emails on design and such items tend to be very long and scare people away :-) For these sorts of things, I was thinking about installing some form of Wiki on the OI sourceforge site. We're gearing up to use one of these at work for design, documentation, discussion, etc. The POE Wiki (poe.perl.org) is an example of a perl-only project using this, and there are many more general successful examples (C2 wiki) as well. What do you think? Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Ray Z. <rz...@co...> - 2002-05-06 15:40:22
|
Chris, I'm getting two failed tests in 30_dbi.t with 0.60 ... this is with perl_5.005_03 and mysql-3.23.43. t/30_dbi...............NOK 8# Failed test (t/30_dbi.t at line 97) # got: 'spops_test.spops_id = '45'' # expected: 'spops_test.spops_id = 45' t/30_dbi...............NOK 9# Failed test (t/30_dbi.t at line 101) # got: 'spops_id = '45'' # expected: 'spops_id = 45' t/30_dbi...............ok 28/28# Looks like you failed 2 tests of 28. t/30_dbi...............dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 8-9 Failed 2/28 tests, 92.86% okay BTW, any news on the inheritance and new has-a stuff? -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Ray Z. <rz...@co...> - 2002-04-29 20:45:00
|
Here's the latest version of ESPOPS with a few minor changes. http://www.pserc.cornell.edu/ESPOPS/ESPOPS-0.42.tar.gz ESPOPS stands for Enhanced SPOPS. Where standard SPOPS (or more correctly, SPOPS::DBI) implements persistence for simple class of objects whose data is stored in a single table, ESPOPS implements persistence for a set of classes with inheritance relationships, where the attributes are distributed across several tables, one for each class in the inheritance hierarchy. Our hope is that this functionality (not necessarily this code) will eventually be included as part of the SPOPS distribution, along with the new has-a and links-to functionality proposed on the openinteract-dev list. From the Changes file ... - Modified ESPOPS::DBI's create_table() and drop_table() to do nothing if $CONF and $TABLE_DEF are not defined. This allows a class to inherit from an ESPOPS class without adding a table. The Vehicle class is now an example of this. - Turned off PrintError in DBI->connect in ESPOPS::DBI.pm - Added RaiseError and AutoCommit to DBI->connect in ESPOPS::DBI.pm - Modified global_datasource_handle() to make it try 10 times to connect before giving up. - Removed SQL_BIGINT from list in _is_numeric_type() so it won't break with DBI-1.21 - Added test for cloning with false value in t/08_clone.t -- Ray Zimmerman / e-mail: rz...@co... / 428-B Phillips Hall Sr Research / phone: (607) 255-9645 / Cornell University Associate / FAX: (815) 377-3932 / Ithaca, NY 14853 |
From: Chris W. <ch...@cw...> - 2002-04-27 19:30:39
|
Anyone on the list currently using or know much about InterBase or the open source version, FirebirdSQL? I created an SPOPS driver for this and it passes relevant tests, but before releasing it I had this crazy idea that someone who actually uses the database might be able to help :-) Give a holler (offlist if you like) if you know much about this. Thanks, Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Perrin H. <pe...@el...> - 2002-04-16 14:39:42
|
Chris Winters wrote: > So instead, why don't we have > a single place where we can modify or rewrite configuration information > before it gets set in the server? I like it. Right now I'm doing some work with ATG Dynamo, and the only thing I like about it is the way you can override configuration. It uses a configuration search path, like @INC, and when a value is requested from '/foo/bar/baz.properties' it will search the path for a file with that name and then grab the value from it. Files found earlier in the path have precedence. It's very useful for exactly the sort of thing you're talking about. Your system might actually be better, since the Dynamo one tends to result in lots of files scattered around the config path with a single "foo=7" line in them. Consolidating them into one sounds simpler. - Perrin |
From: Chris W. <ch...@cw...> - 2002-04-16 12:29:41
|
One of the problems with OpenInteract is that the configuration gets reset every time you upgrade a package. So if you've set your user objects to use SPOPS::DBI::Pg instead of the pre-configured SPOPS::DBI::MySQL, you need to run: $ oi_manage change_spops_driver --driver=SPOPS::DBI::Pg This is fragile and probably the source of some frustration. (Even I forget to do this, and I wrote the thing!) So instead, why don't we have a single place where we can modify or rewrite configuration information before it gets set in the server? I'd imagine this would live in: $WEBSITE_DIR/confglobal_override_spops.ini ('m trying to move to INI-style files for just about everything now since they're much easier to edit and understand.) Such a file might look something like: ---------- [Global] override_type = spops # Replace 'SPOPS::DBI::MySQL with 'SPOPS::DBI::Pg' in the # 'user.isa' list [user.isa] action = replace replace = SPOPS::DBI::MySQL value = SPOPS::DBI::Pg # Set the value of 'user.track.create' to 1 [user.track.create] action = replace value = 1 # Add a new value to 'user.track' [user.track.finalize] action = add value = 1 # Add two new entries to the ruleset for the 'news' object [news.rules_from] action = add value = OpenInteract::RSSArticleSummarize value = OpenInteract::EditorApproval # Remove 'SPOPS::Secure' from 'page.isa' list [page.isa] action = remove value = SPOPS::Secure # Remove key and value for 'uid' from 'user.field_map' hash [user.field_map] action = remove value = uid ---------- There are three actions you can take: 'replace', 'add' and 'remove'. The code should be smart enough to tell what you're acting on and perform the appropriate action -- for instance, a 'remove' performed on a list will remove that entry from the list, but a 'remove' performed on a hash will delete the hash key entirely. I also had an idea for something like: ---------- # Replace 'SPOPS::DBI::MySQL with 'SPOPS::DBI::Pg' in all keys that # have an 'isa' entry [*.isa] action = replace replace = SPOPS::DBI::MySQL value = SPOPS::DBI::Pg ---------- But I want to get the initial part done and working first. Does this sound reasonable? Do you have any feature or implementation ideas? Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |