Implement a server that receives and processes client request(cassandra as backend), Python or C++?
I am planning to build an inverted index searching system with cassandra as its storage backend. But I need some guidances to build a highly efficient searching daemon server. I know a web server written in Python called tornado, my questions are:
- 开发者_开发百科Is Python a good choice for developing such kind of apps?
- Is Nginx(or Sphinx) a good example that I can look inside to learn its architecture to implement a highly efficient server?
- Anything else I should learn to do this?
Thank you~
Twisted framework is a good starting point for develop backend servers. It is fast and scalable.
Python is unlikely to allow you to write the most efficient server possible. However, it may just be that it will be fast enough, because for most applications it is.
Therefore, one path you could take is starting with Python. It's a great language for prototyping, much better than C++ for the stage in which you're not even sure which architecture to adopt. As you finish the project, you can see if Python is efficient enough. If it isn't and there's no easy way to make it much faster (such as rewriting a small routine that takes up most of the work in C), you can rewrite it in C++ using the Python prototype as a basis.
For search, http://github.com/tjake/Lucandra may be interesting prior art.
精彩评论