Fish

Saturday, December 8, 2012

ATT Unlock iphone device/sim

I wanted to unlock my iphone so that I can use other carrier's sim, ATT has this online form 
where you can simply submit the request online and you will receive the instructions once iphone is unlocked.

Here is the eligibility requirement to unlock iphone:

General Eligibility Requirements for Unlocking iPhone

AT&T will unlock an iPhone under the following circumstances:
  • The person requesting the unlock is:
    • a current AT&T customer or
    • a former AT&T customer who can provide the phone number or account number for the account
  • The iPhone was designed for use on AT&T's network;
  • All contract obligations, including any term commitment, associated with the device to be unlocked have been fully satisfied; and
  • The iPhone has not been reported lost or stolen.


Promote your blog

Saturday, November 10, 2012

IOS Iphone and Ipod Multiplication App For Kids

I created an IOS Multiplication App for practicing multiplication. It has Learn, Practice and Test features.
Its now available on iTunes app store. Here is the appstore link to it:

and here are some more screenshots of app.





Wednesday, June 6, 2012

Redis: LPUSH Command

Redis is a key value store. I recently used it in multiple projects and quite impressed by its simplicity and performance. it can be used for caching and storing simple nosql data.

In my later blogs, I will explain how to use it as reliable queue using RPOPLPUSH command. Before looking at that lets look at LPUSH command. LPUSH command works on Redis list data structure and it inserts an item at the tail of the list. Following shows it nicely:


Redis LPUSH Command
REDIS  LPUSH COMMAND




Promote your blog

Thursday, May 31, 2012

HBase Secondary Index: Scaning Using Multiple Keys

In HBase one can define row keys to store primary key and do scan using partial or full row keys as explained in previous blogs but what if we need another dimension to do search? That is we may need do a look up based on some other field which is not in our primary table row key.

 To achieve this we need to define a second table where row key have this second dimension and it stores the value of the primary row key. Lets look at the example of my previous blog, where we are storing sessions of users.

  userIdBytes+seperatorByte+dateStringByte+seperatorByte+sessionIdBytes

Here seperatorByte should be choosen in such a way which does not conflict with userId and sessionId bytes values. For example use LF (decimal 10)

Lets call above key as primaryKey.

Note that using above row key we can store, column and values in one or more column families for each
user session row. For example we may want to store session startTime and endTime as two values in two columns in a column family.

 Now lets say that we want to get all user sessions in a given geographical area (Get all users in US or get all users in UK), so how do we store this information? To do this can define a second table where row key is geographical area code plus primaryRow Key (ie. userId date and sessionId.)

geoAreaCodeBytes+seperatorByte+primaryKey

Now we can do a search for user sessions using geographical area, similar to what I explained in my previous blog. Also for each of these rows, we can find the primaryKey row for this row key itself and use it to find additional information that we store for user sessions in primaryKey.





Sunday, March 18, 2012

ActiveMQ Network Of Brokers (Network Connector) Vs Network Bridge

Network Connector:

ActiveMQ network of brokers configuration is achieved using network connector. A network connector specifies one or more ActiveMQ servers/brokers where messages are forwarded or pushed from the ActiveMQ server which has this network connector is configured.

Following diagram makes it clear:



There is a duplex property on network connector configuration which allows bi-directional message flow similar to network bridge. Wth this property set to true, all destinations configured in network connector will be available for bi-directional message flow, where as in network bridge one can choose explicit destinations. For example you want to forward all the messages from Hub to spoke but only want to forward selective destination message from spoke to hub then a network bridge is better.

Network Bridge:
A network bridge configuration on a ActiveMQ server/broker, allows message to be selectively consumed from other ActiveMQ brokers or forwarded from this source ActiveMQ server/broker to other ActiveMQ server/broker.

Following diagram makes it clear:


Promote your blog

Thursday, March 15, 2012

Spring enable @Transactional annotation

In Spring to enable @Transactional Annotation processing you would need to specify  <tx:annotation-driven>
in your Spring xml configuration file.

Example:
<tx:annotation-driven transaction-manager="txManager"> </tx:annotation-driven> Promote your blog

Sunday, March 11, 2012

HBase Composite Row Key Design: Doing Table Scan Using Partial Row Key Part2

In my previous blog I described how to design HBase table row key which allows partial row key scan. Now in this second blog lets look at another example of composite row key where we will have 3 seperate fields in the key.

The key will consist of userId, date and sessionId. Something like this:

userIdBytes+seperatorByte+dateStringByte+seperatorByte+sessionIdBytes
Here seperatorByte should be choosen in such a way which does not conflict with userId and sessionId bytes values. For example use LF (decimal 10)


This key design allows partial key scan in following ways:

  • To find all the sessions for a given user just specify  userIdBytes as start row when creating table Scan object.
  • To find all the session for a given user on a given date or a given range of date  just specify  userIdBytes+seperatorByte+dateStringByte  as start row and end row, when creating a table Scan object.
  • To find a specific sessionId, specify whole key userIdBytes+seperatorByte+dateStringByte+seperatorByte+sessionIdBytes, as start row, when creating table Scan object.
So we can see the key design facilitates two different ways of doing a partial scan on the HBase table.




Promote your blog