Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-02-03 Thread Dakota Jack
In regard to our caching discussion, Frank, I think you will like the
following article.  The prior article about two essential filters is
interesting too.

http://www.onjava.com/pub/a/onjava/2004/03/03/filters.html?page=1

One thing seems certain: there is complete serverside cache control.

-- 
You can lead a horse to water but you cannot make it float on its back.
Heaven has changed.  The Sky now goes all the way to our feet.

~Dakota Jack~

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
snip
   I suspect that it is relatively small and, when you
  introduce sophisticated state and caching options, it may be faster.
 
 Relative to what?  To the web server dealing with it?  I would suspect
 it's actually relatively BIG compared to that.  I'm certainly willing to
 be proved wrong though.
/snip

As we agree, we just need to get the data.  I think there should be a
lot of standard testing out there that is more reliable than I am
probably going to do off the top.  I will look around a bit and maybe
someone will chime in with some help here.


snip
 That might be true... one other point to remember though is that the
 more unusual things you do, the harder it will be to get people able
 to maintain it.  I fight standards at work as much as the next guy just
 because creative people don't like standards forced on them, but clever
 solutions usual equal difficult to maintain solutions.  I don't think
 I'm telling you something you don't know :)  But, that's not my
 argument, so don't spend any time on it.  Just another side track we
 could go down :)
/snip

I am 100% in favor of keeping maintenance low.  That was my original
primary objective going here.  I could not believe how much time was
being spent on URLs, base tags, etc., etc., with all the concomittant
confusion throughout the development process.


snip
  I think the bigger hit is reading the danged thing.  This obviously is
  especially so when there is an ongoing use of changing the JSP page.
  This has no penalty with ProtocolPages.
/snip

I just mean the more complicated parsing rules that go with JSP, as
well as everything else.
snip 
 That's what I like, woman that are easy to please :) (You were left SO
 wide open there I just couldn't resist!)
/snip

Heh, heh!  Remind me never to fence with you, Frank.  Actually, and
this is really off topic, in my milieu I am dearly loved because I
have really learned how to be a friend, husband, etc.  This has been
the largest accomplishment by far in my life and the one I most
cherish.

snip
 * (Does the app server pass the response back to the web server to
 serve, or does it serve it directly to the client at that point?  I'm
 actually not sure, but let's be optimistic and say the web server is out
 of the equation at this point, although I suspect that's NOT the case)
 In any case, images are returned to client-
/snip

I think that the ResourceAction class actually acts as the web server
and that is why the return is null.  The class writes to the responses
output stream and that is all the server does, right?


  FileInputStream fis   = new FileInputStream(fileName);
  BufferedInputStream bis   = new BufferedInputStream(fis);
  byte[]  bytes = new byte[bis.available()];
  OutputStreamos= response.getOutputStream();
  bis.read(bytes);
  os.write(bytes);
  os.flush();
  os.close();

snip
 There is clearly more work done with the second chart because the app
 server is now involved.  How costly is all that work?
/snip

Again, I am not sure about this, and it is the sort of thing that one
typically makes mistakes about if one does not go by the data.  So, I
am going to hold judgment on it, but my intuitions are not running in
the same direction as yours.  I keep remembering how the following of
good OOP principles can make Java applications faster that C
applications doing the exact same thing, although most think that
would not be the case.  Just the other day I was reading about a guy
who tried and failed to do some imaging work in early Java and had to
go to C.  Now Java is faster in that area.
snip 
 You could make the argument that because any servlet-based application
 is incurring those costs with most requests, what's the big deal about
 adding a few more?  To a degree that would be a reasonable argument, but
 scalability is most certainly at risk because viewed from the point of
 view of the app server, a single page really corresponds to 10 app
 server requests.
/snip

I think there are trade-offs that will need to be measured.  For
example, I can envision with some of the stuff I do creating whole
pages dynamically with images.  The new Java imaging stuff is really,
really, cool on this.  Flash has its side too.

snip
 Even if it's all done in the most efficient way, those ten requests
 look, for all intents and purposes, like 10 simultaneous USERS (assuming
 1 request per user).  So, maybe your app server can handle 100
 concurrent requests... If the web server was allowed to serve the
 images, your app server still has 100 slots available to service
 requests, which corresponds generally to 100 concurrent users... If it's
 serving 10 images for each physical user though, now you can only
 service 10 concurrent users, so you've reduced your overall server
 capacity (as viewed by outside clients) by 90%.  Ouch.
/snip

Now just one moment, Bub!  LOL  ;-)  You really are not seeing the
ways you can save time here.  For 

Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
I think the worst case is 22 versus 32, Frank. with 10 images.  See
your note and then my reasoning below that.


snip
 Even if it's all done in the most efficient way, those ten requests
 look, for all intents and purposes, like 10 simultaneous USERS (assuming
 1 request per user).  So, maybe your app server can handle 100
 concurrent requests... If the web server was allowed to serve the
 images, your app server still has 100 slots available to service
 requests, which corresponds generally to 100 concurrent users... If it's
 serving 10 images for each physical user though, now you can only
 service 10 concurrent users, so you've reduced your overall server
 capacity (as viewed by outside clients) by 90%.  Ouch.
 
 I fully acknowledge those are rough, worst-case numbers... I certainly
 don't mean to imply that your approach is 90% worse.  Not at all!  Just
 trying to illustrate the problem, as I see it, in certain environments.
/snip

app server = (AS) 
struts server = (SS)
req = request
-- = pass
res = response

With ResourceAction
___
First case HTML = req (AS) res (AS) = 2
Second image JPEG (say) = req (AS) -- res (SS) = 3
.
Tenth image JPEG (say) = req (AS) -- res (SS) = 3

WIthout ResourceAction
___
First case HTML = req (AS) res (AS) = 2
First image JPEG (say) = req (AS) res (AS) = 2
Second image JPEG (say) = req (AS) res (AS) = 2
.
Tenth image JPEG (say) = req (AS) res (AS) = 2

This is 22 versus 32.  Apparently you forgot (I think?) that the app
server has to handle ten images too.  They don't just go out with the
page, although we are looking at this in a very oversimplified sense.

There is no question that the AS is quicker with HTML than the SS, but
I am not so sure about the images.  The SS may be faster.  There is
lots of room here for tuning.


-- 
You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be
crows.  We are poor . . . but we are free.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Frank W. Zammetti
Dakota Jack wrote:
I just mean the more complicated parsing rules that go with JSP, as
well as everything else.
Ok, gotcha.  But, this only applies for the first access to the JSP, 
right?  From then on it's a servlet invocation (which is more expensive 
than returning just a plain'old HTML document, right?  But now I am 
splitting hairs)

Heh, heh!  Remind me never to fence with you, Frank.  Actually, and
this is really off topic, in my milieu I am dearly loved because I
have really learned how to be a friend, husband, etc.  This has been
the largest accomplishment by far in my life and the one I most
cherish.
That's all that counts in the end.  I have a wife of ten years and two 
great kids (well, most of the time they are great anyway), and although 
I have to remind myself of it sometimes because I get so wrapped up in 
other things that aren't as important, they are without a doubt my 
greatest accomplishment.

I think that the ResourceAction class actually acts as the web server
and that is why the return is null.  The class writes to the responses
output stream and that is all the server does, right?
I thought so too at first, but upon further reflection I'm not so 
sure... If a request comes in to the web server and then it forwards it 
on to the app server, that would mean at some very low level that the 
web server was passing along the connection to the app server... I'm not 
so sure it's anything that complex... It may be that the app server 
renders the response stream, but then passes it back to the web server 
to return to the client.  The bottom line though is that we're talking a 
level low enough that I don't know the answer for sure.

  Again, I am not sure about this, and it is the sort of thing that one
typically makes mistakes about if one does not go by the data.  So, I
am going to hold judgment on it, but my intuitions are not running in
the same direction as yours.  I keep remembering how the following of
good OOP principles can make Java applications faster that C
applications doing the exact same thing, although most think that
would not be the case.  Just the other day I was reading about a guy
who tried and failed to do some imaging work in early Java and had to
go to C.  Now Java is faster in that area.
snip 
I too await the data :)  But, I think you'd have to agree that for your 
approach to wind up being faster, much like when Java programs are 
faster than C programs, it must be due to some hidden optimization going 
on.  I mean, on an operation-per-operation basis, C will ALWAYS beat 
Java... Simply put, there will always be less machine code ops going on 
with a C program at the lowest levels (assuming they algorithmically 
equivalent) than a Java program.  But, because a Java program can be 
optimized at runtime, that's where the speed gains occur that you can't 
get with C.

Something similar must be happening if your approach winds up being 
faster.  All things being equal (ceteris paribus), that's the only 
logical conclusion to reach.  That doesn't make it the right one of 
course :)  The data will be the decider...

I think there are trade-offs that will need to be measured.  For
example, I can envision with some of the stuff I do creating whole
pages dynamically with images.  The new Java imaging stuff is really,
really, cool on this.  Flash has its side too.
No argument there... it's the same with OOP vs. strictly procedural 
code... if we assume we're always talking a straight compile to machine 
code and similar optimizations in both, procedural code should generally 
be faster for the same reason I talked about above.  Clearly though, the 
benefits of an OOP approach outweigh any difference.  Same could be true 
here.

  Now just one moment, Bub!  LOL  ;-)  You really are not seeing the
ways you can save time here.  For example, there is such a thing as
caching, pragmas and expiry headers which can be set with a response
in a way that the meta tags just cannot handle.  
But now your pushing those caching decisions back on the browser, right? 
 I thought one of your basic premises was to not trust the browser to 
construct URLs and such?  Wouldn't you have the same distrust for 
caching? (and probably worse since that is at least at the users' 
discrection)

There will be savings
of creating no calls where pure HTML would be lost.  There will be
other things like this too.  Remember too that the ResourceAction
class is acting as a multithreaded alternative mini-server.  Indeed,
the approach allows us to get the images, for example, from some other
server that is maximized to do just this.  Conceivably that could be
quicker for cached images.  Remember I said conceivably.  The
ability to be flexible can make for great rewards in efficiency and
fluidity that are not immediately obvious.
Granted, some additional flexibility might outweigh any problems.  If 
you rolled my BLOBServerAction into your ResourceAction, then you could 
transparently serve images from 

Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Frank W. Zammetti
Dakota Jack wrote:
app server = (AS) 
struts server = (SS)
req = request
-- = pass
res = response
You lost me here already... What's the difference between the app server 
and the struts server?  Isn't Struts running IN your app server?

With ResourceAction
___
First case HTML = req (AS) res (AS) = 2
Second image JPEG (say) = req (AS) -- res (SS) = 3
.
Tenth image JPEG (say) = req (AS) -- res (SS) = 3
WIthout ResourceAction
___
First case HTML = req (AS) res (AS) = 2
First image JPEG (say) = req (AS) res (AS) = 2
Second image JPEG (say) = req (AS) res (AS) = 2
.
Tenth image JPEG (say) = req (AS) res (AS) = 2
This is 22 versus 32.  Apparently you forgot (I think?) that the app
server has to handle ten images too.  They don't just go out with the
page, although we are looking at this in a very oversimplified sense.
I don't see how you got 22 OR 32! :)  The first request from the client 
is for the HTML document, right?  So that's one request.  The browser 
then sees ten img tags, regardless of what they point to.  So for each 
one it makes a request.  That's 10 requests, right?  So it's 11 in all 
from the client to the server (ignoring for the moment whether 
server means app server alone or web server in front of app server, or 
whatever other configuration you might dream up).

The only different between the two approaches we've been discussing is 
what on the server is going to handle each of those 11 requests... Is 
it a web server sending back a static HTML page for the first request, 
and then an image for each of the subsequent 10 image requests, or is it 
a web server returning the HTML page and then an app server returning 
the images, or an app server returning the page AND the images?

There is no question that the AS is quicker with HTML than the SS, but
I am not so sure about the images.  The SS may be faster.  There is
lots of room here for tuning.
Let me ask you this question... If you are accessing a web site, and you 
connect directly to the Internet, is that, ignoring things like 
caching and such, generally going to be faster than going through a 
proxy?  I'd hope you would say yes.  Now, clearly, if the proxy is doing 
caching and/or other optimizations, it might turn out to be faster, but 
that further proves my point: the web server is like the proxy in this 
example.

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
snip
  I think that the ResourceAction class actually acts as the web server
  and that is why the return is null.  The class writes to the responses
  output stream and that is all the server does, right?
 
 I thought so too at first, but upon further reflection I'm not so
 sure... If a request comes in to the web server and then it forwards it
 on to the app server, that would mean at some very low level that the
 web server was passing along the connection to the app server... I'm not
 so sure it's anything that complex... It may be that the app server
 renders the response stream, but then passes it back to the web server
 to return to the client.  The bottom line though is that we're talking a
 level low enough that I don't know the answer for sure.
/snip

I am certain on this one, because you can do this sort of thing
*without* the web or app servers at all.  I do this fairly frequently
with code not unlike and heavily borrowing in principle from Jason
Hunters HttpMessage and HttpsMessage in COS.  The ResourceAction sends
the response and ends the whole process by returning null.

snip
 I too await the data :)  But, I think you'd have to agree that for your
 approach to wind up being faster, much like when Java programs are
 faster than C programs, it must be due to some hidden optimization going
 on.  I mean, on an operation-per-operation basis, C will ALWAYS beat
 Java... 
/snip

Well, maybe on on an operation basis.  An operation by any other
name is still an operation.  However, I don't disagree and would
merely quibble about the language and the description.
snip
 Simply put, there will always be less machine code ops going on
 with a C program at the lowest levels (assuming they algorithmically
 equivalent) than a Java program.  
/snip

Well put!  Yes!

snip
 But, because a Java program can be
 optimized at runtime, that's where the speed gains occur that you can't
 get with C.
/snip

At the very least this is a main place to gain speed: the Tortoise and
the Hare come to mind.


snip
ceteris paribus
/snip

Heh, I meant to tell you last time, this is Latin, not Greek.  LOL   ///;-)

www.m-w.com

Main Entry: ce·te·ris pa·ri·bus
Pronunciation: 'kA-tr-s-'par--bs, 'ke-, 'se-
Function: adverb
Etymology: New Latin, other things being equal
: if all other relevant things, factors, or elements remain unaltered

snip
 But now your pushing those caching decisions back on the browser, right?
   I thought one of your basic premises was to not trust the browser to
 construct URLs and such?  Wouldn't you have the same distrust for
 caching? (and probably worse since that is at least at the users'
 discrection)
/snip

The answers are no, yes, no.  Setting caching in the response object
is not equivalent to setting caching in the meta tags.  This is why
the ResourceAction has an edge.  Note also that the setting of cache,
pragma and expires are runtime alterable, and can override the meta
tags, in ResourceAction.  I left those decisions out of the code I
sent you.  Did you notice where I added in it response to someone's
query on that?

snip
 Granted, some additional flexibility might outweigh any problems.  If
 you rolled my BLOBServerAction into your ResourceAction, then you could
 transparently serve images from WEB-INF *or* a database, transparently
 to the user and front-end.  That's a nice bit of flexibility to be sure.
/snip

And, if you imagined more radical uses of images for whole pages,
etc., then you might start thinking about BufferedImages cached in
sessions, etc.


snip
 I leave the leg-work to you :)
/snip

You got it!

Jack

-- 
You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be
crows.  We are poor . . . but we are free.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
Too late when I sent this.  Let me make the necessary alterations to
the nomenclature.  Sorry!

web server = df. (WS)
app server = df. (AS)
request= df. req
response   = df. res
  = df. passing the control

With ResourceAction

1.0  WS req WS res HTML  [2]
1.1  WS req  AS res [3]
1.2  WS req  AS res [3]
1.3  WS req  AS res [3]
1.4  WS req  AS res [3]
1.5  WS req  AS res [3]
1.6  WS req  AS res [3]
1.7  WS req  AS res [3]
1.8  WS req  AS res [3]
1.9  WS req  AS res [3]
1.10 WS req  AS res [3]

 Total 32

Without ResourceAction

1.0  WS req WS res HTML  [2]
1.1  WS req AS res [2]
1.2  WS req AS res [2]
1.3  WS req AS res [2]
1.4  WS req AS res [2]
1.5  WS req AS res [2]
1.6  WS req AS res [2]
1.7  WS req AS res [2]
1.8  WS req AS res [2]
1.9  WS req AS res [2]
1.10 WS req AS res [2]

 Total 22

However, let me note, once again, that we can make it 22 to 22 by
simply sending the attributes that are relevant back to a different
server.  For example, we could have

  img src='http://blahblahblah.com/ResourceAction.do?file=whatever.gif'

Doing this, if we are talking about serving images to a large-scale
site, we could get rid of both the WS and the AS and use a SCS (small
custom server) optimized for this situation.  I do this sort of thing
constantly, *sub rosa*, on my sites.  This is probably quicker than
using WS to serve the images, and certainly so if the images are in
any way dynamic in nature and if we make use of the multithreading
opportunities that crop up in this situation.  But, this is going
afield.  And, this is only looking at the upside too.

Jack


-- 
You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be
crows.  We are poor . . . but we are free.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Frank W. Zammetti
Dakota Jack wrote:
I am certain on this one, because you can do this sort of thing
*without* the web or app servers at all.  I do this fairly frequently
with code not unlike and heavily borrowing in principle from Jason
Hunters HttpMessage and HttpsMessage in COS.  The ResourceAction sends
the response and ends the whole process by returning null.
I agree, obviously you can take Tomcat for instance and use it to serve 
everything... I have a production app that is a single server running 
Tomcat and Oracle and that's it, no web server anywhere, everything is 
served from Tomcat whether it's a JSP, an image, an HTML document or 
whatever else.

The question that's in my mind though is what happens when you have a 
web server in front of Tomcat?  Just rendering to the response in a 
servlet might not be enough in that case... Think of a proxy analogy... 
Does the web server almost appear like a proxy?  In other words, a 
request comes in to the web server, does it (a) pass the connection to 
the app server to fulfill, at which point it's done and can service more 
requests, or (b) does it ask the app server for the resource, whatever 
it is, wait for the response from the app server and send it along to 
the client when the app server is done responding?  Same idea as a 
network proxy.

The point being, just because the app server CAN serve everything, 
doesn't necasserily mean it WILL with a web server in front.

But again, I don't know the answer here, it's just a question in my mind.
ceteris paribus
/snip
Heh, I meant to tell you last time, this is Latin, not Greek.  LOL   ///;-)
Really??  Well, I have something to yell at my Macroeconomics professor 
for then!  I know for sure she said it was Greek! :)

Funny aside... My Macroeconomics professor... her last name, and I 
couldn't have made this up, is Economopolous.  That just rules!

But now your pushing those caching decisions back on the browser, right?
 I thought one of your basic premises was to not trust the browser to
construct URLs and such?  Wouldn't you have the same distrust for
caching? (and probably worse since that is at least at the users'
discrection)
/snip
The answers are no, yes, no.  Setting caching in the response object
is not equivalent to setting caching in the meta tags.  This is why
the ResourceAction has an edge.  Note also that the setting of cache,
pragma and expires are runtime alterable, and can override the meta
tags, in ResourceAction.  I left those decisions out of the code I
sent you.  Did you notice where I added in it response to someone's
query on that?
I did notice, but my point is that the browser settings would override 
any tags or headers you set.  I might be wrong about that, but that 
would be my expectation.  After all, what good is a setting in my 
browser that says don't cache anything if a web site designer can come 
along and overrule that?  Surely the FOSS community would be up in arms 
over their loss of freedom, right?!? ;)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Frank W. Zammetti
I still don't understanding the 32 and 22... What do the [2] and [3]'s 
represent?

Dakota Jack wrote:
Too late when I sent this.  Let me make the necessary alterations to
the nomenclature.  Sorry!
web server = df. (WS)
app server = df. (AS)
request= df. req
response   = df. res
  = df. passing the control
With ResourceAction
1.0  WS req WS res HTML  [2]
1.1  WS req  AS res [3]
1.2  WS req  AS res [3]
1.3  WS req  AS res [3]
1.4  WS req  AS res [3]
1.5  WS req  AS res [3]
1.6  WS req  AS res [3]
1.7  WS req  AS res [3]
1.8  WS req  AS res [3]
1.9  WS req  AS res [3]
1.10 WS req  AS res [3]
 Total 32
Without ResourceAction
1.0  WS req WS res HTML  [2]
1.1  WS req AS res [2]
1.2  WS req AS res [2]
1.3  WS req AS res [2]
1.4  WS req AS res [2]
1.5  WS req AS res [2]
1.6  WS req AS res [2]
1.7  WS req AS res [2]
1.8  WS req AS res [2]
1.9  WS req AS res [2]
1.10 WS req AS res [2]
 Total 22
However, let me note, once again, that we can make it 22 to 22 by
simply sending the attributes that are relevant back to a different
server.  For example, we could have
  img src='http://blahblahblah.com/ResourceAction.do?file=whatever.gif'
Doing this, if we are talking about serving images to a large-scale
site, we could get rid of both the WS and the AS and use a SCS (small
custom server) optimized for this situation.  I do this sort of thing
constantly, *sub rosa*, on my sites.  This is probably quicker than
using WS to serve the images, and certainly so if the images are in
any way dynamic in nature and if we make use of the multithreading
opportunities that crop up in this situation.  But, this is going
afield.  And, this is only looking at the upside too.
Jack

If we are talking about dynamically-created resources, then I would tend 
to agree with your view.  But we have, at least as far as I was 
concerned, been talking about strictly static resources.

In that case, your basic premise boils down to, as I see it:
An app server running ResourceAction can serve resources more 
efficiently than a web server.

Again, strictly talking about static resources, I would be absolutely 
SCHOCKED to learn this is the case under most circumstances.  That would 
be like saying a Cadillac could beat a NASCAR vehicle in 1 ten-lap 
race... It might be able to under some circumstances, like the NASCAR 
driver being drunk!, and certainly there are some very nice trade-offs 
to driving the Caddy like more room and a better stereo, but in general 
you wouldn't expect the Caddy to lose.

A bit of hyperbole there, but the underlying point is what's important.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
snip
 The question that's in my mind though is what happens when you have a
 web server in front of Tomcat?  Just rendering to the response in a
 servlet might not be enough in that case... 
/snip

*Before* ResourceAction returns null, the response output stream has
been written, flushed, and closed.   The only thing that the app
server or the web server have left to deal with is that null.  There
is no wrapper in this case and no proxy in the sense you are talking. 
The OutputStream from an HttpResponse object writes to the client.

snip
 The point being, just because the app server CAN serve everything,
 doesn't necasserily mean it WILL with a web server in front.
/snip

But, in this case, the OutputStream does and there is no pass it on
functionality in there that would incorporate any reference or use of
the web or app server.  The fact that this OutputStream ends the
process might be one of the factors favoring ResourceAction.

snip
 ceteris paribus
 
  /snip
 
  Heh, I meant to tell you last time, this is Latin, not Greek.  LOL   ///;-)
 
 Really??  Well, I have something to yell at my Macroeconomics professor
 for then!  I know for sure she said it was Greek! :)
 
 Funny aside... My Macroeconomics professor... her last name, and I
 couldn't have made this up, is Economopolous.  That just rules!
/snip

LOL  Economopolous!  Hilarious  Remember My Big Fat Greek Wedding
where the Greek guy has a way of turning everything to Greek history,
etc.?  Well, Ms. Economopolous is clearly Greek and her name is
Economic-city.  (Plato's Republic was really Politia which means
The City.  Republic comes from Republica which was a Latin
translation.)  Anyway, this is ALL ceteris paribus.  (You can tell
Latin from the endings, ibus is the dative plural.)
snip
 I did notice, but my point is that the browser settings would override
 any tags or headers you set.  I might be wrong about that, but that
 would be my expectation.  After all, what good is a setting in my
 browser that says don't cache anything if a web site designer can come
 along and overrule that?  Surely the FOSS community would be up in arms
 over their loss of freedom, right?!? ;)
/snip

The good is that the web site designer knows when a change has been
made and the assumption is that you are going to see what the web site
designer has to offer.  No?
Jack

-- 
You can lead a horse to water but you cannot make it float on its back.

~Dakota Jack~

You can't wake a person who is pretending to be asleep.

~Native Proverb~

Each man is good in His sight. It is not necessary for eagles to be
crows.  We are poor . . . but we are free.

~Hunkesni (Sitting Bull), Hunkpapa Sioux~

This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Dakota Jack
snip
On Sun, 30 Jan 2005 14:11:24 -0500, Frank W. Zammetti
[EMAIL PROTECTED] wrote:
 I still don't understanding the 32 and 22... What do the [2] and [3]'s
 represent?
/snip

A total of three possible processes (1) getting the request; (2)
passing the request to another server; (3) handling the response.

If you have them all, you have a three.  If only 1 and 3, then you have a two.


snip
 If we are talking about dynamically-created resources, then I would tend
 to agree with your view.  But we have, at least as far as I was
 concerned, been talking about strictly static resources.
/snip

If there are static resources, then we can get it down to 22 versus 22
by sending the images to a separate server.  Not only can we do this,
but we can send the images to a super efficient separate server if we
are talking about static images only.

snip
 An app server running ResourceAction can serve resources more
 efficiently than a web server.
/snip

Not that an app server is faster under any circumstances tha a web
server.  That really is not close to true.  I've seen the stats on
that one and I would doubt that they will ever be the same or close to
the same.  I would be as SCHOCKED as you (is this an Italian-Jewish
SHOCKED? ///;-) ) in that case.  What I am talking about is a custom
server for images which gets rid of a LOT of baggage, including
WEB-INF but having the same protections as being under WEB-INF.

snip
 Again, strictly talking about static resources, I would be absolutely
 SCHOCKED to learn this is the case under most circumstances.  That would
 be like saying a Cadillac could beat a NASCAR vehicle in 1 ten-lap
 race... It might be able to under some circumstances, like the NASCAR
 driver being drunk!, and certainly there are some very nice trade-offs
 to driving the Caddy like more room and a better stereo, but in general
 you wouldn't expect the Caddy to lose.
/snip

In this case the analogy, IF apt, is the reverse.  The custom server
is the NASCAR.  All the doodads needed on an app or a web server can
be pealed off and serious savings with multithreading, parsing
presumptions, etc. can be realized.

snip
 A bit of hyperbole there, but the underlying point is what's important.
/snip

I enjoyed the ride in the caddy.  Had the stereo on a good jazz
station in my mind with Lead Belly growling at me.  The metaphor is
apt but really, when you are talking a mini-quick-custom server,
reversed.  I am actually surprised that there are not more of these
little speedy and specialized servers around.

Jack



This message may contain confidential and/or privileged information.
If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based
on this message or any information herein. If you have received this
message in error, please advise the sender immediately by reply e-mail
and delete this message. Thank you for your cooperation.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-30 Thread Frank W. Zammetti
Dakota Jack wrote:
The good is that the web site designer knows when a change has been
made and the assumption is that you are going to see what the web site
designer has to offer.  No?
Jack
I concur with the assumption, but I don't see it making any 
difference... Remember that what we affectionately refer to as the web 
these days is really a lot more than what it was originally.  One of the 
things that was originally intended is that the client is in complete 
control.  If the user wants to request a resource from a server, and 
they tell their browser via a setting that no, I WANT you to go ask 
that server EVERY SINGLE TIME for the resources, NEVER use what you 
might have in the local cache, then they should be allowed to do that, 
and whatever the web site creator wants you to do is irrelevant.  Same 
idea when the user can override fonts and colors and the like with their 
own local settings.

Nowadays though, us web app/site designers think WE know how best a 
client should view our site, and we actually go out of our way to make 
it so... how many times have you visited a site where the font is too 
small and the usual font size adjustments don't make any difference?  So 
you have to go in to setting and uncheck that User Font Sizes Specified 
By Site option.  Annoying, and not what was originally intended.

This is of course all only relevant to the extent that it supports my 
point, that anything you do on the server side to try and control 
caching is either (a) useless because the end user can override it 
anyway or (b) not in keeping with the spirit of the web, at least, not 
as originally intended.

Now I'm off on a bit of a tangent though :)
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


[OT] Re: JSP under /WEB-INF folder PROTOCOL PAGES (ProtocolPages)

2005-01-29 Thread Frank W. Zammetti
I marked my response as OT, I think we're going down that road (not 
exactly unusual for us)...

Dakota Jack wrote:
What I was getting at is the fact that if I return a page to the browser
that have ten images, all referencing ResourceAction, what's happening
is that the browser is making ten separate requests TO THE APP SERVER,
whereas in a typical setup, these requests would be handled by the
fronting web servers.  It's clearly more resource-intensive in your
approach.
/snip
I am not clear what part of the process you are referring to, Frank. 
We both agree that the first delivery of the page is via the front
server (I tend to only use the back server anyway).  
I wasn't clear on that part I guess, but it doesn't change my argument. 
 I guess your saying the pages aren't even JSPs, which is fine. 
Doesn't really change anything though except that there's no servlet 
involvement to serve the initial page, which is slightly better.  That's 
cool...

If there are
ten calls to ten images, as you assume for discussion purposes, then
there will be ten calls either way.  
That's correct.  Just basic HTTP here :)
 I think you are saying that in
addition there will be a penalty of a pass to a server that can handle
Servlets or an equivalent technology that will respond to the
ProtocolPage by routing the call to some Action, Command, or whatever
in some language, in the way I suggest.  Is that right?  If so, let me
know and we will go from there after you confirm.
That's it exactly.  The web server has to forward the .do request to the 
app server, which then serves the images, 10 total servlet invocations 
in all.  Yes, there would be ten requests either way, but one assumes 
that the web server can serve static content more efficiently than any 
Action you can devise.  Perfectly logical argument, ceteris paribus (I 
love using Greek in real conversations!), because that's exactly what 
web servers are optimized to do.

I wouild need, as you would too I assume, more information on the
actual penalty.  
Absolutely.  The only assumption I'm making is that there IS a penalty. 
 There are any number of factors that would go into how big or small it 
is, whether it's enough to outweigh the benefits of the approach.  I 
make no attempt here to reach any conclusion on the magnitude of the 
problem, if it is a problem at all.

 I suspect that it is relatively small and, when you
introduce sophisticated state and caching options, it may be faster. 
Relative to what?  To the web server dealing with it?  I would suspect 
it's actually relatively BIG compared to that.  I'm certainly willing to 
be proved wrong though.

I don't dismiss what you are saying.  Don't get me wrong.  I just have
learned to get the data and then to see what the real difference is.  
And I would agree that's the right frame of mind in all things :)  It 
may in fact be such a small penalty that it's worth ignoring.  I have a 
suspicion it's not, but without empirical data, it's just a hypothesis.

When considering costs and so on, I am not sure whether the balance
goes to which side.  I would suspect, from my experience, that
software maintenance and so on would clearly outweigh the hardware and
associated requirements.
That might be true... one other point to remember though is that the 
more unusual things you do, the harder it will be to get people able 
to maintain it.  I fight standards at work as much as the next guy just 
because creative people don't like standards forced on them, but clever 
solutions usual equal difficult to maintain solutions.  I don't think 
I'm telling you something you don't know :)  But, that's not my 
argument, so don't spend any time on it.  Just another side track we 
could go down :)

I am surprised at this.  You may be right, but my sense is that this
difference is not really that important when everything else is taken
into account.  Even if you had to cluster multiple machines instead of
one, say, as a ratio, that would seem to be *probably* cheaper as a
GUESS.  I don't know.  We could look at some data and if you have any
handy I would love to see it.
I don't have any handy, but I agree, some real data here would be better 
than us bantering back and forth for the next week :)  I suppose the 
simplest thing to do is set up a test where you serve 10 static images 
from a web server vs. 10 images from your ResourceAction with a web 
server in front of the app server and see what the overall response time 
is.  It would be a little rough, but at least we could tell if there is 
a perceivable difference or not.

Then we get into whether thousands of imperceivable hits accumulate 
enough over time to hurt us.  That's obviously far trickier to guage, 
but that's the kind of things us enterprise architects have to bother 
about. :)

I think the bigger hit is reading the danged thing.  This obviously is
especially so when there is an ongoing use of changing the JSP page. 
This has no penalty with ProtocolPages.
Not