Simple question. Please give straight forward answer. From experience, I don't want to to use PHP even though it's like the easiest for me to use. I'm thinking about python + flat files databases per chat primarily but I don't know with certainty that this is the best combination. To be more specific about the project, I am attempting to build a better version of chatango etc. Thank you for reading and looking forward to a reply.
I'm curious - why NOT PHP as a back-end? Nothing wrong with using Python, I'm just wondering. Maybe you could look into using Node.js - it's a javascript-based server language, known for speed and efficiency (very good for mobile apps, interactive projects etc.)
Based on experience, it's not well equipped to handle extremely large websites without at least a thousand adjustments and addons. It also requires monitoring like if im not human. I would actually prefer to do this in php since it would streamline the process, but my concern for taking on such a large project is efficiency, not deployment speeds. I don't want this to crash on me and I don't want to have to go through hair pulling edits when upgrading. php5.5+ breaks all old 5.3 code for some silly reason and crashes with high load. thank you for suggesting, nodejs was one of my options, but it takes a little getting used to. I dont fully grasp it yet.
There's absolutely no reason PHP 5.5 should break 5.3 code, unless you've used some really unwise coding practices earlier - mostly what 5.5 does is provide some new functions and shorter syntax for a few things. But I would at least stay off flat-file backbone, I think - I dunno what kind of volume you're looking for, but I'm thinking that continous write/read operations to disk might turn into a headache pretty fast, unless you plan on running this on an SSD-raid-solution, which will turn expensive very quickly.
I was thinking flat files because I heard it was faster than mysql etc.. when it comes to i/o speeds. I do have ssd hosting in mind though but again, mysql is ideal for me since I ease of coding is a big deal for me. Flat files may be a headache but at the end of the day, it has phenomenal read write advantages over mysql. HOWEVER, it does not allow multiple writing sockets per instance. which is a huge no-no for a chat site. So I wanted an expert opinion. I recently did a project of 70k+ uniques a day. My base cms was vbulletin and my mod was a custom facebook-like notification system that would query the db every 10 seconds for any new pms or vm's. It was very minimal and the whole mod took about 2 queries max, I believe. Maybe even 1. However, with php5.5.9, the whole thing kept crashing, all the limits were being hit within minutes. It worked fine on my test server though which was running 5.4 at the time. I decided to play it safe and go way back to 5.3, and see if it handles anything better and it's holding up beautifully. Its not bad code though, its just some simple query's with ajax.
PHP or Python is not going to make much of a difference in this case. You will want to have a lot of JS to handle the messages/events so that is where most of your focus/optimization should be. Mariadb/mysql should handle this nicely. If you are hitting the limits so quickly then it might be an issue with your setup and not the application itself.
Yeah - not completely sure, but I vaguely remember something about PHP 5.5.x being a bit stricter on set limits (which of course can be overridden) - however, it shouldn't really make anything crash this badly - speed-improvement has been one of the major benefits of newer PHP-versions (normally). What kind of MySQL-wrapper did you use? Mysql_, mysqli_ or PDO?
mysql(). I discovered it was being depreciated for some reason. I believe thats where most of the errors came from. A roll back solved it beautifully. The cms I was integrating with vbulletin was already coded in PDO so there were inconsistencies everywhere. Not to mention vb wasn't made to integrate with anything else so it was as if trying to put a round peg in a square hole from the beginning. But no matter, php5.3 can power it and I have no issue so far. Havent even needed to reboot it for about 2 months now and no new error logs. Thanks for the input, I think I will use PHP and Mysql then. I want to ask another question though. The scope of the project is imagined to hold millions of chat records. Should I create a separate table for each chat or should I put all into one table.. Or should I create a new database for each chat room. Which is best?
Millions of rows aren't really that bad -you could create a table for every started chat, but that would probably have you reaching table limits - I would suggest adding rows to same table (maybe one for each chat-room, or user) - and prune the database from time to time - what you could do is after a chat is closed, leave it (for history or similar) for a while, and if it's not accessed again, and you still want to keep it, save to a "stored chats" table or separate database.
That's a good idea. I can easily create a script that would generate a file backup system monthly so users can access their old chat rooms via file download, while being out of the database. Thanks for the feedback.