Spread and use Firefox
Advertise on this blog!
-->

Subscribe to my posts via Email


Delivered by FeedBurner

I'm an Indian
Darn proud of being an Indian!

Links...

Categories

Archives

Friends



Subscribe





External Links



You might want to check out...

Online Casinos - A guide to the best online casinos, gambling sites and casino bonuses

April 1, 2008

Startup Lunch - This Friday!

Ever experienced Speed Dating?

As finding friends/partners is to Speed Dating, finding investors/future-employees is to Startup Lunch.

Startup Lunch is an initiative on the lines of (and by) Proto.in and in concept, is very similar to speed dating.

The startup founders are seated on one side and the candidates get to say hello and have a quick conversation to talk about what the background of the founder is, why he started the company and what sort of person he is looking for, while asking questions to the candidate about the reason to join a startup and what his/her passions are and ten minutes later the same process continues with the next founder. Within an hour, you would have met/spoken to most of the startups, and by the end of the day would know whom to get in touch with for your first/next job.

The event, at present is organized across India - in Bangalore, Chennai, Mumbai, Delhi, Pune and Hyderabad.

Luckily, Pune’t meet has been clubbed with Open Coffee Club Meet. More details about the startup lunch are here

Its an unique opportunity for me - I’ve never met another budding entrepreneur in person - specially when he/she has a business plan in his/her hands. It would be awesome to see what all my peer fellas are upto. And specially important to see how ApnaBill.com is received amongst them.

Oh yes, I’ll be giving a short intro about ApnaBill.com at the Startup Lunch. More about it later…

Can’t really wait till Friday! Can you? :-)

February 10, 2008

Issues, issues and bugs - squashed!

This weekend, I was bogged down with concurrency related problems with ApnaBill.com - all of which were solved with the 62nd svn commit.

Different scenarios which we thought could have been possible

  • User A and User B both attack the same coupon at same time
  • User B tries to lock a coupon which was previously locked by User A
  • User A tries to lock multiple coupons at time - knowingly!
  • User A accidentally locks multiple coupons at a time

More problems arise specially when you have no control over the payment gateway pages (ie. when you are using a redirect to a payment gateway).

  • When does the timeout occurs
  • What happens if a timeout occurs
  • What if the transaction was _killed_ midway
  • How to deal with timeouts and locking/unlocking mechanism, etc


The newest addition to ApnaBill.com code in the payment gateway interaction arsenal

Luckily, almost all problems were solved for ApnaBill - All we expect from the user is to follow what’s shown on screen. Even otherwise, he should be good! For everything else - as they say - is the dear support staff :)

Like that alert box? Try http://www.bioneural.net/2006/04/01/create-a-valid-css-alert-message/

Hmm, I think, we should profile all the user displayable messages before we launch. I want to make sure that all have the same tone.

PS: Me and Sandy have never brainstormed more on any other issue than concurrency handling.

December 16, 2007

How to effectively deal with a redirecting Payment Gateway and prevent a possible DoS

I am at a position where I have to think in advance that how should I be coding the interactions with our (redirecting, not API based) payment gateway. What can be the best design practice - for us (as a coder), for our website (as a product) and for the end user (usability).

Keeping everything in mind together and working towards a solution is interesting. It made me think pretty nicely to come up with a solution which satisfies all scenarios (except the ones, over which I have no control).

Scenario

Your website X uses a Payment Gateway (PG). When a user Z initiates a transaction (Tx) - a Tx ID and amount value (minimalistic variables) are sent to the payment gateway. On the shopping cart side, the product which Z is buying, is locked inside the database so that some other user should not buy the same product. If the user makes a successful Tx with PG, your shopping cart is notified of the status & everyone is happy!

Problem Statement

Issues arise when the shopping cart is dependent on timeout values from the PG. There can be two worst cases in this scenario…

  1. The user Z closes the browser (before completing the Tx) after he successfully opens the PG. By doing so, your shopping cart locks the product in your DB but is never able to unlock it back (because you will never receive a timeout communication from the PG) - until unless you run a separate thread or a cron job which keeps on freeing up locked products based on timeout value. If you have a large online store, doing 10000Tx simultaneously, this problem would lock 10000 of your products for the entire timeout value (in case an attacker launches an intelligent DoS on your store).
  2. The user Z just keeps the browser window with PG open. A timeout has to occur before it is communicated back to the shopping cart.

Solution

Note - I have not yet implemented this in any of my products - this is just a theory!

In the first scenario, open up the payment gateway as a frame inside your website - with you controlling the top header like frame & the PG controlling the other frame. Further, create a constant pingback AJAX connection to your shopping cart through the top frame. Once the AJAX connection dies, you have an almost sure shot way of knowing that the browser is no more alive, or Z’s is no longer connected. Your cart logic can then take appropriate actions of unlocking your product. - This solves problem scenario 1

The second scenario is the worst of the worsts! Browser has not been closed, and the user Z can make the Tx anytime before PG expires his Tx. What we can try here is put up a javascript clock which keeps ticking like a timer - again, we can use our top frame as thats the only part that we control when a PG is displayed. This will keep informing the user about the urgency to finish the Tx. This timer can change colors from green to yellow to red, signifying increasing priority, etc. Moreover, on the server side - one can either have a separate thread/cron-job to unlock the locked products - or - before any new access is made to the locked up DB, the cart logic an check up which all Tx’s are in a stale state & free them up. This will surely slow down the system a bit, but this would almost render the DoS attack useless. That solves problem scenario 2.

This is just my maiden attempt at Payment Gateways. If you think, I can improve my idea, feel free to add your suggestions in the comments section.

ApnaBill.com would be definitely using some (if not all) of these concepts.

June 24, 2007

Opera Mini 4 - Early morning review :)

Its 6:33 AM now & I was about to go to bed before mom offered to make me some tea so I decided to pick up bro’s laptop & was checking out J2ME design patterns when I saw Opera Mini 4 Beta release news on Airlan San Juan’s Blog. I decided to give it a shot before I hit the sack!

The beta version is smaller in size than the 3.1 version - but packs a whole lot of cool new features!!!

The Beta version now has mouse support & panning/zoom support - something very similar to Microsoft’s DeepFish project & somewhat like the Series 60 Browser. The Beta still uses similar UI as used by the 3.1 version. Browsing was undoubtedly better with the Beta version as it rendered the pages (almost) exactly as they would appear on a PC browser and the ability to navigate to anywhere on the page using a mouse pointer was fantastic!

However, when the page loads - the text gets reduced to unreadable size. So if a web page is new to the user,  this method of pan & zoom is of little use because sometimes its difficult to guess where that interesting piece of information lies… The pan/zoom feature, btw - works even while the page is still loading.

The bugs - browser UI is very unresponsive. I had to wait for almost 2 seconds each time for the joystick click to actually fire the event. Uploading files is still not supported (not a bug, but a future feature maybe). And I still cannot set Google as my search engine at the home page screen :( - Moreover, AJAX is not fully supported - I tried replying to a scrap on Orkut & the event required a full page reload.

So, here are some screenshots directly from my Potato (E61).


Using Orkut - testing AJAX


Pan…


… & Zoom feature


A mouse makes life so simple!


Default search engine is still Yahoo & I cant change it :(

Verdict - Nokia Series 60 browser now has a serious competitor! But I wont be switching to Opera Mini completely till it will support file uploads…

May 9, 2007

JavaFX in action…


JavaFX running on my Ubuntu desktop

JavaFX from Sun - what makes it more interesting is that there’s also a Mobile version.

To try running the examples - head over to the OpenJFX website. You’ll need the javaws (Java Web Start) to run the examples.

April 16, 2007

Silencing a GLib-GObject-WARNING

When gcc tells you something like this…

(process:28965): GLib-GObject-WARNING **: specified instance size for type `MyObject’ is smaller than the parent type’s `GObject’ instance size

& you know that you’ve covered all the possible bugs in your object code - think again! Check your structure definition! Remember - the GObject & GObjectClass members in the object & ObjectKlass have to defined as instance variables, not pointers!

I did this mistake today & was then searching for my error from past 2 hours! Lol :)

BTW, just found out, GOB2 is a nice tool to generate code for glib based objects. I’m soon gonna give it a try :)

April 10, 2007

A good time to assemble the PC - AMD PC!

Just found out on Slashdot that AMD is significantly cutting down processor’s costs… Have a look at this article

Exposing a DBus signal as a Glib signals

Though there is no direct api to make this happen, one can easily route the DBus signal as a Glib signal.

All’s that required is to add a callback to the DBus signal using dbus_g_proxy_connect_signal and then emit the related GLib signal from that callback using g_signal_emit

Download the tarball :  GObject-dbus-signal-as-g-signal.tar.gz

This example contains a bare bones implementation of a new object which is derived from GObject - so if you are new to deriving GObject’s, have a look at the code - might be usefull :)

Dependencies to compile…

`pkg-config –cflags –libs dbus-glib-1`

If your pkg-config runs fine for dbus-glib-1, you can compile the example with “make” - i’m pretty bad at Makefiles, but i’m learning :)

April 8, 2007

The update is finally in progress…

Its 6:50 am in the morning & i’m still in the office… updating one’s website is one tough task! Even though the templates are available in abundance, modifying them to your taste takes a lot of time.

Anyways, I’ve finally settled the UI which is in place - check out http://www.makuchaku.info

For the lazy bums - screenshots as usual!


This time, clear distinction between techy & non techy users!

If you consider yourself techy then this will be your screen…

Otherwise, navigate through a much graphical screen…

As one can easily guess, my stress is on simplicity :)

& yes, many pages still give a 404 - Not Found. Reason being, i’m now feeling very sleepy! So today’s task was completed - the UI design is all settled, now just information has to be filled in. Good god! Thats _the_ biggest task!!!

April 7, 2007

A true Hero

Just spoke to Gaurav & found out that he’s enterpreneur’d http://www.hostcurry.com with a friend. & truly speaking, I’m really impressed. It takes more than just a business plan to start something like this - courage, time & ability to face an eventuality of heavy losses (personal & financial). I’ve been planning to start something but probably I’m not being able to chanelize my energies in this direction - or maybe my objective is far too cloudy to clearly look at it. Or maybe my prior commitments are too much for me to spend time on thinking about this.

Gaurav & Honey

So my advice to all those students out there - do it when you are not comitted to anyone - when you dont have to loose anything & risking things for a annual turnover is more gainworthy than sitting back & enjoying monthly perks!

So Gaurav, I’m interested to know that how are you going to keep the revenue stream inbound & whats different in your offering that people will come to you - maybe think about it & write something on your blog :)

March 8, 2007

I’m gonna get this one!


OpenMoko - Wiki | Review | Presentation

General availability would be late March this year & the device would be around USD 350

February 27, 2007

Managed to beat them all!

10-Jul-2005 - when I had registered MAKUCHAKU.INFO domain (infact it was a sponsored domain), I always dreamt of being on top of google search when “Mayank Jain” was searched. But MAYANKJAIN.{COM,FI} were already taken & since they were a direct hit for the search term, they always occupied a place above my website - & infact many Mayank’s were above me! It was *then*!

But have a look at this *today* - google for “Mayank Jain” & you’ll come across this…


Wow! makuchaku.info is right there - on the top!

& since google has indexed it with the Gnome Foundation post, this must have happened pretty recently - nice! :)

February 12, 2007

Expected - E90 announcement at 3GSM World Congress later today

I just saw on Mobile Gazette that Nokia might be announcing the Nokia E90 Communicator later today at the 3GSM World Congress. Wow - it can be a definite successor to my E61.

I have not seen much of E90 (its yet to be announced & Nokia was keeping its release under tight security), but what I saw & read at RingNokia, this little device would be the next hot gizmo I’ll be after! & this time, its even got a 2.0/3.2 MP camera (which incidently I miss dearly in my E61).

RingNokia says…

The E90 Communicator, one of the three devices Nokia is unveiling, is an update to a Nokia line that has achieved a kind of cult status among the geekier business set. It looks like a typical candy-bar- shaped phone, but flips open horizontally to reveal what is essentially a miniature laptop computer.David Petts, senior vice president of sales, marketing and services for Nokia’s enterprise solutions group, said the phone had all of the latest wireless technology, including Wi-Fi and what is currently the fastest form of 3G data networking, HSDPA, or high- speed download packet access. The screen on the new phone is wide enough to view full Web pages without having to scroll to the left and right, he said. The Communicator also has a 3.2 megapixel camera, and a video camera for teleconferencing that faces the user when the phone is flipped open. The device will be available in the third quarter of the year for about €750 to €800, or $975 to $1,040, without a contract, Petts said.

Boy… I just cannot wait to see how it looks like! But the price range might be a bit too high! :(

February 5, 2007

Downloading VMWare image for Bora…


Download the image

Thanks to Wahlau for the information :)

January 27, 2007

Getting past Display-Projector compatibility problems at events!

If you had been in my shoes today, you would have loved this idea - which just struck me!

My ATI display had a compatibility problem with the projector in room 407 @ GNUnify & I had to resort to using the laptops available with the organizers - which had a series of problems! How to get past such a thing if it happens again?

Very simple!

Start vino-prefrences on your laptop

Run organizer’s laptop with the projector

Use vncviewer to connect back to your machine for a full-screen display!

Voila! You’ll have your own desktop in seconds! - thanks to a cross cable or WiFi :)

But whatever problems or not, the organizers & about 97 student staff (as I was told) did an awesome job on the day one. Never was I left alone - a volunteer was always in touch with me, be it for breakfast, my badge, a copy of schedule, setting upt the laptop or anything!

Great job guys!