Thursday, November 6, 2014

Handling Concurrency



Programming languages offer various ways to handle concurrency. In languages like Java, concurrency is handled at library level, in other languages like Erlang concurrency is handled at language level itself.

Semantics of handing concurrency,
  • Locks/Mutex
  • Compare and Set
  • Copy on write
  • Event loop/machine
  • Messaging
    • Actor
    • Communicating via sequential processing (CSP)


Java language provides library to support Locks/Mutex, Compare and Set and Copy on write semantics.

Scala - a JVM based language provides Actor based semantic.

Ruby language provides Mutex based semantic and we also have event loop based semantic via external library (EventMachine.rb).

Node.js provides event loop based semantic at language level. At language level IO related events (such as Network, File system) are supported. Generation and handling of custom events also supported.

Go language supports Mutex based semantic and also CSP semantic via channels.

Erlang language supports Actor based semantic.

Wednesday, May 14, 2014

Paperstencil - cross between word processor and web form

Have open sourced our product - Paperstencil - cross between word processor and web form.

Paperstencil helps enterprises to roll-out data collection solutions, contracts, signatures, payment related solutions of their business needs in few minutes.

Wordprocessors such as "MS Word" are good for constructing documents. Web forms are good at validating and capturing user input. Meet "Paperstencil", a cross over product between Wordprocessor and Web form.

Features :

  • Create "PDF Form" like natural looking document without external plugins.
  • Validate and capture user signature and other user inputs such as address, email, date etc.
  • Constructed documents shall be viewed on both Desktop and Tablets without external plugins.
  • Constructed document shall be shared as web link, thus making it easy to embed in other web assets and email.
  • Table/Nested tables make it easy to structure custom page layouts.


Demo : http://www.paperstencil.com/demo





Monday, May 12, 2014

Web based opensource rich text editors for Tablet, Mobiles and Desktop


There are few rich text editors that depend on 'contenteditable' attribute of HTML5 to provide rich text editing. Author of codemirror  describes his experience with writing 'contenteditable' based code editor, and why he switched away from it. If support for 'contenteditable' is so buggy in desktop browsers, think about support for it in tablet/mobile browsers !!.

On the other hand, there are open source rich text editors built with web technologies that didn't depend on 'contenteditable' attribute of HTML5. Instead they depend on their own layout engine. Here are two opensource rich text editors that have their own layout engine,

Carota  : HTML 5 Canvas based rich text editor.
Demo is accessible at http://earwicker.com/carota/
Source is accessible at https://github.com/danielearwicker/carota

Firepad : Codemirror based rich text editor from Firebase.
Demo is accessible at http://www.firepad.io/
Source is accessible at https://github.com/firebase/firepad


Wednesday, August 28, 2013

Toast - My first startup exit

IP and assets of my first venture (xbrlware/bitstat) have been acquired by Frankfurt, Germany based financial services company, about a month ago. The acquisition process went smooth.

The acquisition brings logical end to my first venture. During our time in this venture,

  • We raised seed fund.
  • Assembled core team and created the product.
  • Generated revenue.
  • Acquired customers globally.
  • Acquisition of IP/assets by another company.

Toast time. 

Prior to acquisition, we were able to generate revenue from our product, but we couldn't grow at a pace that we had hoped for. Since then, we have started focusing on other opportunities.

Over last couple of years, have received four acquisition offer for our product/company. The first acquisition offer that we received was at early stage of our venture. At that time we were very hopeful of  our product future and turn the acquisition offer down without even considering it. If I look back now, our first acquisition offer looks very attractive (time window to revive that offer has gone).

Tuesday, July 9, 2013

Bridging digital divide in emerging economies

This post details about how things went till now, in our attempt at creating a solution to solve digital divide among members of Indian families.

Brief about our solution :

In emerging economics like India, not all members of a family are equal in their capability to access technology, due to language barrier to access them, demanding tech skills to manage them. Since, members of a family live & work at different places/cities/geographies, there is friction in sharing & consuming digital content.

Our solution is mix of hardware + software.

How things went till now :

1) Go to market on our own : Since our solution involves hardware, we were in need of good  capital investment. Approached few VCs & had few rounds of discussion with them, but things didn't workout. Below is the feedback from one of the VCs (Other VCs feedback were also in similar lines)

"In general, any hardware based models have a lot of complications due to inventory management, support infrastructure, maintenance and so on. That is the reason, you don't see much o single hardware product companies any more (Apple, HP, Dell, Samsung, LG, MicroMax, Sony, etc. etc.). They all reuse their distribution, manufacturing, procurement, and maintenance network very well. If I were you, once you have a product, think through whether you can sell the product through Micromax or some one like that and you getting a royalty.

The question is not about the demand, but, how you satisfy the demand without reinventing the whole wheel. My 2 cents."

2) Attempt at approaching an India based hardware vendor : Through friends, got an introduction to board member (who is also one of their VCs) of an India based hardware manufacturer. Pitched our solution to them, but didn't get any response from him.

3) Approaching Intel : Again through friends, go an introduction to Intel capital. Intel is trying to market their atom processor and working with other hardware manufacturers. Demoed our solution to them. They were also working closely with same India based hardware manufacturer, that I approached early. Not much progress here too.

4) Approaching Reliance : Reliance jio infocomm (Owned by Mukesh ambanis's RIL. RIL pumped $5 billion in this project) is launching 4G based tablet tailored for Indian audience. Initiated discussion with connections I knew at RIL. Again here is too not much progress after few rounds of discussion.

Wednesday, February 6, 2013

Indic language, Firefox OS App Days - Hackday

Have participated and demoed my app at Firefox OS App Day, in bangalore. My app was selected as one of the winner. Would be receiving Firefox OS developer preview phone as prize.



My app is about custom home screen, specifically tailored for Indian audience with Indic language support and Indic language keypad. There were more than 100 developers participated in the event and were around 15 hack demos. Was happy that many developers and mozilla team got excited about my app.


Sunday, October 21, 2012

Firefox mobile OS talk at JSFoo - Bangalore 2012

Have given demo oriented talk on Firefox mobile OS, at JSFoo - Bangalore 2012.  My talk was attended by around 60-80 members. Theme of my talk focused on introducing audience to Firefox mobile OS, creating FFx mobile applications using HTML, JS, CSS technologies.

Here is text-overview of my talk,

Android, iOS are 2 established mobile OS players in the Market. Windows 8 preview is available & Blackberry 10 are about to be released sometime next year. We also have Open WebOS from HP. FFx mobile OS is a new entrant to this space. In this session, I would be sharing my experience of what got me excited about FFx mobile OS & whats in there for web developers like you & me.

FFx mobile OS allows application to be created using JS, CSS, HTML. In fact, the only way we can create applications for FFx mobile OS, is using HTML technologies.

1) Hardware access :
  • To create Instagram like application, in order to store pictures being taken, application code need an access to device file system 
  • To create dialer app, application code have to interact with underlying telephony hardware.
How do we interact with underlying hardware from Javascript, if applications are created using HTML technologies? - Mozilla created WebAPI specification, FFx OS implements WebAPI specification & expose them as JS libs.

2) Bootup process :

Since applications are created using HTML technologies, when user switch-on the device, in order to render HTML components  FFx OS bootstraps Gecko layout engine. Gecko layout engine reads content from "profile" directory, loads "system app", once "system app" is loaded, it launches "homescreen app", all other apps are launched from homescreen app.

3) System App + Homescreen app :

Both "system app" and "homescreen" are created using HTML technologies. 10000ft view of layout of index.html of "System app" will look like a) top "div" container holds code related to notification/pull-down menu b) bottom "div" container holds code related to keyboard (which is hidden by default) c) Middle "div" container act as place holder for "iframe" of apps being launched. When user launches an app, FFx OS creates an "iframe", loads the app in that "iframe" & place that "iframe" inside middle "div" container. "z-index" of recently launched apps "iframe" is kept higher than other launched apps "iframe", so that user sees apps that he launched recently. "z-index" management is completely abstracted from developers.

Homescreen app shows a) Dock of commonly used apps b) Grid of installed applications c) Grid paging, if grid can't fit installed apps in single page.

4) Demo of creating apps for FFx mobile : 
  • Writing "helloworld" HTML page, test that in Firefox browser, add "manifest.webapp" to convert them as FFx mobile app. "manifest.webapp" is a JSON based structure that specifies a) app name (english and other languages) b) permissions c) Path to icon of the app d) web-activities declaration (web activity is similar to android Intent)
  • Porting famous "todo" app from Backbone.js to FFx mobile.
5) Touch event to mouse & keyboard event :

"helloworld" and "todo" apps are created for mouse click & keyboard based input system of desktops. But they worked as-it-is in touch based device. When user interacts with touch screen, touch driver generates event that contains a) cartesian coordinates of touch point, b) touch pressure c) touch area. These events reach gecko and gecko understands what component it rendered at the touch point and triggeres mouse click / keyboard event at DOM element corresponding to component at touch point.

6)  Logical layers of FFx mobile OS:

FFx mobile has logical names to various components that we have discussed,
  • Gonk - Device drivers (based on Android ICS drivers) + kernel
  • Gecko - Layout engine
  • Gaia - JS libs that expose underlying implementation of WebAPI spec + System App + Homescreen app


Here is presentation i used as supplement to my talk,