I work in a ticketing company, where scaling is often difficult because of peaks in sales. For example, the traffic on ticket shops dramatically increases when tickets for famous singers go on sale or when large theaters sell their annual subscriptions.
Yesterday, tickets for a famous french band went on sale. Let’s have a look at the graph of the cumulative number of sales.
This is quite a typical distribution when the opening time for sales has been advertized beforehand, most of the tickets are sold quite quickly.
If we look at it more carefully, we can clearly see that there are two different parts in the graph:
Gatling 2-M1 was just released, with a completely new injection API. Now one can easily define some custom injection functions. Gatling also comes with some nice predefined functions which we are going to use to try to reproduce that distribution.
Let’s consider this code :
setUp(scn.inject(heaviside(2400 users).over(30 minutes),
ramp(340 users) over (30 minutes))
.protocolConfig(httpConf))
It’s now time to compare the simulated load with what we observed earlier :
By trying to reproduce accuratly some patterns observed in production you definitely have the keys for making your website ready for high traffic.
It’s now almost two years since we came back from our trip around the world. Given the duration of the trip, I didn’t took so many photographs but still, there was about 60 rolls to develop, to scan and to go thru. So yes, it took me two years to process that but I’m quite thrilled to be able to share some exciting memory of that trip with you now.
See the photos here : http://nire.free.fr/rtw
Last night was the second occasion for me to give a public presentation of Gatling ; an open-source load testing tool. I have been a contributer of the project for the last months after using it at work and have been very excited about it. I hope this presentation gave you a good idea of what the tool is capable of.
Being able to print something on a Canon network printer (C5030i) from an Ubuntu 64 bits machine could be quite a pain. I spend a bit of time to have it working and I’m keeping here my notes.
The community has been asking for a packaging for the Canon UFR II driver and some of the tricks listed here have been found in the comments of the Launchpad issue1.
# convert to deb files
sudo alien -d --scripts cndrvcups-ufr2-uk-2.2.20-1.x86_64.rpm
sudo alien -d --scripts cndrvcups-common-2.20-1.x86_64.rpm
# install the packages
sudo dpkg -i cndrvcups-common_2.10-2_amd64.deb
sudo dpkg -i cndrvcups-ufr2-uk_2.10-2_amd64.deb
/usr/share/cups/model
folder./usr/lib64
which is not standard on a Debian machine. So, edit /etc/apparmor.d/local/usr.sbin.cupsd
and add these lines/usr/lib64/cups/backend/cnusb Uxr,
/usr/lib64/cups/filter/pstoufr2cpca Uxr,
ln -s /usr/lib64/lib* /usr/lib/x86_64-linux-gnu/
sudo apt-get install ia32-libs libjpeg62:i386
Try to print a test page and enjoy.
The engineers at Instagram put forward a challenge for coders to unshred this chopped up image. See the original post on their engineering blog : Instagram Engineering Challenge: The Unshredder.
Here are the input and target output images:
I wrote a solution in Python that resolves the problem; here is the basic idea of the algorithm :
The bonus question was to guess how wide the uniform shreds are. I proceeded this way :
For more details, see the code in my repository on github