----- Original Message -----
From: "Ravi Sharma" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Friday, August 15, 2008 8:47 PM
Subject: Redirection
Hi,
I have the following scenerio.
I have a site which provide music online. Now for hosting the actual song
i
have purchased another site with better band widthm but no tomcat.
So my webserver(tomcat) is running on one server(say domain1) and files
are
hosted on another (with different domain name say domain2, which anyone
can
access using http).
Now i have to put http://domain2/abc.music on my site to access these
files.
Now i can do something like that write a normal Servlet which receive song
id and i forward it to appropriate link(http link to another site
domain2).
but when someone start downloading they see that data is coming from
domain2, i dont want user to see domain2, and also i can not do somethin
like when user request any file first get it on to domain1 server and then
provide it to user as it will be too much bandwidth wastage.
So is there any way to do this using anything in apache,tomcat to hide
domain2 from everyone.,
Thanks,
Ravi.
Ravi, its interesting...
I kinda like the idea of using Tomcat as the "brain" and other distributed
servers as work horses... its the way the internet works...
Its all really easy... because browsers come back for info...
So you can send a lite "brain" page from TC and let all the image links come
from somwhere else... so I think that how you should be thinking.
------> brain page -----> browser
foreign server<----------- browser sucking from other servers
But you cannot try hide a site... say because the user should pay for the
music... you'll get hacked to hell... so you have to have some kind of
security, and you are going to have some logic on the foreign sites.....
For that, I would read up on something like kerberos... not that you'll have
to impliment it, but just the idea of one server issuing a ticket, that is
then a password into another server....
And I'd need to think about it a little, but I think you could do it all
with global cookies.... which we'll now call tickets...
So what happens now is that TC is picking up very little heavy traffic... no
big music files... and the user gets a page from TC that says... " you got
10 mins to get your music files".... from these links....
So in that way you could have cheap SP's on apache with a tiny little bit of
PHP/CGI... and one or two TC's serving millions of requests...
Thats the way I think I would go....
Great project....
Oh... BTW redirection (I think) is definitely not the way to go....
redirection is very ineficient because its round trips to browsers... good
for, we have a new site, or down for maint... but not a good idea for a
heavy site like you into... you lucky, I'd luv to climb into something like
this ;)
Once you have figured out the ticket scheme... you can then even hide the
links in Ajax... so it just happens and it happens either down loading or
plays in a flash player or whatever....
I'd also climb into a Utube type site and open up there source to get more
idea's...
Have Fun...
---------------------------------------------------------------------------
HARBOR : http://www.kewlstuff.co.za/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
See it in Action : http://www.kewlstuff.co.za/cd_tut_swf/whatisejb1.htm
---------------------------------------------------------------------------
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]