RE: Forwarding all requests
Hi Jim, In 2.0, we do have a copy constructor for Request that you could leverage. But it doesn't clone everything deep down. This isn't available in 1.1, so I guess you would need to write this logic. For example, you need to find a way to clone your request entities which might be transient... The Redirector has a mode to relay call to a remote server, but it does so by updating the initial request object received. Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mercredi 3 novembre 2010 13:44 À : discuss@restlet.tigris.org Objet : Re: Forwarding all requests Jerome, What i would like to do is basically clone the original HTTP request (headers, body etc) that comes into my root restlet and then send that to another instance of the same application running on another remote host. Unfortunately, since Request is not Serializable it isn't obvious how i would clone it. Any ideas? (p.s.using v1.1.7 of the framework for this particular project.) cheers On 03/11/2010, at 7:26 PM, Jerome Louvel wrote: > Hi Jim, > > The Redirector isn't a filter, so it isn't directly suitable. I guess you > need to write a special Filter and handle some sort of > synchronization/rendez-vous between the two parallel calls you want to make. > I would need more details on your use case to give more precise advices. > > Best regards, > Jerome > -- > Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios > Technologies ~ http://www.noelios.com > > > > > -Message d'origine- > De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mercredi 3 > novembre 2010 04:06 À : discuss@restlet.tigris.org Objet : Re: > Forwarding all requests > > Jerome, > > Had a look at the javadoc but couldn't really see how it would work in my > scenario. In my case i want to enable a sort of reflector for my service so > that the same request is processed by the existing webapp and also by the > same ap running on another machine (i.e.e active redundancy mode). Is the > Redirector suitable for this use case? > > cheers > > > > > On 03/11/2010, at 7:37 AM, Jerome Louvel wrote: > >> Hi Jim, >> >> Did you have a look at the org.restlet.routing.Redirector class? It should >> offer what you are looking for. >> >> Best regards, >> Jerome >> -- >> Restlet ~ Founder and Technical Lead ~ http://www.restlet.org >> Noelios Technologies ~ http://www.noelios.com >> >> >> >> >> -Message d'origine- >> De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mardi 2 >> novembre 2010 20:59 À : discuss@restlet.tigris.org Objet : Forwarding >> all requests >> >> Just wondering whether there is a Guard or Filter that comes with the >> restlet framework that will allow me to forward the original request to >> another server after it has been processed by the application. >> >> cheers >> >> >> -- >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageI >> d >> =2678138 >> >> -- >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageI >> d >> =2678151 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId > =2678219 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId > =2678306 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678390 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678699
Re: Forwarding all requests
Jerome, What i would like to do is basically clone the original HTTP request (headers, body etc) that comes into my root restlet and then send that to another instance of the same application running on another remote host. Unfortunately, since Request is not Serializable it isn't obvious how i would clone it. Any ideas? (p.s.using v1.1.7 of the framework for this particular project.) cheers On 03/11/2010, at 7:26 PM, Jerome Louvel wrote: > Hi Jim, > > The Redirector isn't a filter, so it isn't directly suitable. I guess you > need to write a special Filter and handle some sort of > synchronization/rendez-vous between the two parallel calls you want to make. > I would need more details on your use case to give more precise advices. > > Best regards, > Jerome > -- > Restlet ~ Founder and Technical Lead ~ http://www.restlet.org > Noelios Technologies ~ http://www.noelios.com > > > > > -Message d'origine- > De : Jim Alateras [mailto:j...@comware.com.au] > Envoyé : mercredi 3 novembre 2010 04:06 > À : discuss@restlet.tigris.org > Objet : Re: Forwarding all requests > > Jerome, > > Had a look at the javadoc but couldn't really see how it would work in my > scenario. In my case i want to enable a sort of reflector for my service so > that the same request is processed by the existing webapp and also by the > same ap running on another machine (i.e.e active redundancy mode). Is the > Redirector suitable for this use case? > > cheers > > > > > On 03/11/2010, at 7:37 AM, Jerome Louvel wrote: > >> Hi Jim, >> >> Did you have a look at the org.restlet.routing.Redirector class? It should >> offer what you are looking for. >> >> Best regards, >> Jerome >> -- >> Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios >> Technologies ~ http://www.noelios.com >> >> >> >> >> -Message d'origine- >> De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mardi 2 >> novembre 2010 20:59 À : discuss@restlet.tigris.org Objet : Forwarding >> all requests >> >> Just wondering whether there is a Guard or Filter that comes with the >> restlet framework that will allow me to forward the original request to >> another server after it has been processed by the application. >> >> cheers >> >> >> -- >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId >> =2678138 >> >> -- >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId >> =2678151 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678219 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678306 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678390
RE: Forwarding all requests
Hi Jim, The Redirector isn't a filter, so it isn't directly suitable. I guess you need to write a special Filter and handle some sort of synchronization/rendez-vous between the two parallel calls you want to make. I would need more details on your use case to give more precise advices. Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mercredi 3 novembre 2010 04:06 À : discuss@restlet.tigris.org Objet : Re: Forwarding all requests Jerome, Had a look at the javadoc but couldn't really see how it would work in my scenario. In my case i want to enable a sort of reflector for my service so that the same request is processed by the existing webapp and also by the same ap running on another machine (i.e.e active redundancy mode). Is the Redirector suitable for this use case? cheers On 03/11/2010, at 7:37 AM, Jerome Louvel wrote: > Hi Jim, > > Did you have a look at the org.restlet.routing.Redirector class? It should > offer what you are looking for. > > Best regards, > Jerome > -- > Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios > Technologies ~ http://www.noelios.com > > > > > -Message d'origine- > De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mardi 2 > novembre 2010 20:59 À : discuss@restlet.tigris.org Objet : Forwarding > all requests > > Just wondering whether there is a Guard or Filter that comes with the restlet > framework that will allow me to forward the original request to another > server after it has been processed by the application. > > cheers > > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId > =2678138 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId > =2678151 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678219 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678306
Re: Forwarding all requests
Jerome, Had a look at the javadoc but couldn't really see how it would work in my scenario. In my case i want to enable a sort of reflector for my service so that the same request is processed by the existing webapp and also by the same ap running on another machine (i.e.e active redundancy mode). Is the Redirector suitable for this use case? cheers On 03/11/2010, at 7:37 AM, Jerome Louvel wrote: > Hi Jim, > > Did you have a look at the org.restlet.routing.Redirector class? It should > offer what you are looking for. > > Best regards, > Jerome > -- > Restlet ~ Founder and Technical Lead ~ http://www.restlet.org > Noelios Technologies ~ http://www.noelios.com > > > > > -Message d'origine- > De : Jim Alateras [mailto:j...@comware.com.au] > Envoyé : mardi 2 novembre 2010 20:59 > À : discuss@restlet.tigris.org > Objet : Forwarding all requests > > Just wondering whether there is a Guard or Filter that comes with the restlet > framework that will allow me to forward the original request to another > server after it has been processed by the application. > > cheers > > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678138 > > -- > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678151 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678219
RE: Forwarding all requests
Hi Jim, Did you have a look at the org.restlet.routing.Redirector class? It should offer what you are looking for. Best regards, Jerome -- Restlet ~ Founder and Technical Lead ~ http://www.restlet.org Noelios Technologies ~ http://www.noelios.com -Message d'origine- De : Jim Alateras [mailto:j...@comware.com.au] Envoyé : mardi 2 novembre 2010 20:59 À : discuss@restlet.tigris.org Objet : Forwarding all requests Just wondering whether there is a Guard or Filter that comes with the restlet framework that will allow me to forward the original request to another server after it has been processed by the application. cheers -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678138 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2678151