Serving images over http using Netty
Drew Kutcharian
drew at venarc.com
Tue Jun 21 00:51:38 EDT 2011
Hi Everyone,
I would like to know what's the best way to serve images that are hosted in a document database using Netty.
I'm new to Netty and I started looking at the the HttpStaticFileServer, but I don't think that would be a good example since, it uses RandomAccessFile and does a lot of "file dependent" things.
I will only be sending small images, so I was thinking I can just read the whole byte[] from the DB and then use Netty to send it to the user.
What is the fastest/optimized way to do this? How should I configure Netty? What should I include in the pipeline? What kind of ServerSocketFactory and ThreadFactory should I use?
In addition, how should I handle the database connection?
Thanks,
Drew
More information about the netty-users
mailing list