20 April 2012
When you have plenty of Symfony2 applications and you need to deploy them from time to time, you are probably sick of thinking about every activity you need to do for every deploy. Often people use some build scripts, which are hard to maintain and tends to be unreadable. I wanted to automate it as much as it possible and I’ve choosen Ant, to help me out.
Actually Ant is choice, due to other fact – it can be easily used with Continous Integration server like Jenkins, while ssh scripts often generates some problems. With this aproach all you need to have Ant binary on server and build.xml config in root folder. You can have different targets defined in config and chain them using depend attribute. So in this case you can have target for building project on production server (usefull for continous delivery) and setup for Jenkins.
Read more
13 March 2012
Sometimes I wonder what should be the most suitable stack for handling huge traffic. Let’s consider online gaming portal, like http://ru.partypoker.com They don’t provide traffic stats, but we can imagine scalability issues they struggling with. Alexa.com states, that http://ru.partypoker.com has 674 Global rank if it comes with traffic, so this number speaks for itself. So which tools should you use, to build reliable and responsive system like this? For sure, there must be optimized servers infrastructure. Master-slave setups of database servers (like MySQL), reverse proxy (like Varnish) and load balancers (Squid should do his job here). Of course we need to think about highly tuned webservers like NGnix with FastCGI server side engines (PHP, Python or Ruby should be fine). Also some cache mechanisms should be considered. Memcached is one of most known tools for handling in-memory cache and besides its great results it’s very easy to implement and integrate with existing libraries and frameworks . The last, but not least is handling static content. The only way of doing it right is to use CDN. You can setup your own CDN or use something existing, like akamai.
The servers setup is one thing, but other thing is developing code for such system. In my opinion NoSQL solutions comes for the rescue. Tools like MongoDB, CouchDB or Redis have been created with approach for handling big amount of unstructured data. Also they are crafted to work in high load. I have seen MongoDB database with 50 000 000 of records working smoothly and without any problems. We’ve done a benchmark to fill that collection and query it and results impressed us. I don’t think that we could achieve same thing with any MySQL setup, even with first class hacks and tweaks.
Read more
10 February 2012
As you probably have noticed, PHP 5.4 is around the corner. As far, there’s Release Candidate 6 available and final release is a matter of weeks. Let’s have a look at new features, that will make PHPers live easier.
Read more
25 January 2012
In my previous post Modern framework comparison I presented performance tests, which compared Ruby On Rails, Django and Symfony2. After recieving a feedback in comments I decided to run this benchmark one more time on my own laptop (instead of on my hosting). The reason was simple: enviroment was outdated. I installed mod_python and configured it easily and struggled about one day with phussion passenger (AKA mod_rails) with ruby 1.9, but finally everything works. The results is compared in table below.
Read more
18 January 2012
How many times were you curious which one of, modern web frameworks is the best? For developers who have their favourite, answer is simple. But there are plenty of questions from begginers or devs who want to learn new technology, wondering which one should take, to stay on the edge.
Read more
30 December 2011
As year 2011 is going to end very soon I did a little recap of things occured on this blog during this year. I wrote 18 posts, which is more than in a previous year (it was 11). Readers left total number of 43 comments. This blog has been visited 58% often than in the previous year with 200% more actions performed. In the December I switched layout (with help from Chilid team), which made it more readable and easy to use.
To sum things up: that was good year, but next is going to be better :-) Thank you for reading my articles and don’t hesistate to leave comments and suggestions about improvements that you can see.
Read more
8 December 2011
Today I proudly present a brand new blog layout. Thanks to Chilid New Marketing Agency from Gliwice, Poland now blog is more readable and minimalistic. I need to admit that cooperation with Chilid was awesome – they clearly understand my needs, did great graphics and creation and communicated very well. Thanks again to Ania, Tomek, Patrycjusz, Marcin and Adam!
Read more
23 November 2011
Gliwicki Software House XSolve poszukuje programistów PHP, Java, .NET, a także Functional Designerów, Solution Architectów, sysadminów. Jeśli jesteś jednym z powyższych i masz ambicje tworzyć oprogramowanie na najwyższym poziomie, dla klientów z pierwszej ligi – zobacz co oferujemy i aplikuj!
Więcej na Praca XSolve oraz naszym profilu XSolve Jobs
Read more
1 November 2011
Recently I did a lot of Test Driven Development on my Symfony2 bundle. I used PHPUnit’s built-in mocks and stubs for many projects, so I took it again. But while I was working on mocking Symfony2 core objects I found those mocks very uncomfortable in use. I tried Mockery and it saved my day. Let’s see how to get it working with Symfony2 and how it kicks ass!
Read more
23 October 2011
Generally, it’s not a good idea to unit test protected or private methods, but in some cases it could be useful. Of course we don’t want to change our class contract, and expose those methods as a public ones, just becasue we want to test them with PHPUnit. This case can’t be solved with Proxy-Object library. It provides easy-to-use way to get protected classes to the surface. More about that is here http://blog.bastian-feder.de/blog/029_proxyObject.html. Here I’ll show how to integrate proxy object into your Symfony2 application:
Read more