Flask at Scale (Flask如何适配到大型应用) - PyCon 2016 简明中文翻译

10 篇文章 0 订阅
本文简明翻译了PyCon 2016上的《Flask at Scale》演讲,针对如何将Flask应用于大规模项目,介绍了代码结构、模板、静态文件的组织策略,以及应对高负载的方法,如蓝图、装饰器、API版本控制、异步请求、Celery任务队列、负载均衡等技术。
摘要由CSDN通过智能技术生成

【未完待续。。。】

今年的PyCon大会,miguel grinberg 作了《flask-at-scale》演讲,提出了一些模式和最佳实践,来让微框架提升到下一层次

Do you think that because Flask is a micro-framework, it must only be good for small, toy-like web applications? Well, not at all! In this tutorial I am going to show you a few patterns and best practices that can take your Flask application to the next level.

视频:土豆网


听众对象:中、高级 intermediate and advanced Flask developers 

Scale是指:程序规模和负载 both in terms of application size and load 

  • 如何组织大规模的程序:代码结构、模板、静态文件 Large applications: How to organize code, templates and static files in a way that allows the application to grow without becoming a mess. 
  • 如何处理超大负载 Flask under load: Different ways to deploy a Flask application so that it can handle large numbers of clients. 

演讲目录:

  • Introduction (10 min)
  • 大型程序规模 Large applications (1 hour)
    • 如何组织大型程序(代码、文件)How to structure a large application
    • 使用蓝图来组啥 Using Blueprints to organize an application
    • 装饰器来简化代码 Decorators as a way to simplify application code
    • 网站开发和REST API相互绑定 Combining a web application with a REST API
    • API 用版本区分 API versioning
  • Flask应对大负载 Flask under load (1 hour)
    • 请求异步化 Asynchronous requests
    • 使用Celery模块来处理工作队列 Using a Celery job queue
    • 使用多进程及负载均衡器 Using multiple processes and hosts with a load balancer
    • 使用eventlet/gevent 高性能网络编程并发框架 Using coroutine frameworks such as eventlet or gevent
    • 使用WebSocket降低延时 Using WebSocket for server-push and reduced latency
  • Free-form Discussion and Q&A (50 min)





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值