Recently, our filtering worker that I wrote in Java, kept getting connection errors. The worker uses JDBC to connect MySQL server and do some queries. The errors are like this: [ERROR] Caused by: java.io.EOFException: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost. [ERROR] Caused Read More →

Recently, I’m trying to implement a real-time notification feature to our Rails application. Socket.IO from Nodejs is really a good choice, and since I’ven wrote pretty much code using Eventmachine, it’s really not hard to understand it. Turns out the real ‘bitching’ part is how to share sessions information and do authentication between rails and socket.io. Firstly, Read More →

Gisgraphy is a free opensource geocoding and webservices solution. It is a greate alternative to google’s geocoding API, which has lots of limitation on usage. Gisgraphy can provide the best relevance of geocoding, since it combines both geonames and openstreetmap dataset. In fact besides geocoding, Gisgraphy can be used for Reverse geocoding / street search, Street search, Find nearby, Fulltext search, Address parser. I’d recommend you go to their demo site Read More →

There are three classes in Ruby that handle date and time. Date and DateTime are both from date library. And there’s another class Time from its own time library. Both DateTime and Time can be used to handle year, month, day, hour, min, sec attributes. But on the backend side, Time class stores integer numbers, Read More →

Jekyll is becoming popular these days. It gives people the impression that it’s simple and fast for blogging. And besides, with the support from Github Pages, it’s attraction now not only comes from time saving, but also resource saving (money saving) as well. But after two days of learning and experiment, I finally gave up. Read More →