Re: performance between servlet and restlet

2009-12-28 Thread kiwionly
ok thx !

regards,
kiwi

On Mon, Dec 28, 2009 at 8:00 PM, Jerome Louvel wrote:

> Hi Kiwi,
>
> See related RFE entered by Thierry:
>
> "Missing a way to configure the thread pool of the Netty and Grizzly
> connectors"
> http://restlet.tigris.org/issues/show_bug.cgi?id=991
>
> Best regards,
> Jerome Louvel
> --
> Restlet ~ Founder and Lead developer ~ http://www.restlet.org
> Noelios Technologies ~ Co-founder ~ http://www.noelios.com
>
>
> -Message d'origine-
> De : kiwionly [mailto:kiwio...@gmail.com]
> Envoyé : lundi 14 décembre 2009 08:09
> À : discuss@restlet.tigris.org
> Objet : performance between servlet and restlet
>
> hi,
>
> I try to port from servlet to restlet. the architecture is using spring +
> hibernate, with netty/Grizzly in front.
>
> the result is is servlet faster then restlet like 300%.
>
> since the servlet engine i using is tomcat which set thread to 200,
>
> for restlet, i not sure can I configure the server as well so i can test my
> web app with same thread pool size.
>
> any idea ?
>
> kiwi
> 
> happy hacking
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24301
> 79
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433324
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433359

Re: spring mvc like web binding for POJO

2009-12-22 Thread kiwionly
hi,

thx for your reply.

actually i wan to binding a lot of parameter.. maybe ~20.

if using getParameter(name) is error phone since too many parameter to get.

soi instaed maybe it would work like





then the class can get the object like

@post
public void handle(XObject x)
 x.getFirst(); // return "first parameter"


not sure how will done in restlet? coz i can't find any documentation.

kiwi

happy hacking !




On Tue, Dec 22, 2009 at 4:32 PM, Thierry Boileau <
thierry.boil...@noelios.com> wrote:

> Hi kiwi,
>
> at this time, the feature that seems similar to spring MVC web binding,
> is the usage of the converterHelper.
> For example, your ServerResource defines such method:
> @Post
> public void accept(Form form){
> [...]
> }
>
> The default converter delivered by the org.restlet.jar will convert the
> form sent by the Web browser (thanks to its media type), to a Form
> instance containing all parameters.
> If you want to handle conversions from representations to specific
> objects (in both directions, or only one), you can add your own converter.
>
> Could you tell us about your needs?
>
> Best regards,
> Thierry Boileau
> > hi,
> >
> > I wondering is restlet (will) support POJO binding like what in spring
> MVC web binding which convert all parameter value to java object.
> >
> > This could be useful if client is sending many parameter and server can
> convert it to object without many boilerplate code.
> >
> > kiwi
> > 
> > happy hacking !
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2431861
> >
> >
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432242
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2432246

spring mvc like web binding for POJO

2009-12-20 Thread kiwionly
hi,

I wondering is restlet (will) support POJO binding like what in spring MVC web 
binding which convert all parameter value to java object. 

This could be useful if client is sending many parameter and server can convert 
it to object without many boilerplate code.

kiwi

happy hacking !

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2431861


performance between servlet and restlet

2009-12-13 Thread kiwionly
hi,

I try to port from servlet to restlet. the architecture is using spring + 
hibernate, with netty/Grizzly in front.

the result is is servlet faster then restlet like 300%. 

since the servlet engine i using is tomcat which set thread to 200, 

for restlet, i not sure can I configure the server as well so i can test my web 
app with same thread pool size.

any idea ?

kiwi

happy hacking

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2430179


how to configure thread pool in connector ?

2009-12-13 Thread kiwionly
hi,

I had try to use various extension (grizzly, netty), but find out that I need 
to know how to configure connection pool for connector. (some thing like 
connector thread in tomcat or jetty)

and seem like i can;t find any documentation about this.

any idea ?

kiwi

happy hacking

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2430172


Re: Gzip on netty

2009-12-09 Thread kiwionly
ok.. thx ! work now !

On Wed, Dec 9, 2009 at 5:58 PM, Thierry Boileau  wrote:

> Hi kiwi,
>
> the gzip encoding of the entity is available via the "Encoder" filter.
> For example, when declaring your application:
>public Restlet createInboundRoot() {
>Router router = new Router(getContext());
>router.attachDefault(HelloWorldResource.class);
>[...]
>
>Filter filter = new Encoder(getContext());
>filter.setNext(router);
>return filter;
>}
>
> It will encode the provided entity according to the client's preferences.
>
> Best regards,
> Thierry Boileau
>
> > hi,
> >
> > I just setup a rest app that use Netty as front end.
> >
> > however, it seem like is not g-zip enabled by default.
> >
> > how can i configure it and test it out ?
> >
> > kiwi
> > 
> > happy hacking !
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427753
> >
> >
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2428801
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2428821

Gzip on netty

2009-12-07 Thread kiwionly
hi,

I just setup a rest app that use Netty as front end.

however, it seem like is not g-zip enabled by default.

how can i configure it and test it out ?

kiwi

happy hacking !

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427753


Re: restlet with open session in view for hibernate

2009-12-06 Thread kiwionly
wow, look good, never realize that (my experience to restlet still fresh) !

will going to give it a try !

thx a lot !

On Fri, Dec 4, 2009 at 11:04 PM, Rhett Sutphin wrote:

> Hi kiwi,
>
> On Dec 3, 2009, at 11:10 AM, kiwionly wrote:
>
> > hi,
> >
> > Infact my servlet is working correctly in servlet container
> >
> > for restlet, i not using spring MVC, and not running in servlet
> > container (so web.xml is not working anymore), instead I running
> > inside Netty. hence, that the problem arise, maybe i need to lookup
> > how to configure the server instead.
>
> Perhaps you could write a Restlet Filter which invokes the Spring OSIV
> interceptor.
>
> Rhett
>
> >
> > regards,
> > kiwi
> >
> > On Thu, Dec 3, 2009 at 11:46 PM, Dustin N. Jenkins <
> dustin.jenk...@nrc-cnrc.gc.ca
> > > wrote:
> > Hello,
> >
> > I currently use the Hibernate/Spring Open Session In View model too
> > with
> > FreeMarker and it works perfectly.  Can you post your web.xml?  Is it
> > setup properly?
> >
> > Dustin
> >
> >
> > kiwionly wrote:
> > > hi,
> > >
> > > I had create an web application that using restlet to replace
> > serlvet (for Resource that no need any session).
> > >
> > > my web app basically is using spring + hibernate + velocity
> > template (with restlet extension for velocity template)
> > >
> > > however, i had encounter LazyInitializeException, as my servlet
> > had an Inteceptor for hibernate session. But it don't have any OSIV
> > for reslet. hence the exception come. (spring close the session
> > before complete render the page).
> > >
> > > do restlet plan to support a use case for this ? or do anyone have
> > find a solution ?
> > >
> > > any idea ?
> > >
> > > regards,
> > > kiwionly
> > >
> > > --
> > >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
> > >
> >
> > --
> >
> >
> > Dustin N. Jenkins | Tel/Tél: 250.363.3101 |
> dustin.jenk...@nrc-cnrc.gc.ca
> >
> > facsimile/télécopieur: (250) 363-0045
> >
> > National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
> > V9E 2E7
> >
> > Conseil national de recherches Canada | 5071, ch. West Saanich,
> > Victoria
> > (C.-B) V9E 2E7
> >
> > Government of Canada | Gouvernement du Canada
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730
> >
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427065
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2427265

Re: restlet with open session in view for hibernate

2009-12-04 Thread kiwionly
hi,

Infact my servlet is working correctly in servlet container

for restlet, i not using spring MVC, and not running in servlet container
(so web.xml is not working anymore), instead I running inside Netty. hence,
that the problem arise, maybe i need to lookup how to configure the server
instead.

regards,
kiwi

On Thu, Dec 3, 2009 at 11:46 PM, Dustin N. Jenkins <
dustin.jenk...@nrc-cnrc.gc.ca> wrote:

> Hello,
>
> I currently use the Hibernate/Spring Open Session In View model too with
> FreeMarker and it works perfectly.  Can you post your web.xml?  Is it
> setup properly?
>
> Dustin
>
>
> kiwionly wrote:
> > hi,
> >
> > I had create an web application that using restlet to replace serlvet
> (for Resource that no need any session).
> >
> > my web app basically is using spring + hibernate + velocity template
> (with restlet extension for velocity template)
> >
> > however, i had encounter LazyInitializeException, as my servlet had an
> Inteceptor for hibernate session. But it don't have any OSIV for reslet.
> hence the exception come. (spring close the session before complete render
> the page).
> >
> > do restlet plan to support a use case for this ? or do anyone have find a
> solution ?
> >
> > any idea ?
> >
> > regards,
> > kiwionly
> >
> > --
> >
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617
> >
>
> --
>
>
> Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca
>
> facsimile/télécopieur: (250) 363-0045
>
> National Research Council Canada | 5071 West Saanich Rd, Victoria BC.
> V9E 2E7
>
> Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria
> (C.-B) V9E 2E7
>
> Government of Canada | Gouvernement du Canada
>
> --
>
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426730
>

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426767

restlet with open session in view for hibernate

2009-12-03 Thread kiwionly
hi, 

I had create an web application that using restlet to replace serlvet (for 
Resource that no need any session).

my web app basically is using spring + hibernate + velocity template (with 
restlet extension for velocity template)

however, i had encounter LazyInitializeException, as my servlet had an 
Inteceptor for hibernate session. But it don't have any OSIV for reslet. hence 
the exception come. (spring close the session before complete render the page).

do restlet plan to support a use case for this ? or do anyone have find a 
solution ?

any idea ?

regards,
kiwionly

--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2426617