• Validating Google Play Store Receipts Using Elixir

    Since I’m writing game servers and our company is making money from games, this topic has lately become of specific interest to me. It was not as straightforward process I’d hoped it to be so I decided to write down the solution in case someone else is doing the same thing. I’ll describe here the technique for validating the integrity of the receipt using the given signature. You might want to perform few more checks to the content of the receipt, in case someone would be sending a valid receipt and signature pair, but for a purchase that has already been processed.  ...

  • Thoughts About Elixir

    I’ve been programming Erlang for several years now and have always liked it. Erlang syntax has it’s quirks, but I’ve always considered OTP so cool that I don’t mind all the braces, colons, semicolons and stuff. Then I heard about Elixir that runs on Erlang VM, has a Rubyish syntax and can take advantage of all the cool stuff that the Erlang OTP offers. It took a while for Elixir to reach version 1.0 and become really a viable option for developing server software, but I really think it’s now there and I though that I should write about why I think so, and why I’m probably going to do more Elixir programming than Erlang programming in the near future.  ...

  • String encodings in Erlang

    Erlang is famous for the way it deals with strings. Being that strings are “just a list of integers”. Sounds easy, doesn’t it? I’ve been having some issues with Erlang and UTF-8 strings lately and I thought I would write down some of my findings here.  ...

  • Playing Around With Openstack's Object Storage

    Couple of weeks ago I found out about the Openstack project and I found it immediately to be very interesting. What I’ve been playing around with the most is the object storage part of Openstack called Swift. I’ll show here how you can use Swift with a couple of different libraries. The nice thing about Swift is that it is basically the Rackspace Cloudfiles storage, so the same libraries that work with Cloudfiles, should work with Swift as well. Well, they require some small modifications. But, I’ll show you here two libraries that I know are working already. Of course, you will need a Swift instance running somewhere and instructions on how to setup one you can read the “Swift All In One” document that shows how you can run Swift on a single server.  ...

  • Exercise in Python Decorators

    Recently, I found myself in need of a web server that I can use to simulate a behavior of a certain website. I wanted to just copy the output of that website and deliver it using this web server. The problem was that serving static content is naturally way faster than serving dynamic web application, so for my simulation I needed to make the web server wait for a certain period of time before returning the static file. Being a Python fan I decided to use Tornado as the web server. Now, all I needed to do is slow it down.  ...

  • Generating random strings in Erlang

    I could not find any decent examples from the web on how to generate a random string with a certain set of characters and length in Erlang. The basic idea for such a method is to take a string of allowed characters and loop N times where the N is the length of the resulting string. Then at each loop we take some random character from the string that contains the required set of characters. Sounds relatively simple, right? Next we have to write this in Erlang. This is what I came up with…  ...

  • Automatic code reloading in Erlang

    I’ve recently got back to coding Erlang and noticed a neat module that I didn’t know existed that is probably worth writing a blog entry about. I’ve started developing a PubSubHubbub hub in Erlang called Hubbabubba and I’m using the great Mochiweb HTTP library as the HTTP server implementation. I discovered the reloader.erl module that comes with Mochiweb. It automatically reloads the code when you have the application running and you modify the code (remember to compile as well). This is something that I’ve found very useful when developing with Django or AppEngine and I’m really satisfied that there is a similar solution for Erlang as well.  ...

  • Using zc.buildout in a Twisted project

    I’ve been learning how to use zc.buildout in my Python projects. It seems to be used mostly by the Zope and the Plone communities, but I feel that it might be a useful tool to be used in any Python project. I do lots of work with Twisted and I wanted to try zc.buildout with a Twisted project. It wasn’t trivial and I wasn’t able to find any good examples, so I thought I might as well document my experiences here.  ...

subscribe via RSS