Shirish Ranjit

shirishranjit.com
RSS icon Email icon Home icon
  • Service Oriented Architecture (SOA) Primer

    Posted on March 1st, 2012 shirish No comments

    Overview

    Software Architecture has been evolving since Software is separated from hardware. As software is treated as a ‘Product’ that runs on a computer, a Software is also require to be designed and built properly such that the software can run on a hardware.

    Software is becoming increasingly sophisticated. The designers and writers need to worry about not only writing the software to solve problems but also increasingly worry about maintainability and extendability. These future vision of how the software may evolve challenges software designers. The  designers need to incorporate those future directions of the software into account at the time of design/architecture.

    One such architecture that has taken hold in the software design/architecture is Service Oriented Architecture (SOA).

     

    Definition

    SOA is an architectural style whose goal is to achieve loose coupling among interacting software agents.

    In other words, SOA is an architectural style, realized as a collection of collaborating agents, each called a service, whose goal is to manage complexity and achieve architectural resilience and robustness through ideas such as loose coupling, location transparency, and protocol independence.

    Most of the time SOA is equated with Web Services. However, this is an unfotunate interpretation of SOA. SOA is a style that allows designers to loosely couple with protocol agnostic components or applications. When building an application, a SOA designer shall define clearly the application service. The implentor shall define the protocol and method of service request; for example, if the implementor is to use Web Services a medium of communciation, then WSDL will define the details of interfacing with the system. If the implementation is to use JMS messaging (fro example request/reply), then the message schema and JMS Message Configurations shall define the details of interfacing with the system.

  • Winter Clothing

    Posted on November 27th, 2011 shirish No comments

    Yak Apparel is a winter clothing online store. It carries high quality products. This is an up and coming brand for winter clothing.

    http://www.yakapparel.com

     

  • xcode 4.2 and IOS 4.2 — iPhone 3G

    Posted on November 13th, 2011 shirish No comments

    If you get following error message with xcode 4.2 and trying to compile and run in iPhone 3G or older itouch, you need to add “armv6″ in your build settings under “Architectures.”

    unknown lockdownd[16] <Error>: 2ff68000 handle_connection: Could not receive USB message #7 from Xcode. Killing connection
    unknown com.apple.mobile.lockdown[16] <Notice>: Could not receive size of message
    unknown lockdownd[16] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection
    unknown com.apple.mobile.lockdown[16] <Notice>: Could not receive size of message
    unknown com.apple.mobile.lockdown[16] <Notice>: Could not receive size of message
    unknown lockdownd[16] <Error>: 2ff68000 handle_connection: Could not receive USB message #6 from Xcode. Killing connection

    Also make sure you have your deployment target to appropriate ios version under the “info” settings in your project.

     

  • iPhone Managed Objects – Can’t find model for source store

    Posted on January 4th, 2010 shirish No comments

    If you get an error reason in manage objects as follows:

    ” Can’t find model for source store “

    this means that either your object model and generated/coded model codes are out of sync or your db is not migrated/upgraded correctly to the new version. When you have many models with many relationships, it may be difficult to spot the issue. The easy way resolve this issue is to regenerate all the code.

    Following is the code to create options on the store context to migrate automatically to new version of db.

    NSDictionary *optionsForSTore = [NSDictionary dictionaryWithObjectsAndKeys: 
    
            [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
    
            [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption, nil];
    

    You can delete the whole db so that you do not have this issue. However, you will loose all the data.

    I have spent many hours to find easier way to trace this issue. As the compiler does not catch the mis-match in the model-code and there is not much feedback on error on the managed objects, this becomes a mysterious issue.

    The easiest way to avoid this issue is always regenerate the entity that you are modifying and have the options set in the managed context.

  • iPhone Compile Error accessing unknown component of a property

    Posted on December 18th, 2009 shirish No comments

    When you get a compile error as follows:

    " error accessing unknown ??? component of a property "

    This means that you are missing an import statment. The missing import is the one that you have the error. Once you add the missing import, the program shall compile correctly.

  • Google App Engine Datanucleus Enhancer – Nullpointer

    Posted on November 20th, 2009 shirish No comments

    In some cases, when Datanucleus Enhancer throws exception as follows:

    An internal error occurred during: “DataNucleus Enhancer”. java.lang.NullPointerException

    If you see such error that means that the Enhancer cannot traverse through the source tree to find the classes because the tree was too large. In such case, you can add the path to the data classes in the Google App Engine configuration window as follows:

    1)Bring up your Google App Engine setting window

    2)click on “ORM” choice: – click on the src and edit the path to the data classes package.

    3) Save it and do your Datanucleus Enhancer.

    Here is the URL for bug report
    
    http://code.google.com/p/googleappengine/issues/detail?id=1862
  • Google App Engine 1.2.6 Error Running in Eclipse with Older version Projects

    Posted on October 30th, 2009 shirish No comments

    The new App Engine release causes older projects in Eclipse to crash. The new SDK release require a VM parameter in the run command for eclipse to run correctly.

    The new project automatically adds the parameter in run configuration. Following is the vm parameter that you need to add if you are using the older projects in the Eclipse.

    -javaagent:/Library/Genuitec/Common/plugins/

    com.google.appengine.eclipse.sdkbundle_1.2.6.v200910130758/

    appengine-java-sdk-1.2.6/lib/agent/appengine-agent.jar

    Eclipse Run Configuration for Google App Engine 1.2.6

  • Pearls of Objective-c NSMutableDictionary (iPhone Development):

    Posted on October 20th, 2009 shirish No comments


    NSMutableDictionary does not seem to store my data but I do not get any error when setting or getting the data, what is the issue?

    In almost all cases, in objective-c, all the variables need to be initialized before using them. The iphone program crashes horribly when the program come across un-initialized variables. However, there are exception to this rule. One such case is NSMutableDictionary typed object.

    An un-initialized NSMutableDictionary does not crash the application or throw any type of exception when doing operation on the variable. You will be able to set and get objects without any issue. The only program is that nothing happens.

    You think that you put something in the Dictionary but nothing gets stored on it. So, you wonder if there are issue with retain which takes you down different pathway on debugging the issue.

    The issue here is that NSMutableDictionary is not initialized yet. So, the operation that you did is on a “nil” object. However, the application does not throw any exception.

    Thus, if you come across this case, make sure you check if you have done the initialization on the NSMutableDictionary variable.


  • Google App Engine: Memcache – How can you create a multiple Memcache?

    Posted on October 14th, 2009 shirish No comments

    (http://code.google.com/appengine/docs/java/memcache/overview.html)

    Google App Engine provides Memcache as a part of App Engine. Memcache implements the JCache interface (javax.cache).

    The App Engine provides MemcacheService and implementation of jCache API. There are a lot of useful features that the jCache does not provide.

    Here is how one can create a multiple Memcache in App Engine.

    MemcacheService cacheA = MemcacheServiceFactory.getMemcacheService();

    cacheLock.setNamespace( “A” );

    MemcacheService cacheB = MemcacheServiceFactory.getMemcacheService();

    cacheTxnLocked.setNamespace( “B” );

    MemcacheService cacheC = MemcacheServiceFactory.getMemcacheService();

    cacheAllTxns.setNamespace( “C” );

    Once you create the Memcache using the MemcacheServiceFactory, you need to set the Namespace. The “Namespace” causes the cache to be different.

    So, if you do not set the “Namespace” on the cache, then all the cache that you get from the MemcacheService will be the same.

    A pattern to use Memcache in the App Engine (or in any application server) is to use a Singleton to hold the cache. Singleton allows to initialize the different caches and works as a Facade to the Memcache.

    This design has many useful features. Few of those are:

    • hides the actual implementation of Memcache which allows to change cache without impacting the user of the cache.
    • allows data access objects to be cached such that the cached persistence objects are managed by same persistence context.
  • Kathmandu Metro

    Posted on November 4th, 2008 shirish No comments

    The online news and news analysis site www.kathmandumetro.com and www.kantipuronline.com.

    Uncategorized