`
pypy
  • 浏览: 90516 次
  • 性别: Icon_minigender_1
  • 来自: 南京
社区版块
存档分类
最新评论
文章列表
class AttrDict(dict): """ http://stackoverflow.com/questions/4984647/\ accessing-dict-keys-like-an-attribute-in-python http://bugs.python.org/issue1469629 """ def __init__(self, source): super(AttrDict, self).__init__( ...
http://en.wikipedia.org/wiki/Geohash 简单使用 geohash, redis,bottle, python-geohash 来实现 restful api的地理位置附近人搜素 from bottle import Bottle, run import time import json from redis_pool import Redis R = Redis().connection_pool() import geohash ...
http://www.buildcloudstorage.com/2012/01/can-openstack-swift-hit-amazon-s3-like.html
具体测试移步到下面的blog URL http://www.zmanda.com/blogs/?tag=swift-benchmark
http://ken.pepple.info/openstack/2012/09/25/openstack-folsom-architecture/
compile puppet scrip puppet apply modules/flume/manifests/init.pp --modulepath modules/flume/ [root@hz-ci-05 modules]# puppet master --configprint modulepath /etc/puppet/modules:/usr/share/puppet/modules [root@hz-ci-05 modules]#
非原创,来源互联网 In Brief WSGI is a specification, laid out in PEP 333, for a standardized interface between Web servers and Python Web frameworks/applications. The goal is to provide a relatively simple yet comprehensive interface capable of supporting all (or most) interactions between a Web server an ...
之前看swift的code主要关注在ring,proxy-server, object-server, container-server, account-server这些组件上,一次有人问我swift如何monitoring的,哦,fuck 我漏了这里,不过我想swift使用WSGI应该比较容易在filter加一个 侦测状态的filter_factory 到原有的WSGI的Pipeline,马上去翻code,果然,这货解耦做的很强悍嘛, https://github.com/openstack/swift/blob/master/swift/common/middleware/recon.p ...
1. 处理系统更新    建议每次都以一个zone为单位进行系统更新和重启。以这种方式进行更新,能使Swift集群保  持可使用和可响应的状态。另一个更新zone的明智的做法是,更新完一个zone时,先让其运行一段时间以保证之前的更 ...
配合 http://www.python.org/dev/peps/pep-0333/ http://pythonpaste.org/deploy/ 看下面的example(从网络上改造而来,出处URL也搞忘记的),很快会对python的paste如何组织wsgi有一个简单的了解, pastedeploylab.ini [DEFAULT] key1=value1 key2=value2 key3=values [composite:pdl] use=egg:Paste#urlmap /:root /calc:calc [filter:log ...
在做视频编解码的程序,需要fork子进程去调用转码的tools做encode, 这里面就需要能很好的控制进程,让进程类似于跑在沙漏里面,安全,可控的运行, 实现进程的管理接口,其实比较简单的,所有的进程信息来源,均来自 /proc 文件系统 因为是所有进程相关的信息都是通过读取内存proc文件系统,所以没有任何性能问题, tommy@tommy-desktop:~$ cd /proc/ tommy@tommy-desktop:/proc$ ls 1 1176 13 1340 14 1451 15736 20444 20460 240 33 4 ...
多进程环境下,打开同一个文件,进行读写操作过程中,如果其中一个进程删除这个文件,那么,另外正在读写这个文件会发生什么呢? 1. 正在读写的进程发生异常,因为文件被删除了 2. 正在读写的进程仍然正常读写,好像没 ...
Requirements     * Nginx 0.8.* or 0.7.* (with fastcgi and rewrite module).     * Webpy 0.32     * Spawn-fcgi 1.6.2     * Flup Older versions may work, but aren't tested. Resources     * Nginx wiki     * Spawn-fcgi     * Flup Notes     * You may replace index.py with your own file name.     * /pa ...

[置顶] worker pool

 
http://celeryq.org/ Overview This is a high level overview of the architecture. he broker delivers tasks to the worker servers. A worker server is a networked machine running celeryd. This can be one or more machines depending on the workload. The result of the task can be stored for later retr ...
遇到一台机器上部署多个不同的python程序,管理其之间import不同的libs而麻烦 http://virtualenv.openplans.org/ virtualenv通过隔离包目录和系统环境参数来实现多个相对独立的虚拟环境。 这样可避免过多的第三方库因版本依赖造成问题。 同时每个独立的虚拟环境只需通过打包即可分发,方便了系统部署。 1. 安装 [root@CT53-64-BASE ~]# pip install -U virtualenv Downloading/unpacking virtualenv Downloading virtualenv-1.5.1.tar.g ...
Global site tag (gtag.js) - Google Analytics