[Catalyst] More Application or More Controllers
Hi, Can any body help me on finding out a best way: I am planning to build an application on catalyst. I have 3 different module 1. Admin Utility. 2. Search Utility. 3. Index List Utility. All modules have lots of jobs to perform. My question is to create a separate catalyst app for each and put them under a directory or in single app with different controllers to perform the job. I am much concern about performance and scalability, Thanks Amit Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Catalys App Structure
Hi All, I am planning to start development with Catalyst and planning to deploy the app on mod_perl, cgi and fastcgi. I have following concern: 1. I am planning to put 4 catalyst app under a directory and some app will run on mod_perl and one on cgi and other one on Fastcgi. Will it be a approach? 2. All apps with share the same DB. How can we achieve it? 3. How to include the templates, if templates are outside from the catalyst apps(Under main dir)? Here is the Directory structure what I am planning for: ->MainAppDir ->App1 ->App2 ->App3 ->App4 ->lib ->conf ->root ->templates ->src ->static ->js ->css ->images Hope I can be able explain my concern well. Looking forward for yor reply. Thanks Amit Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Direct Web Remoting(DWR) in catalyst
Hi, Is there any plug-in for catalyst which supports what DWR does for JAVA. Amit Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Authentication Using Catalyst::Authentication::Store::LDAP
Can anyone help me? Genius at work --- On Mon, 15/2/10, Amit Jha wrote: From: Amit Jha Subject: [Catalyst] Authentication Using Catalyst::Authentication::Store::LDAP To: Catalyst@lists.scsys.co.uk Date: Monday, 15 February, 2010, 1:41 PM Hi All, In my authentication module I am trying to add DBIC and LDAP authentication via Catalyst::Authentication::Store::LDAP. DBIC is working fine but LDAP is not. Following is app configuration file: __PACKAGE__->config( 'Plugin::ConfigLoader' => { driver => { 'General' => { -LowerCaseNames => 1, }, }, file => __PACKAGE__->path_to('conf'), }, 'Plugin::Session' => { expires => 3600, storage => '/home/amit/GISTFIND/tmp/session', }, 'Plugin::Authentication' => { default_realm => 'general', general => { credential => { class => 'Password', password_field => 'login_password', password_type => 'clear' }, store => { class => 'DBIx::Class', user_model => 'DB::Login', role_column => 'roles', } }, ldap => { credential => { class => 'Password', password_field => 'password', password_type => 'clear' }, store => { binddn => "cn=Manager, dc=example, dc=com", bindpw => "secret", class => "LDAP", ldap_server => "192.168.100.50", ldap_server_options => { timeout => 30, port => '389', }, user_basedn => "dc=example,dc=com", user_field => "uid", user_results_filter => sub { return shift->pop_entry }, }, }, }, ); When I search LDAP using Net::LDAP It authenticate the user and return the DN for that. dn:uid=shanu,dc=example,dc=com uid: shanu userPassword: shanu objectClass: account simpleSecurityObject top uid=shanu,dc=example,dc=com checks out! But when I try the same from catalyst I won't show any thing. Can anyone point me what to do and how to debug it. if ($c->authenticate({ id => $username, password => $password }, 'ldap')) { $c->stash->{auth}-> "asa"; } Thanks Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!. -Inline Attachment Follows- ___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/ Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Context Object ($c)
Hi, I have the following 2 class structure. I am unable to access the $c in get_name subroutine called from subroutine site_name of Myapp::Controller::Sites::Configuration. Can anyone help, how can I access the $c if I am call a subroutine directly not by dispatching the call !ackage Myapp::Controller::Sites; use Moose; use namespace::autoclean; BEGIN { BEGIN {extends 'Catalyst::Controller'; } } has 'id' => ( is => 'rw', isa => 'Int' ); sub get_name { my ($self, $c) = @_; my $rs = $c->model(DB::Sites)->find($self->id); return $rs->name; } package Myapp::Controller::Sites::Configuration; use Moose; use namespace::autoclean; BEGIN { extends 'GISTFIND::Controller::Site'; } sub site_name : Local { my($self, $c) = @_; my $obj = Site->new({id => 3}); $name = $obj->get_name; } Genius at work Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Authentication Using Catalyst::Authentication::Store::LDAP
Hi All, In my authentication module I am trying to add DBIC and LDAP authentication via Catalyst::Authentication::Store::LDAP. DBIC is working fine but LDAP is not. Following is app configuration file: __PACKAGE__->config( 'Plugin::ConfigLoader' => { driver => { 'General' => { -LowerCaseNames => 1, }, }, file => __PACKAGE__->path_to('conf'), }, 'Plugin::Session' => { expires => 3600, storage => '/home/amit/GISTFIND/tmp/session', }, 'Plugin::Authentication' => { default_realm => 'general', general => { credential => { class => 'Password', password_field => 'login_password', password_type => 'clear' }, store => { class => 'DBIx::Class', user_model => 'DB::Login', role_column => 'roles', } }, ldap => { credential => { class => 'Password', password_field => 'password', password_type => 'clear' }, store => { binddn => "cn=Manager, dc=example, dc=com", bindpw => "secret", class => "LDAP", ldap_server => "192.168.100.50", ldap_server_options => { timeout => 30, port => '389', }, user_basedn => "dc=example,dc=com", user_field => "uid", user_results_filter => sub { return shift->pop_entry }, }, }, }, ); When I search LDAP using Net::LDAP It authenticate the user and return the DN for that. dn:uid=shanu,dc=example,dc=com uid: shanu userPassword: shanu objectClass: account simpleSecurityObject top uid=shanu,dc=example,dc=com checks out! But when I try the same from catalyst I won't show any thing. Can anyone point me what to do and how to debug it. if ($c->authenticate({ id => $username, password => $password }, 'ldap')) { $c->stash->{auth}-> "asa"; } Thanks The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Let me tell you that I am going to deploy 3-tire architecture and inbuilt application load balancer for my production environment. And In future I may have h/w load balancer as well. So Its clear thal I am looking at very fast and stable environment to deliver my content. So Please help me to identify the best better option. Amit --- On Sat, 30/1/10, Adam Mackler wrote: From: Adam Mackler Subject: Re: [Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application To: shanu_...@yahoo.co.in, "The elegant MVC web framework" Date: Saturday, 30 January, 2010, 6:02 AM Well, I'm sure no expert, but that doesn't stop me from having opinions. The reasons I stopped using mod_perl are: safer when perl encounters errors, easier for learning, easier for development, better error messages when restarting production applications, and the ability to have each application run as a different system user. Perhaps the most compelling reason that I stopped using mod_perl is because with both perl and the web server combined in one executable, a problem with perl can cause not only the whole website to go down, but also all the other websites handled by that same webserver to go down as well. Second, setting up staging servers so you can develop without touching your production site is easier using fastcgi. Even having one staging server with mod_perl is difficult. Will you run two whole apaches simultaneously? What if you want to have more than one staging server? Adding more staging servers gets ridiculous fast. (BTW, I know the Catalyst Book says that you're supposed to use the myapp_server.pl for development, but I want to have SSL turned on all the time.) With fastcgi, I literally had dozens of different applications running at once, and they can all crash and burn and the webserver keeps running. In fact, that's how I learned to use Catalyst. For every tutorial I found, I made its own fastcgi process, and then I set up the web server to know about each one. http://myhost.com/alpha was the authorization tutorial, /beta was the CRUD totorial, etc. I could look at and play with any or all of them running at once; it made learning from examples much easier. In addition to making it easier to learn and to development, in the production environment fastcgi has significant advantages as relates to error messages, restarting, and security: I can have two levels of error messages: one is the replacement for the "Internal Server Error" that results from a problem with perl running--the same error you arleady have, for example if your database server crashes, generated by the perl application. But with fastcgi I have another, separate error page that is a nice-looking static page served by the web server when the fasccgi server is not there. So during the time when I am restarting my fastcgi application, visitors see that nice static page rather than getting a browser error message, which is what happens when you restart a server with mod_perl. And as your application(s) grow in size (and number), restarting them takes longer and longer, so that feature becomes more important. Finally, a wonderful benefit of using fastcgi is that each one of my fastcgi applications runs as a separate user, and none of those fastcgi users is the user that the web server runs as. I sleep that much better at night knowing that the web server cannot read the files that have database passwords in them, and so on. Anyway, that's my conclusion after doing things both ways. My current setup is similar to yours: FreeBSD, lighttpd, Catalyst, and PostgreSQL. Adam PS, I'm curious why you're using mysql. Is there a way in which its better than Postgres? On Fri, Jan 29, 2010 at 04:35:10PM +0530, Amit Jha wrote: > Does anyone have any advice on what will the best option mod_perl or > FastCGI or something else. if I have the following > development/production environment for my web application which is a > search engine. > 1. Linux(RHEL5) > 2. Apache 2.2.x > 3. Perl 5.10 > 4. mod_perl 2.0.x > 5. mysql 5.1.x > 6. Catalyst 5.8.x > ___ > List: Catalyst@lists.scsys.co.uk > Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst > Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ > Dev site: http://dev.catalyst.perl.org/ Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://downloads.yahoo.com/in/internetexplorer/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Using Catalyst with mod_per or FastCGI on heavy traffic web application
Does anyone have any advice on what will the best option mod_perl or FastCGI or something else. if I have the following development/production environment for my web application which is a search engine. 1. Linux(RHEL5) 2. Apache 2.2.x 3. Perl 5.10 4. mod_perl 2.0.x 5. mysql 5.1.x 6. Catalyst 5.8.x Genius at work The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. http://in.yahoo.com/___ List: Catalyst@lists.scsys.co.uk Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/ Dev site: http://dev.catalyst.perl.org/