Perlbal - How does Perlbal translate URLs?

This is Interesting: Free IT Magazines  
Home > Archive > Perlbal > August 2007 > How does Perlbal translate URLs?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author How does Perlbal translate URLs?
drpr0ctologist@gmail.com

2007-08-18, 7:11 pm

How does Perlbal help in translating real URLs to MogileFS URLs? For
instance a client requests www.site.com/hi.jpg. Perlbal translates that
into mogilefs.site.com/234234.fid, then fetches it and returns it to the
client, is this correct?

Or does it have to be the application that processes this?

drpr0ctologist@gmail.com

2007-08-19, 7:11 pm

>
> Perlbal doesn't translate it, your application does.
>
> User requests hi.jpg
> Perlbal forwards request to application
> Application returns X-REPROXY-URL: 2342342.fid
> Perlbal requests 2342342.fid and returns it to the user



Suppose I go directly to 2342342.fid in my browser (not using Perlbal).
Would this lead to the image showing up?

Also, do I need to use Perlbal in order to use MogileFS?

dormando

2007-08-19, 7:11 pm

drpr0ctologist@gmail.com wrote:
> Perlbal doesn't translate it, your application does.
>
> User requests hi.jpg
> Perlbal forwards request to application
> Application returns X-REPROXY-URL: 2342342.fid
> Perlbal requests 2342342.fid and returns it to the user
>
>
> Suppose I go directly to 2342342.fid in my browser (not using Perlbal).
> Would this lead to the image showing up?
>
> Also, do I need to use Perlbal in order to use MogileFS?


You could, but... why not just use perlbal? Mogstored is already a
perlbal. Just go all the way Perlbal does return request buffering,
upload buffering, header caching...

After seeing a bunch of your questions to the list, I'd highly recommend
just installing an instance of this guy locally and playing with it for
a few hours.

Set up a DB, mogilefs tracker, storage, perlbal, and apache+language on
localhost somewhere. Have perlbal talk to apache, then fiddle with small
application scripts until you get it right.

(and to answer your question, just think: If you request hi.jpg and your
application looks it up via key in mogilefs, what will happen if you
request a 135921352135.fid through your application?

fid's are also ephemeral! If you replace a file it gets a new fid. Not a
good thing to use as a permalink anywhere.

-Dormando

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com