Re: Axkit2 and Apache fop?
On 8 Feb 2007 at 10:39, Also Sprach Matt Sergeant: On 6-Feb-07, at 7:20 AM, [EMAIL PROTECTED] wrote: Ok, I have some lengthy processes coming up in the near future. Should I wait for the job server to be written or will I have to implement the above? Assuming the latter :) Yeah :-( If I were you I'd have some sort of job-server (mod_perl would be my recommendation) that you call to entirely separately. I presume this is short term until the easy to use and implement job server arrives? :) John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
On 6-Feb-07, at 7:20 AM, [EMAIL PROTECTED] wrote: Ok, I have some lengthy processes coming up in the near future. Should I wait for the job server to be written or will I have to implement the above? Assuming the latter :) Yeah :-( If I were you I'd have some sort of job-server (mod_perl would be my recommendation) that you call to entirely separately. What does return CONTINUE do? I've read up on continuations. I presume ax2 is storing the stack or somesuch and waiting for an interrupt from danga? How does it continue from where I did a return CONTINUE? Or do I have to somehow program that in? So you return YIELD from a hook and it suspends the plugin stack (not the execution stack as that would require core perl support for continuations). You then have to have some kind of event fired from the event loop - either a timeout or a socket event or something that calls $client-finish_continuation - that then picks up at the NEXT registered hook/plugin. So if you want that to be within your own plugin you need to register multiple hooks for the same phase. See plugins/aio for examples. Note: return CONTINUATION is used in the examples but that's about to be deprecated in favour of return YIELD which is more syntactically correct. Matt. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
On Sat, 27 Jan 2007 13:20:37 +0100 Jörg Walter [EMAIL PROTECTED] wrote: As far as I know there is no finished code yet. You'd have to write a plugin that calls fop somehow. Writing a simple plugin is easy, it should not take longer than an hour. Thanks, Can anyone suggest an existing plugin that might serve as a good model? Maybe one exists that does something similar? There is, however, a hidden gotcha: If you've followed the mailing list, it's the same problem as with DBI queries: blocking. fop probably runs for a while, so you can end up blocking the whole AxKit2 server during that time. Does AxKit1 have the same blocking issue with fop? So while a simple plugin would be enough for development purposes, when you go live you have to enhance that plugin to support asynchronous operation. That's not too hard, we're still talking about no more than 100 lines of code, but it's something to keep in mind. -- - Wayde Nie Software Analyst Computing and Information Services phone: (905)525-9140 ext 23856 McMaster University, CANADA fax: (905)524-5288 [EMAIL PROTECTED] --[\]---=\o.:---[\]- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
Hi, Another point: Alternatively you could do what MailChannels do - talk to a mod_perl server to do slow stuff. I find that's probably a rather complicated way to do things, but I guess it works for them. That's exactly what I do as well ;-) Regards, Lars -- Lars Skjærlund Consultant Ubiquitech A/S Lyngby Hovedgade 4,3 2800 Kgs. Lyngby Denmark Tel: +4570200084 Mobile: +4523457157 http://www.ubiquitech.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
On 27 Jan 2007 at 13:20, Also Sprach Jörg Walter: So while a simple plugin would be enough for development purposes, when you go live you have to enhance that plugin to support asynchronous operation. That's not too hard, we're still talking about no more than 100 lines of code, but it's something to keep in mind. Would I be correct in thinking that the way to do asynch, given a job that blocks for N seconds, would be to fork/exec and use danga to listen on an agreed socket? John - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
[EMAIL PROTECTED] wrote: On 27 Jan 2007 at 13:20, Also Sprach Jörg Walter: So while a simple plugin would be enough for development purposes, when you go live you have to enhance that plugin to support asynchronous operation. That's not too hard, we're still talking about no more than 100 lines of code, but it's something to keep in mind. Would I be correct in thinking that the way to do asynch, given a job that blocks for N seconds, would be to fork/exec and use danga to listen on an agreed socket? Yes. Though you have to be careful to close the listening socket in the forked child otherwise it might try and process connections (i.e. port 80 connections). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
Matt Sergeant wrote: Yes. Though you have to be careful to close the listening socket in the forked child otherwise it might try and process connections (i.e. port 80 connections). Another point: Alternatively you could do what MailChannels do - talk to a mod_perl server to do slow stuff. I find that's probably a rather complicated way to do things, but I guess it works for them. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Axkit2 and Apache fop?
On Friday, 26. January 2007 22:50, Wayde Nie wrote: I didn't see anything in the archives, but can Axkit2 be used to process xml into pdf using Apache fop like Axkit1 was able to do? If so, can anyone provide a couple of pointers? I've currently got Axkit2 and fop (and their prerequisites) installed. As far as I know there is no finished code yet. You'd have to write a plugin that calls fop somehow. Writing a simple plugin is easy, it should not take longer than an hour. There is, however, a hidden gotcha: If you've followed the mailing list, it's the same problem as with DBI queries: blocking. fop probably runs for a while, so you can end up blocking the whole AxKit2 server during that time. So while a simple plugin would be enough for development purposes, when you go live you have to enhance that plugin to support asynchronous operation. That's not too hard, we're still talking about no more than 100 lines of code, but it's something to keep in mind. -- CU Joerg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]