Jul 09
Still remember the great company Caucho? Yes, it’s still alive. Besides its flagship product Resin, it also provides some open source libraries.
Actually, there are 2 remoting libraries you can use. One is Burlap, and another is Hessian. Hessian is the binary protocol implementation of Burlap. Burlap is xml based RPC. That’s quick easy to use in Spring framework, but 2 years ago, only be available in Java world. Now, it’s changed a lot. Take a look at Hessian, it’s pretty cool, so many implementations for different languages. Especially for Flex.
Hessian is very similar to AMF, but without any performance comparison, I don’t know which is more efficient. Anyway, we have one more solution for Flex Remoting, which from the Java world. That’s great!
Here is an example how to use Hessian in Flex.
Hessian: Flex Remoting Without AMF
Jul 03
昨天开始看 Flex 相关的东西,打算把一个现有的 Python Web 应用前端逐渐转换成 Flex。向 咖啡屋的鼠标 了解了下 Flex 如何与后端应用通讯,知道了一个新的协议叫做 AMF,是 Flash/Flex 原生支持的 RPC 协议,而且用起来也要比 XML 方式更加简单。
正好又一个 Python 的实现叫做 PyAMF 可以做协议的解析,很不错!
May 22
今天偶然间看到一个新的模板系统,叫做 Jinja (日语:神社)
这个模板系统采用了类似 Django 的 non-XML 风格,语法和 Django 非常接近!今天用下来发现还是比较不错的,模板可以使用表达式计算,这无疑比 Django 要方便的多,而且还支持模板级别的 Macro 功能,实在不错。
Feb 29
前天配置 mod_python 正恼火呢,没想到今天看到这篇文章,看来有同感的人真是很多阿。
#python.web 里面就建议大家不要使用 mod_python,列举了一些缺点:
- It complicates your upgrade process, as versions of Python, Apache, and mod_python must be coordinated. The appropriate versions are not always available for some combinations.
- It makes user separation or chrooting of webapps impossible.
- If you’re using PHP and mod_python, and you’re using MySQL in both languages, you generally must coordinate versions of MySQL as well, or suffer lots of configuration headaches. The same applies for many other popular C libraries.
- Apache’s processes will be heavier because you’re embedding a python interpreter in it.
Debugging a wsgi app is a lot easier.
- mod_python is a module for Apache, which is tested less than other well known Apache modules such as mod_proxy. Because of this reason the server administrator (which might not be you) might not want to install this module for security reasons.
- You wont find a lot of hosting companies offering mod_python, which makes wsgi applications (which can be deployed through several ways) very flexible in your quest for a hosting company.
总的来说,mod_python 配置有麻烦,用起来又占系统资源,真不是什么好的选择。用 FastCGI 和 SCGI 似乎是更好的选择。
Dec 25
最近用了下 memcached,把 per-4.com 的缓存换了下。
memcached 使用起来比较简单,安装后输入:
# ./memcached -d -m 2048 -l 10.0.0.40 -p 11211
就可以启用 2GB 的缓存了。
用 telnet 127.0.0.1 11211 可以查询 memcached 的运行状态,输入 stats 命令即可。
Recent Comments