You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Lars Steiger <st...@access.ch> on 2002/02/12 21:54:36 UTC

schedule/batch feature inside cocoon

hi everybody

first, i really like the cocoon framework. but unfortunally i am missing
something, that's (i know) not so usual for servlet based applications. i've
just implemented some kind of html parsing logic inside cocoon, which now
looks very nice (thanx to cocoon). but i can't start the whole parsing
process as a scheduled task, without using a tool outside cocoon.

but before i start hacking something together for myself, i thought that
maybe it would be a cool feature for cocoon. so i am asking you about your
opinion for such a feature inside cocoon.

cool would be, if it would also be configurable inside the sitemap, like a
matcher. but instead of for example an url it would match a time/interval.
but i know, the whole thing is very request driven.

maybe it would also be nice, if a pipeline could be treated like a batch
job. request comes in, independed thread will get started and the response
comes imediately. but this is (IMHO) another thing.

at the moment i'm finding my path through the jungle, so don't expect too
much. maybe there are some inputs/warnings out there.

greetings,
lars steiger


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: AW: schedule/batch feature inside cocoon

Posted by Lars Steiger <la...@buzzard.ch>.
> On Wednesday 13 February 2002 08:23, Lars Steiger wrote:
> >. . .
> > simple xml. the parser is a generator. i call it
> > SimpleTextParserGenerator. it needs an xml configuration für parsing
> > a text stream. the xml configuration defines which text fragment goes
> > under which xml node.
> >. . .
> Changing topics, but are you parsing "structured text" a la PHPwiki or
> something? I've been thinking for a while (but didn't find time to do
> it yet) that this would be a nice addition to Cocoon, being able to use
> structured text as input.

it is a really simple textparser. the configuration looks for example like
this:
<map>
  <data name="offer/residence">
    <begin>&lt;td bgcolor="#0099cc"</begin>
    <end>&lt;/b</end>
  </data>
  <iterate name="offer/params">
    <begin>&lt;form</begin>
    <end>&lt;script&gt;</end>
    <divider>&lt;input type="hidden"</divider>
    <data name="value">
      <begin>value="</begin>
      <end>"</end>
    </data>
    <data name="name">
      <begin>name="</begin>
      <end>"</end>
    </data>
  </iterate>
</map>

as you see, for now i am using it as dirty html parser. and it works so far
for me.
the tags <begin> and <end> defines the border for the string which goes then
to the xml. the name attribute on the <data/> element defines the element
name inside the resulting xml. the parser starts searching the next <begin/>
content after the position the last <end/> content was found inside the
parsing document (in my case html). <iterate/> is useful for tables, where a
string defines the <divider/> between the iterations.

> >. . .
> > yes, first i also thought about an external scheduling component. but
> > such a process should not be accessible from outside.
> >. . .
> ok I see your point now.
>
> Then what about writing an Action that would block access to your
> pipeline based on the request's IP address?
> (maybe even already feasible with Cocoon today?)
>
> This would probably be far easier than writing a scheduler, and would
> allow you to use an external tool, provided it runs on the same host.

sounds nice, thanx for the idea ...

lots of thanks,
lars steiger


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

On Wed, 13 Feb 2002, Bertrand Delacretaz wrote:

> On Wednesday 13 February 2002 10:37, Stephan Michels wrote:
> > I had the same idea. I used the time to write a LALR(1)
> > Parser like yacc and Regex Scanner like lex. This project is near to
> > be finished.
> > This parser used xml for all input(grammar) and output(parser table
> > generation process)
>
> > One thing that keep me off to publish this project under sf, is that
> > I havn't a name for this project.
>
> Here are a few ideas, didn't do any checks on them:
> styxml or stixml (Structured Text to XML)
> stex (Structured Text to X)
> xrules (XML parsing rules)

Hmm. I my first choice was jxc(java xml compiler)


> But maybe it's too restrictive, if your parser is a general one?

> For the Cocoon-specific parts of your project (you mentioned
> Generators), I think donating the code to Cocoon would help the
> visibility of your project.

I will do. I must frist install a cvs server on one of our computers
outside the firewall, but this will be obsolete if I have a name, so
I can put this on sf.net.

> If you keep some parts outside of Cocoon, I'd suggest selecting a
> license (ASF-compatible, I don't know the exact requirements) that
> allows your library to be included with the standard Cocoon
> distribution.

Yes, I will use the apache license.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Wednesday 13 February 2002 10:37, Stephan Michels wrote:
> I had the same idea. I used the time to write a LALR(1)
> Parser like yacc and Regex Scanner like lex. This project is near to
> be finished.
> This parser used xml for all input(grammar) and output(parser table
> generation process)

> One thing that keep me off to publish this project under sf, is that
> I havn't a name for this project.

Here are a few ideas, didn't do any checks on them:
styxml or stixml (Structured Text to XML)
stex (Structured Text to X)
xrules (XML parsing rules)

But maybe it's too restrictive, if your parser is a general one?

For the Cocoon-specific parts of your project (you mentioned 
Generators), I think donating the code to Cocoon would help the 
visibility of your project. 

If you keep some parts outside of Cocoon, I'd suggest selecting a 
license (ASF-compatible, I don't know the exact requirements) that 
allows your library to be included with the standard Cocoon 
distribution.

-- 
 -- Bertrand Delacrétaz, www.codeconsult.ch
 -- web technologies consultant - OO, Java, XML, C++






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Wednesday 13 February 2002 12:18, Stephan Michels wrote:
>. . .
> >   Also look at the APTConvert
> >  
> > (http://www.xmlmind.com/aptconvert/distrib/docs/userguidetoc.html),
> > may be this tool can help you.
>
> I think my project could help you.

This is what I meant initially by "structured text a la PHPwiki" - if 
your parser can parse such structured text as used by APTConvert - 
great!

If could be a first set towards a "very poor man's CMS" using Cocoon...

- Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re[2]: text parser

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

On Wed, 13 Feb 2002, Andrew Answer wrote:

> > Finding a name isn't so easy as I think. :(
>
>   Hmmm.... why you reject project name if domain-name are reserved?
>   Number of projects more than number of domains :)

No, but most of them had a copyright of their name, i think...

>   Well-driven engine! It's look like XML parser...
>   Suggestions:
>   I'm worked with byacc/flex, but already forget his syntax. May be
>   better to make DTD of your grammar more readable?

Before I used a text form of a grammer like this

%token Identifier [A-Za-z][A-Za-z0-9_]*;
%token Number [+\-]? ( ([0-9]+ \.[0-9]*)?(E[+\-]?[0-9]+)?  |
[0-9]*\.[0-9]+(E[+\-]?[0-9]+)? );
%token String \" ( [^\\\"] | \\[^u] |
\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F] )* \";
%token Boolean TRUE|FALSE;
%comment #([^\n]*);
%whitespace [\n\r\t\u0020]+;
%start File;

%%

Tupel : (String | Number) (String | Number)+;
Field : "[" (String | Number | Tupel) ("," (String | Number |
Tupel) )* "]";
Declaration : Identifier (String | Number | Tupel | Field);
Node : Identifier "{" (Node | Declaration)* "}";
File : (Node | Declaration)+;


>   Then, you can even write stylesheet for converting byacc grammar
>   into your grammar. And use it with your parser - it's a good test.

This I have already done ;-)

>   How about whitespaces? Unlike XML, text files need to recognize one
>   or two CR/LF and apply different rules, etc...

Whats about

<token tsymbol="eol">
 <alt>
  <concat>
   <string content="\r"\><string minOccurs="0" content="\n"\>
  </concat>
  <string content="\n"\>
 </alt>
</token>

>   May be you can to produce one text from another (line formatting,
>   adjusting, lists formatting, etc)?

I think yes, with a little work, you could do something like
syntaxhighlighting.

>   And later you can transmute it into Generator/Transformer (but you must
>   produce SAX stream for right work, i think)...

The (fragment) text parser generator produce a SAX stream, which could be
transformed in a pipeline.



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re[2]: text parser

Posted by Andrew Answer <A....@ftc.ru>.
Hello Stephan,

>*************Original message*************
> From: Stephan Michels <st...@vern.chem.tu-berlin.de>
> To: Stephan Michels <co...@xml.apache.org>
> Date: Wednesday, February 13, 2002, 5:18:34 PM
> Subject: text parser


> On Wed, 13 Feb 2002, Andrew Answer wrote:

>> Hello Stephan,
>>
>>   is a good idea! Now i converting many text documents to XML by using
>>   PHP scripts offline...
>>   Some names for your parser: txt2xml (simply and clear),

> There exists already a project this this name:
> http://xml.gsfc.nasa.gov/ingest_demo/txt2XML.html

>>   JTF (Java Text Formatter),

> Look an JTF.org:Jewish Task Force ;-)

>>   JTC (Java Text Converter).

> http://www.jtc.com/ is also given

> Finding a name isn't so easy as I think. :(

  Hmmm.... why you reject project name if domain-name are reserved?
  Number of projects more than number of domains :)

>>   Also look at the APTConvert
>>   (http://www.xmlmind.com/aptconvert/distrib/docs/userguidetoc.html),
>>   may be this tool can help you.

> I think my project could help you.

> A example grammar looks like:
> <grammar>
>  <tokens>
>   <token tsymbol="id">
>    <concat>
>     <cc><ci min="A" max="Z"/><ci min="a" max="z"/></cc>
>     <cc minOccurs="0" maxOccurs="*">
>      <ci min="A" max="Z"/><ci min="a" max="z"/><ci min="0" max="9"/>
>      <cs content="_"/>
>     </cc>
>    </concat>
>   </token>

>   <token tsymbol="mult" assoc="right">
>    <string content="*"/>
>   </token>

>   <token tsymbol="plus" assoc="left">
>    <string content="+"/>
>   </token>

>   <token tsymbol="dopen">
>    <string content="("/>
>   </token>

>   <token tsymbol="dclose">
>    <string content=")"/>
>   </token>

>  </tokens>

>  <whitespace>
>   <cc maxOccurs="*"><cs content="&#10;&#13;&#9;&#32;"/></cc>
>  </whitespace>

>  <productions>

>   <production ntsymbol="E">
>    <ntsymbol name="E"/><tsymbol name="plus"/><ntsymbol name="E"/>
>   </production>

>   <production ntsymbol="E">
>    <ntsymbol name="E"/><tsymbol name="mult"/><ntsymbol name="E"/>
>   </production>

>   <production ntsymbol="E">
>    <tsymbol name="dopen"/><ntsymbol name="E"/><tsymbol name="dclose"/>
>   </production>

>   <production ntsymbol="E">
>    <tsymbol name="id"/>
>   </production>

>  </productions>

>  <ssymbol ntsymbol="E"/>
> </grammar>

> This grammar converts the string "A*b+c*D+(e+F)*G" to

> <E>
>  <E>
>   <E>
>    <E>
>     <id>A</id>
>    </E>
>    <mult>*</mult>
>    <E>
>     <id>b</id>
>    </E>
>   </E>
>   <plus>+</plus>
>   <E>
>    <E>
>     <id>c</id>
>    </E>
>    <mult>*</mult>
>    <E>
>     <id>D</id>
>    </E>
>   </E>
>  </E>
>  <plus>+</plus>
>  <E>
>   <E>
>    <dopen>(</dopen>
>    <E>
>     <E>
>      <id>e</id>
>     </E>
>     <plus>+</plus>
>     <E>
>      <id>F</id>
>     </E>
>    </E>
>    <dclose>)</dclose>
>   </E>
>   <mult>*</mult>
>   <E>
>    <id>G</id>
>   </E>
>  </E>
> </E>

  Well-driven engine! It's look like XML parser...
  Suggestions:
  I'm worked with byacc/flex, but already forget his syntax. May be
  better to make DTD of your grammar more readable?
  Then, you can even write stylesheet for converting byacc grammar
  into your grammar. And use it with your parser - it's a good test.
  How about whitespaces? Unlike XML, text files need to recognize one
  or two CR/LF and apply different rules, etc...
  May be you can to produce one text from another (line formatting,
  adjusting, lists formatting, etc)?
  And later you can transmute it into Generator/Transformer (but you must
  produce SAX stream for right work, i think)...
  
  Happy hacking!

Best regards,
  Andrew Answer               A.Nuzhdov@ftc.ru


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

On Wed, 13 Feb 2002, Andrew Answer wrote:

> Hello Stephan,
>
>   is a good idea! Now i converting many text documents to XML by using
>   PHP scripts offline...
>   Some names for your parser: txt2xml (simply and clear),

There exists already a project this this name:
http://xml.gsfc.nasa.gov/ingest_demo/txt2XML.html

>   JTF (Java Text Formatter),

Look an JTF.org:Jewish Task Force ;-)

>   JTC (Java Text Converter).

http://www.jtc.com/ is also given

Finding a name isn't so easy as I think. :(

>   Also look at the APTConvert
>   (http://www.xmlmind.com/aptconvert/distrib/docs/userguidetoc.html),
>   may be this tool can help you.

I think my project could help you.

A example grammar looks like:
<grammar>
 <tokens>

  <token tsymbol="id">
   <concat>
    <cc><ci min="A" max="Z"/><ci min="a" max="z"/></cc>
    <cc minOccurs="0" maxOccurs="*">
     <ci min="A" max="Z"/><ci min="a" max="z"/><ci min="0" max="9"/>
     <cs content="_"/>
    </cc>
   </concat>
  </token>

  <token tsymbol="mult" assoc="right">
   <string content="*"/>
  </token>

  <token tsymbol="plus" assoc="left">
   <string content="+"/>
  </token>

  <token tsymbol="dopen">
   <string content="("/>
  </token>

  <token tsymbol="dclose">
   <string content=")"/>
  </token>

 </tokens>

 <whitespace>
  <cc maxOccurs="*"><cs content="&#10;&#13;&#9;&#32;"/></cc>
 </whitespace>

 <productions>

  <production ntsymbol="E">
   <ntsymbol name="E"/><tsymbol name="plus"/><ntsymbol name="E"/>
  </production>

  <production ntsymbol="E">
   <ntsymbol name="E"/><tsymbol name="mult"/><ntsymbol name="E"/>
  </production>

  <production ntsymbol="E">
   <tsymbol name="dopen"/><ntsymbol name="E"/><tsymbol name="dclose"/>
  </production>

  <production ntsymbol="E">
   <tsymbol name="id"/>
  </production>

 </productions>

 <ssymbol ntsymbol="E"/>
</grammar>

This grammar converts the string "A*b+c*D+(e+F)*G" to

<E>
 <E>
  <E>
   <E>
    <id>A</id>
   </E>
   <mult>*</mult>
   <E>
    <id>b</id>
   </E>
  </E>
  <plus>+</plus>
  <E>
   <E>
    <id>c</id>
   </E>
   <mult>*</mult>
   <E>
    <id>D</id>
   </E>
  </E>
 </E>
 <plus>+</plus>
 <E>
  <E>
   <dopen>(</dopen>
   <E>
    <E>
     <id>e</id>
    </E>
    <plus>+</plus>
    <E>
     <id>F</id>
    </E>
   </E>
   <dclose>)</dclose>
  </E>
  <mult>*</mult>
  <E>
   <id>G</id>
  </E>
 </E>
</E>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser

Posted by Andrew Answer <A....@ftc.ru>.
Hello Stephan,

  is a good idea! Now i converting many text documents to XML by using
  PHP scripts offline...
  Some names for your parser: txt2xml (simply and clear),
  JTF (Java Text Formatter), JTC (Java Text Converter).
  Also look at the APTConvert
  (http://www.xmlmind.com/aptconvert/distrib/docs/userguidetoc.html),
  may be this tool can help you.
  I think what your parser can be used for converting virtually ANY types of text
  files by using some modification of XSL: i.e. your parser can use
  XML-based stylesheets for transforming text files into XML.
  Examples of text:
  [
     First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph.
     Second paragraph.
  ] OR [
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph. First paragraph. First paragraph.
First paragraph. First paragraph.

Second paragraph.
  ]
  Examples of convert rules:
  [
 <xsl:template match="enter()+5*space()">
  <p><xsl:value-of select="."/></p>
 </xsl:template>
  ] OR [
 <xsl:template match="2*enter()">
  <p><xsl:value-of select="."/></p>
 </xsl:template>
  ]
  Probably, it's can't work, but i will think deeply about this next time...
  May be, in stylesheets parser must use even SGML instead of XML...

  What is your opinion?

  P.S. Anybody use PHPGenerator under C2? Please help me to switch this
  feature...
  
>*************Original message*************
> From: Stephan Michels <st...@vern.chem.tu-berlin.de>
> To: cocoon-dev@xml.apache.org <co...@xml.apache.org>
> Date: Wednesday, February 13, 2002, 3:37:04 PM
> Subject: text parser (was: schedule/batch feature inside cocoon)


> On Wed, 13 Feb 2002, Bertrand Delacretaz wrote:

>> On Wednesday 13 February 2002 08:23, Lars Steiger wrote:
>> >. . .
>> > simple xml. the parser is a generator. i call it
>> > SimpleTextParserGenerator. it needs an xml configuration fьr parsing
>> > a text stream. the xml configuration defines which text fragment goes
>> > under which xml node.
>> >. . .
>> Changing topics, but are you parsing "structured text" a la PHPwiki or
>> something? I've been thinking for a while (but didn't find time to do
>> it yet) that this would be a nice addition to Cocoon, being able to use
>> structured text as input.

> Hi,

> I had the same idea. I used the time to write a LALR(1)
> Parser like yacc and Regex Scanner like lex. This project is near to be
> finished.
> This parser used xml for all input(grammar) and output(parser table
> generation process)

> One thing that keep me off to publish this project under sf, is that I
> havn't a name for this project.

> A text parser generator and a fragment text parser generator s also
> written.

> If anyone has a suggestion for name? Please help me!

> Thanx, Stephan Michels.


> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

>*************Original message*************
Best regards,
  Andrew Answer               A.Nuzhdov@ftc.ru


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: text parser (was: schedule/batch feature inside cocoon)

Posted by Stephan Michels <st...@vern.chem.tu-berlin.de>.

On Wed, 13 Feb 2002, Bertrand Delacretaz wrote:

> On Wednesday 13 February 2002 08:23, Lars Steiger wrote:
> >. . .
> > simple xml. the parser is a generator. i call it
> > SimpleTextParserGenerator. it needs an xml configuration für parsing
> > a text stream. the xml configuration defines which text fragment goes
> > under which xml node.
> >. . .
> Changing topics, but are you parsing "structured text" a la PHPwiki or
> something? I've been thinking for a while (but didn't find time to do
> it yet) that this would be a nice addition to Cocoon, being able to use
> structured text as input.

Hi,

I had the same idea. I used the time to write a LALR(1)
Parser like yacc and Regex Scanner like lex. This project is near to be
finished.
This parser used xml for all input(grammar) and output(parser table
generation process)

One thing that keep me off to publish this project under sf, is that I
havn't a name for this project.

A text parser generator and a fragment text parser generator s also
written.

If anyone has a suggestion for name? Please help me!

Thanx, Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: AW: schedule/batch feature inside cocoon

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Wednesday 13 February 2002 08:23, Lars Steiger wrote:
>. . .
> simple xml. the parser is a generator. i call it
> SimpleTextParserGenerator. it needs an xml configuration für parsing
> a text stream. the xml configuration defines which text fragment goes
> under which xml node.
>. . .
Changing topics, but are you parsing "structured text" a la PHPwiki or 
something? I've been thinking for a while (but didn't find time to do 
it yet) that this would be a nice addition to Cocoon, being able to use 
structured text as input.

>. . .
> yes, first i also thought about an external scheduling component. but
> such a process should not be accessible from outside. 
>. . .
ok I see your point now.

Then what about writing an Action that would block access to your 
pipeline based on the request's IP address?
(maybe even already feasible with Cocoon today?)

This would probably be far easier than writing a scheduler, and would 
allow you to use an external tool, provided it runs on the same host.

-- 
 -- Bertrand Delacrétaz, www.codeconsult.ch
 -- web technologies consultant - OO, Java, XML, C++






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: schedule/batch feature inside cocoon

Posted by Lars Steiger <la...@buzzard.ch>.
> On Tuesday 12 February 2002 21:54, Lars Steiger wrote:
> >. . .
> > i've just implemented some kind of html parsing logic
> > inside cocoon, which now looks very nice (thanx to cocoon). but i
> > can't start the whole parsing process as a scheduled task, without
> > using a tool outside cocoon.
> >. . .
>
> Just curious, what kind of output does your parsing logic produce?

simple xml. the parser is a generator. i call it SimpleTextParserGenerator.
it needs an xml configuration für parsing a text stream. the xml
configuration defines which text fragment goes under which xml node.

> If it's HTML pages, I'd start a tool like wget to retrieve the pages
> from Cocoon and save them in the right place. In that case, though, it
> would IMHO make more sense to use an external scheduling component than
> to integrate one in Cocoon.

yes, first i also thought about an external scheduling component. but such a
process should not be accessible from outside. if i do it with an external
scheduling component, i have to secure this by a password or something like
this. if it can be done inside the sitemap, this process is by default not
accessible from outside. in addition it would be very nice to configure. and
because i try to develop most to all application stuff with cocoon, and i
don't want to use an ejb container yet, i know that such a feature would be
useful for me.

ok, i try to implement something for myself first. if it then looks some
kind of nice, i will inform you about.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: schedule/batch feature inside cocoon

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
On Tuesday 12 February 2002 21:54, Lars Steiger wrote:
>. . .
> i've just implemented some kind of html parsing logic
> inside cocoon, which now looks very nice (thanx to cocoon). but i
> can't start the whole parsing process as a scheduled task, without
> using a tool outside cocoon.
>. . .

Just curious, what kind of output does your parsing logic produce?

If it's HTML pages, I'd start a tool like wget to retrieve the pages 
from Cocoon and save them in the right place. In that case, though, it 
would IMHO make more sense to use an external scheduling component than 
to integrate one in Cocoon.

-- 
 -- Bertrand Delacrétaz, www.codeconsult.ch
 -- web technologies consultant - OO, Java, XML, C++






---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: schedule/batch feature inside cocoon

Posted by Torsten Curdt <tc...@dff.st>.
> > first, i really like the cocoon framework. but unfortunally i am missing
> > something, that's (i know) not so usual for servlet based applications.
> > i've just implemented some kind of html parsing logic inside cocoon, which
> > now looks very nice (thanx to cocoon). but i can't start the whole parsing
> > process as a scheduled task, without using a tool outside cocoon.
> >
> > but before i start hacking something together for myself, i thought that
> > maybe it would be a cool feature for cocoon. so i am asking you about your
> > opinion for such a feature inside cocoon.
> >
> > cool would be, if it would also be configurable inside the sitemap, like a
> > matcher. but instead of for example an url it would match a time/interval.
> > but i know, the whole thing is very request driven.
> >
> > maybe it would also be nice, if a pipeline could be treated like a batch
> > job. request comes in, independed thread will get started and the response
> > comes imediately. but this is (IMHO) another thing.
>
> A scheduler  should not be part of cocoon, but just another Avalon component,
> since there is nothin cocoon specific about it. You could add the scheduler
> to cocoon with a single line in your role file, if  the scheduler  implements
> Startable.
>
> There is a Scheduler in Jakarta Cornerstone, but I have never used it and
> don't know, how simple it is, to use Cornerstone blocks in Cocoon.

wouldn't it be cool when Cocoon were totally integrated with
Phoenix/Cornerstone *sigh*
--
Torsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: schedule/batch feature inside cocoon

Posted by Lars Steiger <la...@buzzard.ch>.
> > [ ... ]
>
> A scheduler  should not be part of cocoon, but just another
> Avalon component,
> since there is nothin cocoon specific about it. You could add the
> scheduler
> to cocoon with a single line in your role file, if  the scheduler
>  implements
> Startable.

yes, i totally agree with you. i try to do it this way.

> There is a Scheduler in Jakarta Cornerstone, but I have never used it and
> don't know, how simple it is, to use Cornerstone blocks in Cocoon.

thanx for the hint. i will take a look at cornerstone. hopefully it fits
somehow :)

greetings,
lars steiger


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: schedule/batch feature inside cocoon

Posted by Martin Holz <ho...@fiz-chemie.de>.
Hi,

Lars Steiger wrote:
> hi everybody
>
> first, i really like the cocoon framework. but unfortunally i am missing
> something, that's (i know) not so usual for servlet based applications.
> i've just implemented some kind of html parsing logic inside cocoon, which
> now looks very nice (thanx to cocoon). but i can't start the whole parsing
> process as a scheduled task, without using a tool outside cocoon.
>
> but before i start hacking something together for myself, i thought that
> maybe it would be a cool feature for cocoon. so i am asking you about your
> opinion for such a feature inside cocoon.
>
> cool would be, if it would also be configurable inside the sitemap, like a
> matcher. but instead of for example an url it would match a time/interval.
> but i know, the whole thing is very request driven.
>
> maybe it would also be nice, if a pipeline could be treated like a batch
> job. request comes in, independed thread will get started and the response
> comes imediately. but this is (IMHO) another thing.

A scheduler  should not be part of cocoon, but just another Avalon component, 
since there is nothin cocoon specific about it. You could add the scheduler 
to cocoon with a single line in your role file, if  the scheduler  implements 
Startable.

There is a Scheduler in Jakarta Cornerstone, but I have never used it and 
don't know, how simple it is, to use Cornerstone blocks in Cocoon. 

Regards
	Martin

--
Martin Holz  <ho...@fiz-chemie.de>  phone: 0049-30-39977 218 
FIZ CHEMIE BERLIN


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: schedule/batch feature inside cocoon

Posted by Mikhail Fedotov <mi...@kittown.com>.
> hi everybody

hi

> but i can't start the whole parsing process as a
> scheduled task, without using a tool outside
> cocoon.

Remote scheduler will do the job.

> i thought that maybe it would be a cool feature for
> cocoon.

I'm answering on this messsage because I've implemented one
 JobThreads/Schedule-based piece of software a while ago
 and remember how I was happy when managed to separate
 whole thing into several modules.

I think that cocoon2 is one thing, and tasks/schedule
 machinery is another. It will be good if they will use
 each other, but that is the reason for combining all this
 stuff in a single application ?

One real thing I can think of is calling cocoon by jndi
 calls, not by http requests, and getting response via
 jndi. If I only had anough time right now. :)

ps. Or I've missed something and it is already there ?

Mikhail

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org