You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Normand Mongeau <nm...@videotron.ca> on 2005/09/26 20:55:00 UTC

[users@httpd] Question about apache versus XML/XLST

Hi All,

this is my first posting here, so please bear with me if I'm at the wrong 
place.

I'm looking at Apache to be used as an HTTP server, to access a GemStone 
database at the back end.  In my scenario all pages will be active.  Ideally 
I'd like Apache to convert HTTP requests to XML (presumably with XSLT) 
before feeding them to my database, which would then return the resulting 
data also in XML, for Apache to then convert that XML to HTML with XSLT, 
thus returning HTML to the client.

I looked at different Apache modules but nothing seems to fit my scenario. 
For instance, the Xalan C++ sample named ApacheModuleXSLT is completely 
file-based, which is definitely not my case.

Is there a way to do the above scenario?

Thanks in advance,

Normand 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


[users@httpd] Architectural questions

Posted by Normand Mongeau <nm...@videotron.ca>.
I'm thinking of setting up Apache to communicate with my back-end (a 
GemStone database) through a single process thread running alongside Apache. 
That thread would marshall requests through a TCP/IP pipe.

Two questions:

1 - This appears to be a potential bottleneck.  If so, I suppose I can add 
more processes.  What do you think?

2 - What would be the best way to implement such a process?  And how does 
one start such processes from Apache?

Thanks,

Normand 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question about apache versus XML/XLST

Posted by Nick Kew <ni...@webthing.com>.
On Tuesday 27 September 2005 16:44, Normand Mongeau wrote:

> Well I want my back-end API to be protocol neutral, ie not tied to HTTP.
> Hence the desire to feed it only XML.

That wasn't the confusing bit.  The question was where the XML is coming
from in the first place?  If it's from the client, then apache doesn't have to
do anything.  If not, you have to specify *what* you want apache to do
(e.g. package the request as XMTP?)

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question about apache versus XML/XLST

Posted by Normand Mongeau <nm...@videotron.ca>.

> On Monday 26 September 2005 20:15, Joshua Slive wrote:
>> On 9/26/05, Normand Mongeau <nm...@videotron.ca> wrote:
>> > Hi All,
>> >
>> > this is my first posting here, so please bear with me if I'm at the 
>> > wrong
>> > place.
>> >
>> > I'm looking at Apache to be used as an HTTP server, to access a 
>> > GemStone
>> > database at the back end.  In my scenario all pages will be active.
>> > Ideally I'd like Apache to convert HTTP requests to XML (presumably 
>> > with
>> > XSLT) before feeding them to my database, which would then return the
>> > resulting data also in XML, for Apache to then convert that XML to HTML
>> > with XSLT, thus returning HTML to the client.
>
> That's a little confusing.  mod_transform and others are available to 
> convert
> outgoing XML to HTML, or whatever other formats you may want (and you
> might also like to look at the XMLNS framework, which is based on a SAX2
> parser and therefore far more efficient than XSLT).  But what exactly are 
> you
> expecting to do with incoming data?  Processing that was one of the 
> initial
> objectives of mod_xml, but that basically withered for lack of real-life 
> apps.
>

Well I want my back-end API to be protocol neutral, ie not tied to HTTP. 
Hence the desire to feed it only XML.


>> >
>> > I looked at different Apache modules but nothing seems to fit my
>> > scenario. For instance, the Xalan C++ sample named ApacheModuleXSLT is
>> > completely file-based, which is definitely not my case.
>
> I don't know that module.  In the days of Apache 1.x, processing files was
> sometimes unavoidable, but anything that faffs about with them these
> days is probably not a good general-purpose choice.
>
>> > Is there a way to do the above scenario?
>>
>> There are various options.  mod_transform is one and there are several
>> others listed on http://modules.apache.org/
>>
>> But to be frank, unless your needs for performance are very high, most
>> people would not consider doing this in a C module.  They would use a
>> higher level system like mod_perl/tomcat or a CGI/fastCGI-based system
>> in your favorite language.
>
> Why?  Since the coming of Apache 2, applications development in C modules
> has become very attractive.  It's what drew me into writing them, 
> including
> reimplimenting a lot of stuff previously written as CGI or with mod_perl.
>
>> Not that it can't be done in a pure apache module written in C.  It is
>> just that higher level languages will often be much easier to deal
>> with.
>
> They may be.  But the APR takes away the biggest burden of C programming
> (namely, managing resources), and native-Apache has a lot to offer as
> applications platform.
>>
>> Joshua.
>>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question about apache versus XML/XLST

Posted by Nick Kew <ni...@webthing.com>.
On Monday 26 September 2005 20:15, Joshua Slive wrote:
> On 9/26/05, Normand Mongeau <nm...@videotron.ca> wrote:
> > Hi All,
> >
> > this is my first posting here, so please bear with me if I'm at the wrong
> > place.
> >
> > I'm looking at Apache to be used as an HTTP server, to access a GemStone
> > database at the back end.  In my scenario all pages will be active. 
> > Ideally I'd like Apache to convert HTTP requests to XML (presumably with
> > XSLT) before feeding them to my database, which would then return the
> > resulting data also in XML, for Apache to then convert that XML to HTML
> > with XSLT, thus returning HTML to the client.

That's a little confusing.  mod_transform and others are available to convert
outgoing XML to HTML, or whatever other formats you may want (and you
might also like to look at the XMLNS framework, which is based on a SAX2
parser and therefore far more efficient than XSLT).  But what exactly are you
expecting to do with incoming data?  Processing that was one of the initial 
objectives of mod_xml, but that basically withered for lack of real-life apps.

> >
> > I looked at different Apache modules but nothing seems to fit my
> > scenario. For instance, the Xalan C++ sample named ApacheModuleXSLT is
> > completely file-based, which is definitely not my case.

I don't know that module.  In the days of Apache 1.x, processing files was
sometimes unavoidable, but anything that faffs about with them these
days is probably not a good general-purpose choice.

> > Is there a way to do the above scenario?
>
> There are various options.  mod_transform is one and there are several
> others listed on http://modules.apache.org/
>
> But to be frank, unless your needs for performance are very high, most
> people would not consider doing this in a C module.  They would use a
> higher level system like mod_perl/tomcat or a CGI/fastCGI-based system
> in your favorite language.

Why?  Since the coming of Apache 2, applications development in C modules
has become very attractive.  It's what drew me into writing them, including
reimplimenting a lot of stuff previously written as CGI or with mod_perl.

> Not that it can't be done in a pure apache module written in C.  It is
> just that higher level languages will often be much easier to deal
> with.

They may be.  But the APR takes away the biggest burden of C programming
(namely, managing resources), and native-Apache has a lot to offer as
applications platform.
>
> Joshua.
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question about apache versus XML/XLST

Posted by Joshua Slive <js...@gmail.com>.
On 9/26/05, Normand Mongeau <nm...@videotron.ca> wrote:
> Hi All,
>
> this is my first posting here, so please bear with me if I'm at the wrong
> place.
>
> I'm looking at Apache to be used as an HTTP server, to access a GemStone
> database at the back end.  In my scenario all pages will be active.  Ideally
> I'd like Apache to convert HTTP requests to XML (presumably with XSLT)
> before feeding them to my database, which would then return the resulting
> data also in XML, for Apache to then convert that XML to HTML with XSLT,
> thus returning HTML to the client.
>
> I looked at different Apache modules but nothing seems to fit my scenario.
> For instance, the Xalan C++ sample named ApacheModuleXSLT is completely
> file-based, which is definitely not my case.
>
> Is there a way to do the above scenario?

There are various options.  mod_transform is one and there are several
others listed on http://modules.apache.org/

But to be frank, unless your needs for performance are very high, most
people would not consider doing this in a C module.  They would use a
higher level system like mod_perl/tomcat or a CGI/fastCGI-based system
in your favorite language.

Not that it can't be done in a pure apache module written in C.  It is
just that higher level languages will often be much easier to deal
with.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Question about apache versus XML/XLST

Posted by André-John Mas <aj...@sympatico.ca>.
Hi,

There are number of solutions to this. Generally I would use  
something like Java, in a Tomcat, or maybe something like PHP.
  One advantage of PHP over Java, is that you don't need a second  
server running the application. The other advantage is
that you have much more control over the specifics of you particular  
usage.

Andre

On 26-Sep-05, at 14:55 , Normand Mongeau wrote:

> Hi All,
>
> this is my first posting here, so please bear with me if I'm at the  
> wrong place.
>
> I'm looking at Apache to be used as an HTTP server, to access a  
> GemStone database at the back end.  In my scenario all pages will  
> be active.  Ideally I'd like Apache to convert HTTP requests to XML  
> (presumably with XSLT) before feeding them to my database, which  
> would then return the resulting data also in XML, for Apache to  
> then convert that XML to HTML with XSLT, thus returning HTML to the  
> client.
>
> I looked at different Apache modules but nothing seems to fit my  
> scenario. For instance, the Xalan C++ sample named ApacheModuleXSLT  
> is completely file-based, which is definitely not my case.
>
> Is there a way to do the above scenario?
>
> Thanks in advance,
>
> Normand
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server  
> Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>   "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org