RE: [fw-general] Caching of MVC and other ZF components

2008-02-20 Thread Nogyara

Thanks for explanation, Kevin, this was first time I tried to use caching, so
I was little confused.
After your explanation, and little playing with APC, I understand now. 
For anybody else who can find it useful, as Kevin mentioned, caching in ZF
is all about the output caching (caching of output from function, class
methods, DB queries, ...). 
The type of caching APC does (opcode caching) works AUTOMATICALLY, so you
don't have to care about it at all. All you need to do is to install APC and
tune a handful of directives if you like (not neccessary). APC takes care of
the rest. Great product, really. With APC caching enabled, the initial delay
after every request (when all needed ZF classes are loaded from harddisk)
practically disappeared!!


Kevin Schroeder-2 wrote:
> 
> You're thinking of 2 different kinds of caching.  When thinking of the
> type
> of caching that Zend_Cache does, think *output*.  Output from a given
> function, page, class or block of code.  The APC opcode cache is
> completely
> separate.  However, APC does have a variable cache, which is what
> Zend_Cache
> is using to store that output when using the APC backend.  If you are
> running APC, it will automatically cache the opcodes for any files you
> use,
> but that is completely separate from Zend Framework.
>  
> Kevin Schroeder
> Technical Consultant
> Zend Technologies, Ltd.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Caching-of-MVC-and-other-ZF-components-tp15576554s16154p15597948.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Caching of MVC and other ZF components

2008-02-19 Thread Nogyara

Hi all ZFers,
just used ZF for my 1st project and the work with it is really great. Now
it's near to be finished but before it can be runned, caching support must
be enabled to avoid performance issues for end users.
I've just read manual for Zend_Cache from top to down, I know now, that the
best backend to be used is APC for its great performance when storing
interpreted PHP code in shared memory but I don't know how to use it.
I'd like to cache opcodes of all ZF classes used in project forever
(lifetime set to null) but not sure how to make it. Using
Zend_Cache_Frontend_File to cache all relevant ZF files does not help since
it stores just content, not the interpreted PHP code, right?
Using of Zend_Cache_Frontend_Class needs concrete object to pass to work
correctly, otherwise it is useful only for the static calls when class name
passed, Zend_Cache_Frontend_Function is not good for OOP and
Zend_Cache_Frontend_Output and Zend_Cache_Frontend_Page are another story,
not intended for this.
So how can one cache opcodes of all used classes (of ZF at least) in shared
memory?
I believe that the answer is pretty simple, every ZF project uses caching,
but neither googling or searching this mailing list archive gave me answer
for this.

Few lines of code would be warmly welcome :), if you can share some.

Thanks in advance
-- 
View this message in context: 
http://www.nabble.com/Caching-of-MVC-and-other-ZF-components-tp15576554s16154p15576554.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend Framework performance for real application?

2008-01-26 Thread Nogyara

Impressive numbrers, even 125 req/sec is much more than I hoped, because ZF
loads and uses quite a lot of files for any request.. APC must be really
powerful

Thanks for all your experiences sharing

Best regards


Daniel Freudenberger wrote:
> 
> But you're not using the mvc part of zend framework, are you? I'm
> wondering
> how you would archive more than 125 requests / second on each node while
> using the mvc part.
> 
> Best regards,
> Daniel
> 
> -Original Message-
> From: Hervé Piedvache [mailto:[EMAIL PROTECTED] 
> Sent: Saturday, January 26, 2008 6:02 PM
> To: fw-general@lists.zend.com
> Cc: Nogyara
> Subject: Re: [fw-general] Zend Framework performance for real application?
> 
> Yep mananing 2 big services all in ZF one with 6 web servers and the other 
> with 2 web servers and I have most of the time 1000 requests per seconds
> with 
> APC and memcache ;o)
> 
> Le samedi 26 janvier 2008, Nogyara a écrit :
>> Perfect, thanks for your tips, I'll use APC as Zend_Cache backend then.
>>
>> And about the second part of the question, do you think that ZF can
>> handle
>> with APC's support let's say 10-15 request per second? Has anyone some
>> experince about this which (s)he would like to share?
>>
>> Fabien MARTY wrote:
>> >> And one more question, I didn't study Zend_Cache yet, but which
>> backend
>> >> do
>> >> you think is the best for maximum performance?
>> >
>> > APC backend is the best (datas are stored in shared memory)
>> >
>> > memcached backend is also a good choice if you have several webservers
>> > (the cache can shared)
>> >
>> > Regards
>> >
>> >
>> > --
>> > Fabien MARTY
>> > [EMAIL PROTECTED]
> 
> 
> 
> -- 
> Hervé Piedvache
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-performance-for-real-application--tp15108296s16154p15112169.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Framework performance for real application?

2008-01-26 Thread Nogyara

Perfect, thanks for your tips, I'll use APC as Zend_Cache backend then.

And about the second part of the question, do you think that ZF can handle
with APC's support let's say 10-15 request per second? Has anyone some
experince about this which (s)he would like to share?


Fabien MARTY wrote:
> 
>> And one more question, I didn't study Zend_Cache yet, but which backend
>> do
>> you think is the best for maximum performance?
> 
> APC backend is the best (datas are stored in shared memory)
> 
> memcached backend is also a good choice if you have several webservers
> (the cache can shared)
> 
> Regards
> 
> 
> -- 
> Fabien MARTY
> [EMAIL PROTECTED]
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-performance-for-real-application--tp15108296s16154p15109675.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Framework performance for real application?

2008-01-26 Thread Nogyara

Hi all ZF guys,
for my current project, I decided to use ZF (btw. wonderful work, guys!).
It's rewrite of current app with some new features. Administration part is
not far from being complete right now, so I started thinking about front-end
part.
I don't have current stats, however, about half year back (July 2007) the
web had 21945 hits per hour (peak value, what gives about 6 requests per
seconds on avg, so max no of requests per seconds might be even higher).
What do you think, can ZF handle gracefully such load (suppose use of
Zend_Cache)? Or should I rather use just some of its components and skip the
MVC part for better performance?
And one more question, I didn't study Zend_Cache yet, but which backend do
you think is the best for maximum performance?

Any experiences you can share or other tips for increasing performance (or
from the other side, any thing that one should avoid to not to decrease ZF
app's performance) are very welcome, might be handy for all users I guess.

Thanks for your replies
-- 
View this message in context: 
http://www.nabble.com/Zend-Framework-performance-for-real-application--tp15108296s16154p15108296.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Re[fw-general] move trailing parameters when using Redirector Helper?

2007-12-14 Thread Nogyara

Hi guys,
having this route definition:

$oRoute = new Zend_Controller_Router_Route
(
  'features/:controller/:action/*',
  array('action' => 'list')
);
$oRouter->addRoute('features', $oRoute);

I tried couple of things, however, I can't get rid of the 'paramaters part'
of the URL after redirection, so result after redirection looks like
features/types/list/id/X/.
After successful validation of a form in one of controllers
(features/types/edit/id/X), I'd like to be redirected ideally back to
features/types/ (or to features/types/list/ - list is default action - when
the previous is impossible).
Any ideas how to get rid of these parameters, pls? And Is there a way how
skip setting the initial action (list) when redirecting? OR is something
wrong with the route? Sorry if it's a newbie question, I'm quite new to ZF.
Thanks for help
-- 
View this message in context: 
http://www.nabble.com/Remove-trailing-parameters-when-using-Redirector-Helper--tp14339813s16154p14339813.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Passing parameters to view helper's constructor?

2007-11-26 Thread Nogyara

Hi guys,
just a quick question, how can someone set parameters for view helper's
constructor?

It seems, it is possible, according to this post
(http://www.nabble.com/Set-View-Helper-Options-%28formTextarea%29-tf4475302s16154.html#a12760567)
but I can't figure out how, when view helper's main method is called
directly from view script, without any constructing of helper itself.
Any clues, pls?
-- 
View this message in context: 
http://www.nabble.com/Passing-parameters-to-view-helper%27s-constructor--tf4877999s16154.html#a13959040
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Strange Zend_View->render() ?

2007-11-26 Thread Nogyara

Thanks, this is nice idea, I'll do it in Your way. 
However, it still may be useful somewhen to use the render() method, then,
what is the problem about it?


Harro wrote:
> 
> A much nicer way to do this is to create a seperate controller for logging
> in and out and then use the _forward method.
> 

-- 
View this message in context: 
http://www.nabble.com/Strange-Zend_View-%3Erender%28%29---tf4872248s16154.html#a13946673
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Strange Zend_View->render() ?

2007-11-25 Thread Nogyara

Hi all,
maybe it's a newbie question, but I still can't find out why this happens..
I managed to create simple IndexController and ErrorController, but I can't
make ZF to render another script than index.phtml from indexAction of
IndexController.
What I need is to show a login form in case that user is not logged in.
Here's the code:


 */
class IndexController extends Zend_Controller_Action
{
/**
 * Initialization - invoked in constructor.
 */
public function init ()
{
//$this->view->addHelperPath('../application/views/helpers',
'Venturia_View_Helper');
$this->view->wwwroot = $this->_request->getBaseUrl();
}


/**
 * The default action - show the home page.
 */
public function indexAction ()
{
echo 'Index action called.';
$oUserSession = new Zend_Session_Namespace('user');
$oUserSession->id = 1;
unset($oUserSession->id);
//print_r($_SESSION);
//echo $this->_request->getHeader('accept-language');
$this->view->iUserId = $oUserSession->id;
$this->view->sBaseUrl = $this->_request->getBaseUrl(); //.
$this->_request->getPathInfo();

//user is not logged in => show login page
//if (!isset($oUserSession->id))
//{
//echo 'Script Path:' . 
$this->view->getScriptPath('login.phtml');
$this->view->render('login.phtml', null, false);
//echo 'Login';
//}
}
}
?>

The render() method does not seem to be working as claimed in manual.
a) script filename must be set with extension too
b) AFAIK, login.phtml should be looked for in
somepath/views/scripts/index/login.phtml, but it is looked for directly in
somepath/views/scripts/ directory (controller's name not used, no matter how
the 3rd parameter of render() method is set)
c) and the worst, even when set unconditianally as seen in code above, it
still renders somepath/views/scripts/index/index.phtml script instead of
login.phtml

Can anyone explain me please why this happen and even better how to make it
work?
Thank a lot
-- 
View this message in context: 
http://www.nabble.com/Strange-Zend_View-%3Erender%28%29---tf4872248s16154.html#a13941930
Sent from the Zend Framework mailing list archive at Nabble.com.