Forgot your password?

typodupeerror

Comment: Re:Start with scalable technologies! (Score 1) 274

The one other thing I missed is to also think of designing a service oriented architecture. Every role that your system has, such as authentication (I'd use OAuth2), should be its own service. By using clearly defined APIs, it will make it easier to replace pieces of your system with new ones (even written in new languages), and it will give you an interface to write tests against for your tests.

Comment: Start with scalable technologies! (Score 5, Insightful) 274

As someone who has written an application that scales to over 1 billion requests per day, let me offer my thoughts.

Scaling your application should be as trivial as launching more application server nodes. If you can't add/remove application nodes painlessly, you've probably done something wrong like keep state on them (this includes sessions).

Don't worry about scaling your application layer at all (within reason). You can always throw more machines at the application side in a pinch, and for a long while it will be cheaper to add servers than to hire someone. When your application servers are costing you more than a salary, hire someone to find the hotspots in the code and make them faster. Until then it's a waste of your time.

Scaling state, aka your datastores, is where the challenge lies. You need to spend a large amount of time sitting down and analysing every operation you plan to do with your data. SQL is great for a lot of things, but you will eventually run into a point where heavy updates make SQL difficult to scale. Mind you, decent hardware (lots of cores, RAM, and SSD) running MySQL should scale to several thousand active users if your queries are not expensive. The Galera patches to MySQL (incorporated into Percona XtraDB Cluster and MariaDB) can give you true high-availability, but you will still have write-throughput limitations.

I would also highly recommend you look into Cassandra (especially 1.2+, with CQL 3), which was built from the ground up to scale thousands of low end machines that often fail (if you can't tolerate hardware failure, you messed up). Cassandra is more limited in the kinds of queries you can execute, more relaxed with data consistency, and more thought is needed ahead of time. On the other hand, it can also be used for global replication, which is something you are interested in. At the very least, having a good understanding of its data and query model will open your mind to the kinds of tradeoffs that must be made to enabling scaling.

Contrary to what others are saying, you are correct to think about scaling now before you even start! Doing a rewrite is costly and expensive in money and time. Why set yourself up for that? Planning for scale before you start is the best time! If you start with a scalable datastore like Cassandra, and structure all your queries to work within its model, it is no more work than doing things in SQL, and you're way ahead of the game!

The most important part is spending time modeling how you will access your data. Think about how you'll avoid hot spots (which make scaling writes difficult), and think about how to make reads fast by reading as little as possible. Think about caching, and how you'll invalidate the cache of a piece of your data without having to invalidate caches for things that didn't change. (Think about updating on data ingestion instead of running statistics later.) If you can't avoid hot spots, make only small reads, and cache independently, you are not done.

Good luck!

Comment: Re:It's a flawed way to keep a site up. (Score 1) 978

by Impeesa (#43135803) Attached to: Game Site Wonders 'What Next?' When 50% of Users Block Ads
There was a time when Penny Arcade wouldn't even accept animation, too. This was also a time when I would still sometimes look at Gamespy, and every time I went there and found some obnoxious floating flash thing covering up the content I wanted to click, I made a point of closing it and giving one of Penny Arcade's ads a click instead.

Comment: Re:A most interesting question: What did they lose (Score 4, Interesting) 77

by MarkRose (#42723537) Attached to: Mutations Helped Humans Survive Siberian Winters

It wouldn't surprise me if I had one or more of these mutations.

I find temperatures above 21C unpleasant. In December, I slept a couple nights in -25 temperatures in a -12 rated sleeping bag and was perfectly comfortable. I rarely wear a jacket above 0. I've taken a 45 minute casual swim in 10 water in nothing but shorts and felt a little chilled but fine (though it was sunny).

But I pay for it in the summer. Once it hits 23 my brain slows down. Around 26 it completely shuts off. I've experienced temperatures up to 40, but I'm glad those days are rare.

It's easy for me to overheat. I went on a winter hike in -15 weather and ended up getting moderate hypothermia -- because I left dressed in a "normal" amount of winter wear and sweat my clothing through. I was steaming. Thankfully I had a change of clothes, and two hours in a -7 sleeping bag got me warmed back up to normal.

People think I'm weird for enjoying -30. But I'd much rather have that than 30. I still find it odd that much of the world lives in near-constant 30 and find those high temperatures comfortable.

Comment: Re:you seem to misunderstand colour temperature (Score 2) 421

by MarkRose (#42426507) Attached to: Cree Introduces 200 Lumen/Watt Production Power LEDs

Growing up at 54Â N, the "daylight" colour temperature setting on monitors never made sense to me. The closest to daylight was 9300K. It never made sense until I spent a week in LA one January and saw that the sunlight really was 5800K orange when you are that far south.

Beware of Programmers who carry screwdrivers. -- Leonard Brandwein

Working...