Haversine formula application in Python

I have recently enrolled to Introduction to Data Science. One of the very first assignments was Twitter sentiment analysis performed in Python. Leaving a whole lot aside, what captured my attention was a requirement to resolve tweets’ geocoded locations without relying on 3rd party services. The assignment paper suggested to Read more…

Concurrency patterns – Half-Sync / Half-Async

The pattern separates asynchronous I/O from the synchronous one. Main thread doesn’t block on incoming client requests and long-running operations are offloaded to a dedicated synchronous layer. Processing results are delivered by the means of callbacks. Application largely used in operating systems (hardware interrupts, application management) Android – AsyncTask (file Read more…

Concurrency Patterns – Monitor Object

The pattern revolves around synchronization. In short, concurrent threads (clients) can only use the object via a set of synchronized methods. Only one method can run at a time. Typically a synchronized method watches for a certain condition. However, there is no polling involved. Instead, the methods are being notified. Read more…

Concurrency patterns – Active Object

Active Object pattern decouples method execution from its invocation. Think asynchronous method invocation, callbacks etc. To avoid race conditions, incoming client requests are queued and handled by a scheduler. The scheduler picks a queued object and makes it run its logic. It is object’s responsibility to know what to do Read more…