Skip to content
gqlxj1987's Blog
Go back

今日阅读列表

Edit page

python爬虫

漫画抓取

关键函数说明:

def getImglink(page):
	imgsoup = BeautifulSoup(p.text, 'lxml')
	imglink = imgsoup.findAll('img')
	
for z in range(len(imglist)):
	img = requests.get(imglist[z-1])
	with open(str(z)+'.jpg', 'wb') as f:
		f.write(img.content)

async Servlet

servlet 3提供 async servlet的机制,

首先,支持@WebServlet的注解,

Tomcat’s Comet, WebLogic’s FutureResponseServlet and WebSphere’s Asynchronous Request Dispatcher are some of the example of implementation of asynchronous processing

tomcat io模式

三种策略:

protocol = 'org.apache.coyote.http11.Http11NioProtocol'

NIO + APR模式的库,这种模式是基于JNI的,即JAVA调用本地库的方式进行IO

tomcat对静态资源的处理

defaultServlet

zero-copy的特性,sendfile之上的tomcat

netty零拷贝


Edit page
Share this post on:

Previous Post
今日阅读
Next Post
scala学习第4天