Hi Jeff,

What you ask for it difficult, especially because we rely on pluggable HTTP
connectors that don't commonly provide this type of information. In Restlet
1.1, we will add new connectors (one based on Grizzly NIO) that will let us
have a direct control on the socket actions. At this point we might be able
to extract precise byte counts.

For now, I would suggest to look into lower-level TCP monitoring tools
available on your platform.

Also, I've entered a RFE:
http://restlet.tigris.org/issues/show_bug.cgi?id=286

Best regards,
Jerome  

> -----Message d'origine-----
> De : Jeff Walter [mailto:[EMAIL PROTECTED] 
> Envoyé : mardi 10 avril 2007 18:19
> À : [email protected]
> Objet : Re: Tracking exact amount of bytes transferred
> 
> Hey Jerome,
> 
> Thanks for your response.  This is the way I would have liked 
> to solve this problem (I also like the CountFilter idea), but 
> unfortunately I need a little bit more accurate information.  
> I did a simple test with a Directory and transferred some 
> files, and I notice the log is written before a transfer 
> completes.  This means that if a transfer doesn't complete 
> for some reason (like the client stops the transfer), the 
> bytes sent is the same as if the transfer completed.  
> Unfortunately I need be able to track the exact amount of 
> bytes transfered... thoughts? 
> 
> Best Regards,
> Jeff
> 
> 
> On 4/10/07, Jerome Louvel <[EMAIL PROTECTED]> wrote:
> 
>       Hi Jeff,
>       
>       The approach I'm using is to rely on the access log 
> information. The
>       default format record the bytes returned. You could 
> customize your log
>       format to add the bytes received too. Then, you can use 
> a tool such as 
>       http://www.analog.cx/ to generate reports.
>       
>       Another approach would be to plug a CountFilter between 
> your VirtualHost
>       and your Application. This requires to be in standalone 
> mode. This 
>       filter could override the beforeHandle() and 
> afterHandle() methods and
>       record the size of input and output entities to a 
> persistent storage
>       (file, db).
>       
>       Best regards,
>       Jerome
>       
>       
>       Jeff Walter wrote : 
>       > Hey All,
>       >
>       > I'd like to be able to track the exact amount of 
> bytes transfered to and
>       > from my Restlet Application, but I am not quite sure 
> what would be the
>       > best approach for this.  I was thinking about using 
> AOP to implement the 
>       > tracking, but was wondering if anyone had done 
> anything similar and
>       > could provide any insight/tips/suggestions.
>       >
>       > Thanks!
>       >
>       > Jeff
>       
> 
> 
> 

Reply via email to