Recently I learned Lua, we need it to co-work with existed C code(HTTP server).
From Lua books, we know that there maybe to way to make them co-working:
- From Lua, you can wrap C code in share library(
xxx.so
) that Lua userequire
to import them. - From C, you can use existed Lua API to operate on
lua_state
, it's some trick but it works well.
I adopt both of them and everything seems great, by using Lua we can save a lot of time to implement our business logic. But I'm quite nervous about current architecture, although there was no serious problem in it, I always worried about it, if there was some thing happened, for example, serious performance bottleneck, memory related and so on.
Is anyone got rich experience in this, please give some some advice. Thanks.