Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>That's a good question and here's an attempt at answering it.</p> <p>I believe you are thinking about scalability a bit too early. Your IM app might not reach the projected number of users for it to stop performing well. Consider enhancing your small product and <strong>scale as you go</strong> as much as is needed. </p> <p>Disk I/O is one of the issues that you will face scaling your web application. Storing communication directly onto the disk with txt file might not be a reliable solution.</p> <p>Push your <strong>technology stack</strong> to its <strong>limits</strong> before considering changing it or switching to something else. I assume you are using a relational database for your storage (since you mentioned columns and rows, which is not an ultimate indicator but still), there are other options out there that have good benchmarking results at the expense of multiple other compromises. (NoSQL: which you referred to as BigTable) is one option. Relational databases are great, they have been for quite a long time the industry standard but currently there are alternative solutions that are quite promising.</p> <p>Look into NoSQL document based datastorage solutions such as <a href="http://www.mongodb.org/" rel="nofollow">MongoDB</a>, <a href="http://couchdb.apache.org/" rel="nofollow">CoucheDB</a> or even <a href="http://cassandra.apache.org/" rel="nofollow">Casandra</a> and there are many others. There is a considerable amount of information about the performance of each, under specific circumstances and <strong>situations</strong>. Choose what is <strong>best for the problem</strong> at hand and not what is most fashionable or hipped.</p> <p>Another option would be to <strong>outsource</strong> your scalability problems to a 3rd Party provider such as <a href="https://www.firebase.com/" rel="nofollow">Firebase</a>. In this situation all you have to worry about is your product and not what's happening under the hood.</p> <p>Store only the data that you need and archive or dismiss what you don't.</p> <p>With scalability there are generally 2 broad categories: Horizontal and Vertical scaling. </p> <ol> <li><p><strong>Horizontal</strong>: means adding more nodes to your system i.e. adding more server instances to handle the extra load. There are many cloud solution providers out there that make this genre of scaling very cheap and instantaneous.</p></li> <li><p><strong>Vertical</strong>: means adding more resources to the node you are currently running your app from in addition to use specific technologies that allow you to take full advantages of your resources. This optimization happens on the level of the instance resources (i.e. CPU, RAM, Disk Space etc...) and your data storage, programming language of choice, algorithms you are using etc... You might realize that php and mysql aren't the tools for this job, but that's arguable. </p></li> </ol> <p><a href="http://en.wikipedia.org/wiki/Scalability#Horizontal_and_vertical_scaling" rel="nofollow">Read More about it here</a></p> <p>Distributed Systems architects / programmers also take advantage of other (faster) programming languages at runtime (such as C, C++ or even Java) to speed up certain tasks. Look into how you can dissect your application into smaller <strong>decoupled</strong> modules / components that can run independently. (But i'm not sure if you will ever reach this stage with an IM client unless it becomes as popular as Whatsapp or Facebook chat).</p> <p>I advise you to grab and read a couple of books about scaling web applications and leveraging cloud computing. Study scalable architectures and design your application depending on your business logic based on them.</p> <p>This is a very broad and complex topic, I'm sure others might have additional interesting insight on the matter.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload