Synchronizing HTTP Requests with Netty
Norman Maurer
norman.maurer at googlemail.com
Thu Oct 6 01:37:57 EDT 2011
I wounder why you not just use a special extension for files that get
uploaded and hide them until they are complete ?
I think thats the best idea and you don't need to block anything...
Bye,
Norman
2011/10/5 michi <michi at cs.stanford.edu>:
> Hello!
>
> I'm writing a http-based static filer server using netty. It's very similar
> to HttpStaticFileServerHandler example, but in addition to reading files, it
> allows you to write files with PUT request. I'm trying to figure out how to
> synchronize http requests so that readers don't see files while it's being
> created.
>
> My initial thought was to use ReentrantReadWriteLock. Reader acquires a
> read-lock after receiving a request, and releases it in the
> operationComplete() call back. Writer acquires a write-lock after receiving
> a request, and releases it after receiving all the http chunks and writing
> them to a file. However, somebody pointed out that this approach might not
> work since ReentrantReadWriteLock allows a thread to get read-lock even if
> the same thread already holds write-lock.
>
> So my question is... what's the "netty" way of synchronizing http requests?
>
> Thanks!
> --Michi
>
> --
> View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/Synchronizing-HTTP-Requests-with-Netty-tp6863076p6863076.html
> Sent from the Netty User Group mailing list archive at Nabble.com.
> _______________________________________________
> netty-users mailing list
> netty-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/netty-users
>
More information about the netty-users
mailing list