Robert Zaremba Blog

Which technology for realtime communication for a web app?

Web is the main medium to share information and access data on internet. It is usually tight to browser - proxies/routers - web server. The main protocol is HTTP and most of the internet services are HTTP oriented.

HTTP at the beginning was only about one site communication: client makes a request to server and server prepares response. Now web is more then simple request response. It’s a medium for application. And applications often require more then a single site communication.

push notifications - often denoted as a mechanism which allow server to sent requests / events to a client.

There are a lot of solution to integrate HTTP with bi-directional communication, to implement push notifications for a web server.

Read more...

Which programming language you should use for a web backend

Probably a lot of business clients are worried about technology stack they want to use for their IT web services. Recently I was talking with some company about new project. They were concerned about technology they should use for their web startup.

It is a responsible decisions, and a lot of people have similar concerns. If you want to contract a serious project, you probably want to be aware about technology choice, you won’t end up in a dirty hole.

For a frontend you don’t have many options. You probably end up with W3C standards + JavaScript. For a backend the things are different.

Read more...

Emacs on fly syntax checking for Go programming language

Emacs is a great, flexible editor. Go is quiet new powerful programming language. There are a lot of blog posts about pros of both Emacs and Go.

Out of the box, configured Emacs looks like text editor for geeks. To make it more useful you need to spent a little of time and turn on some functions. One of the most desirable features for programmers is syntax checking, so the programmer don’t need to make to much edit-save-compile cycles.

Standard Emacs has Flymake built in package. But it is not fashionable. It’s generic and useful, but it’s configuration is awkward. To add syntax checking for buffers (emacs name for a file content) you need to write fight with Elisp (the script language in which Emacs is written).

But there is also Flycheck - new package which supersede Flymake. Essentially it’s “flymake done right”. If you are not familiar with it, I encourage you to read more on Flycheck project site and use it. Flycheck requires Emacs >= 24.

Back to the topic. Adding on fly syntaxt checking for Go programming language is relatively simple. Presented solutions are pure syntax checkers. They don’t compile or make cross modules checking.

Read more...

Wikipedia processing. PyPy vs CPython benchmark

Lately I’ve done some data mining tasks on Wikipedia. It consist of:

  • processing enwiki-pages-articles.xml Wikipedia dump
  • storing pages and categories into mongodb
  • using redis for mapping category titles

I made a benchmark on a real tasks for CPython 2.7.3 and PyPy 2b. Libraries I used:

  • redis 2.7.2
  • pymongo 2.4.2

Furthermore CPython was supported by:

  • hiredis
  • pymongo c-extensions

The benchmark mostly involve databases processing so I fought I won’t have huge PyPy benefit (since CPython drivers are supported by C-extensions).

Below I will describe some interesting results

Read more...