Re: I have read and worked since 2 weeks ago

From: Mohsen Pahlevanzadeh <mohsen_at_pahlevanzadeh.org>
Date: Sat, 16 Jul 2011 15:38:51 +0430

Dear Amos,

I have good news: my boss agreed with migrate to 3.x.x milestone,
Amos, i accepted your suggestion and work on whois.c code.Your
suggestions is very logical,Now if you can get me an follow diagram of
squid such as following papre, i start code after your email:
http://www.squid-cache.org/Devel/papers/chadd-clientlet.txt
above diagram spoke in theory without code.i need theory + its
code.Unless i had hack it , and it's time-consuming!

Yours,
Mohsen

On Fri, 2011-07-15 at 04:00 +1200, Amos Jeffries wrote:
> On 13/07/11 22:22, Mohsen Pahlevanzadeh wrote:
> > Dear all,
> >
> > I have read and examined source code of squid 2.7 with GDB since 2 weeks
> > ago and i want to continue....Because i need to change squid source code
> > and add features to it.May be i publish my code.
>
> :( 2.7 has being declared end-of-life now. Will be obsoleted in a few
> months.
>
> If your changes are only small they might be ported to squid-3.
> Otherwise if you are planning anthing that might be big, please start
> with the 3.HEAD code. The data flow and layout are mosty the same, just
> differences in object names.
>
>
> > I have the following question, However i know this ML for contributor:
> > 1. If i want to add a port and myself read and analyze my data,(separate
> > form squid's data), how i do it? it mean What's algorithm of squid that
> > i can use it?(which loop, thread or fork? [i didn't see any thread],did
> > you rewrite C syscall and so on).....
>
> Squid was written in multi-threaded design before thread syscalls
> existed. Each "callback" function is a new thread segment within a whole
> request transaction. I/O events from the OS are the 'thread' starting
> points. Thousands of request transactions can happen in parallel since
> they are all interleaved within one OS-level thread. Data is a shared
> resource.
>
> So, *everything* uses ports to drive the event threads. They all start
> with a read/write/open/close/timer callback receiving data from somewhere.
>
> So for a brand new type of port you must create handlers for all
> relevant events. Each handler then uses whatever algorithms it needs to
> produce its output.
>
> Usually the *StateData objects you will see around Squid are the
> component state engines created by an open() or start() event which link
> the socket (FD) to all related handlers and data for that transaction.
>
> > 2. For each func, we have 3 steps: a.definition. b. call. c. Data
> > gathering.
> > I have problem with Data gathering of squid.for instance, what do i fill
> > StoryEntry data type variable?
> > stroeComplete or storeRelease or many
> > func use a set of data type that i have problem with them.i want to know
> > where,when,and which variables are initialized that i handle a http page
> > or http reply that it can store into storage.
> >
> > Yours,
> > Mohsen
> >
>
> StoreEntry is the small pipe buffer through which large data streams
> flow. (no joke).
>
> whois.c has the simplest code for writing to one. ftp.c, http.c,
> gopher.c, and store_*.c all have various other ways to do it. The
> actual creating and setup code is buried deep in client_side.c and
> involves copying meta data from the config file port settings and HTTP
> request headers.
>
> So.. start with passing Squid storeEntryCreate() details from an HTTP
> GET request ... um, sounds familiar?
>
> I guess you are still trying to "push" data straight to the squid cache
> despite advice to the contrary, true? So, why now?
>
>
> Amos

Received on Sat Jul 16 2011 - 11:10:12 MDT

This archive was generated by hypermail 2.2.0 : Sat Jul 16 2011 - 12:00:05 MDT