神刀安全网

Replacing Celery with Elixir in a Python Project

I gave a talk at work yesterday about OpenRESTY , which I think is the easiest way to start scripting Nginx. Here are the slides:

SLIDES

One thing I’d like to add is that I don’t trust OpenRESTY as an app platform yet. The project is being actively developed and the author writes tons of good code, but he is but a single man. This means there is severe lack of tools and libraries in the ecosystem: they simply don’t exist yet.

On the other hand, OpenRESTY is a painless way to script Nginx with Lua and that’s something you can do with just the modules provided by OpenRESTY. Being able to communicate asynchronously with anything (literally: anything that wants to talk over sockets), including databases, external services and so on, is very nice thing indeed.

There’s one caveat though, which is that you can’t use any blocking (non-async) constructs, which includes using normal Lua sockets. This is not the problem in your code, but if you happen to need a Lua library which comes as a C extension, and if the functions in the library block, you will probably need to fix the C code. At this point it’s purely theoretical, because I didn’t encounter any such library yet.

Comments

转载本站任何文章请注明:转载至神刀安全网,谢谢神刀安全网 » Replacing Celery with Elixir in a Python Project

分享到:更多 ()

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址