Rewriting the network server

  • user warning: Table 'heartsweb.hearts_webcomments' doesn't exist query: SELECT COUNT(*) FROM hearts_webcomments WHERE nid = 4 AND status = 0 in /home/heartsweb/hearts.luispedro.org/includes/database.mysql.inc on line 172.
  • user warning: Table 'heartsweb.hearts_webcomments' doesn't exist query: SELECT c.cid as cid, c.pid, c.nid, c.subject, c.comment, c.format, c.timestamp, c.name, c.mail, c.homepage, u.uid, u.name AS registered_name, u.picture, u.data, c.score, c.users, c.thread, c.status FROM hearts_webcomments c INNER JOIN hearts_webusers u ON c.uid = u.uid WHERE c.nid = 4 AND c.status = 0 ORDER BY c.thread DESC LIMIT 0, 50 in /home/heartsweb/hearts.luispedro.org/includes/database.mysql.inc on line 172.

I started completely rewriting the network server today. I was a Qt-based network server. A nice idea, but I couldn't use it on my current server (without maintaining a copy of Qt on the server myself: too much pain).

I started rewriting it in Python and have almost all the functionality I had before.

I was amazed at how fast Python development goes compared to C++ (I wrote it in two hours) and at how small the code is (226 lines versus 2024 for the old code). Everything was designed already, so I only had to port it.

Now I have to think about how to design the next step: connecting it to a database which can be accessed from the webpage. Probably, I'll write my own drupal module for this.