Friday, March 15, 2013

Samsung Galaxy S4 - era of powerful mobile processors – Processor

Let me continue from my previous blog on Samsung Galaxy S4. So what is that most exciting part of Samsung Galaxy S4? It is its heart and brain –  its central processor Exynos 5 Octa. This mighty processor packs 4 cores of Cortex A15 and 4 core of Cortex A7 in a small chip using 28 nanometer process.

You must be wondering why I am raving so much about this processor. That is, because this is where I think future of computing is going to be. I firmly believe that server side computing will eventually move to cloud and remote hosted server farms. Personal and on-premise computing for small and medium size business  will eventually shift to computer powered by such processors.

As stated earlier, Exynos5 Octa packs quad cores of 1.8 GHz A15 and quad core of 1.2 GHz A7. Even though Samsung press release does not clearly states this, it appears that these processors are arranged in a big.LITTLE architecture that allows all core to be used concurrently but with heavy duty tasks going to power hungry and more powerful A15 cores and lighter tasks getting assigned to A7 cores. In addition, this processor comes with a Tri-core SGX544MP3 533 MHz GPU capable of delivering 51.2 GFLOPS of processing power.

Such processors are really powerful, capable of supporting high end graphics processing, voice recognition, and if needed, algorithms for optimization and computing. I foresee such processors also getting a foothold in business computing. I look forward to other releases of octal core and higher density processors from competitors.

PS: Yesterday I received my Freescale quad core processor based little toy computer from China. It is an inexpensive tiny little thing, but packs more computing power than an average entry level laptop.

Samsung Galaxy S4 : Era of Powerful Mobile Processors – Phone

 

 

Even though I have been in industry for over two decades and can claim to be very familiar with technology, I still keep getting amazed by new innovations in semiconductor, communication & mobile technologies. Yesterday Samsung unveiled its new Galaxy S4 phone. This phone comes with several exciting cool features. In case you haven’t yet seen this phone, here is a list of some of the cool features

  1. Dual camera13 mega pixel front camera with tons of cool camera applications.
  2. Language translator – A very useful feature that translates voice and text on the fly
  3. Smart pause/smart scroll – Another great innovation – this enhancement of Galaxy S III’s Smart Stay feature senses when you look at the screen or away from it, automatically scrolling pages up or down, and pausing and resuming videos.
  4. Smart watchON – That makes your phone a remote for other gadgets in your home
  5. Air view/Air Gesture – A great usability feature that lets you control your phone by hand gestures without actually touching it. With hand gestures you can accept or reject calls, browse web and photos and do several other tasks
  6. Temperature and humidity sensors – These new sensors nicely complement “S Health” application that come with Galaxy S4

Quality and variety of features in Samsung Galaxy S4’s bundled application  are now rivaling and even exceeding those coming with Apple’s products. It will be interesting to see next product from Apple. As of now I plan to buy Samsung Galaxy S4.

 

PS: I have not yet mentioned the stuff that is most exciting to me. This exciting stuff is Exynos 5 Octa processor that powers this baby. I will write more about that processor in another blog.

Wednesday, October 24, 2012

UltraESB – Notes for beginners

 

UltraESB  is an open source ESB (Enterprise Service Bus) developed by AdroitLogic  . It claims to have a very small memory foot print and extremely fast performance.

I am evaluating this tool for a future product that I am planning to build. I will share my feedback over next few months. I will also love to get your feedback on this and any other good ESBs that you are aware of.

Installation of this software was extremely easy. Two versions of this software are available for download – full and minimal. I installed both. At first glance I didn’t see much difference in capabilities as far as ESB is concerned. Minimal install does not have a “toolbox”, “uconsole” and “uterm”. You will find these tools useful during development and hence I would suggest that you download full version for development or evaluation purposes.

Adroit Logic has also created some nice documentation. Quickstart guide of this document provides a sample for beginners. If you are on Windows 7, you may have difficulty in running this sample. To be specific, you may set a timeout error in response panel of your toolbox.

image

If that happens, most probably another process is already using the port mentioned in Jetty configuration. You can change port number to another port, change corresponding port configuration in ultra-dynamic.xml and retry the example.

In case you are curious about which process is using this port, you can use TCPview tool that is available from Microsoft sysinternals web site.  In my case I found an “aeagent.exe” process using port 9000 that I initially wanted to use.

More later.. Do write me your feedback and suggestions.

JConsole – not able to connect to java processes on Windows 7 – solution

Today I was trying to connect my java 1.6.0_27 jconsole to an UltraEsb process. I could see local java processes IDs. However there was no process description or path information. Connect button was grayed out for all local java processes except that for “Jconsole” itself.

After wasting 45 minutes trying to restart all processes and making sure that my java versions are in sync between jconsole and all processes to be monitored, fortunately I found this useful blog post which explained that this is due to some file name quirk.  Apparently, all java processes add an entry about themselves in a folder under TEMP folder. This folder is named as hsperfdata_Username.

Now here is the catch. Jconsole wants  Username part of this folder to be exactly same as process owner name shown in windows 7 task manager. In my machine java processes were running as user DGoyal. Name of “hsperfdata*” folder was hsperfdata_dgoyal. I stopped all java processes, kill agent*32.exe process and then renamed  this folder to hsperfdata_DGoyal. I started all processes and JConsole. Now JConsole was able to connect to java processes.

One more note,  on Windows 7 this temp folder is set under your profile. Default is C:\Users\<username>\AppData\Local\Temp. You should set TEMP as well as TMP environment variable to your desired location.

Thursday, October 4, 2012

Data exchange format for enterprise application integration – XML, EDI and JSON?

Design for message exchange between modules of an application and across applications is often an afterthought. My experience is that this afterthought results in severe limitations on functionality, performance and scalability of the applications. In this note I will discuss relative merits of formatting data exchange through XML, JSON and EDI like flat file formats.

Decision about choosing data format depends on multiple factors. Among most important of these factors are size and structure of the message.

Consider a relational database for Orders. It will have multiple tables related to Order header and order lines. It will also have tables for items, suppliers, customers, addresses and currencies that will get referenced from Order header and order lines.

Technically it is possible to design a structure, in all three formats, that allows you to send complete database in a single huge message.

Size of message depends on its content. Size of message has impact on communication throughput, processing throughput, error handling and requirements for disk and memory resources.

Creating such large message is cumbersome but not very difficult. Actual issue comes when a recipient attempts to receive, log, parse and consume message.

Let us consider issues related to size & structure of message in more detail.

Communication time: Messages are exchanged serially. Considering network overheads, it may take several seconds for a large message to travel from source to destination. This communication time increases as message size increases. Any intermittent disruption may require source to resend the message to destination (Network compression can be used to partially mitigate this issue).

Logging: If traceability, retransmission and non-repudiation are a requirement, both source and destination systems will need to log the messages. Writing and reading large messages further reduces the throughput and also requires significant disk space.

Parsing: It is important to consider this aspect of integration. If your application needs to understand complete message before it can take any action, it will need to parse complete message and create an object in memory. Large messages require more memory and time to parse. Standard DOM (document object model) parsing for XML requires significant memory. Parsing of JSON messages will require minimum memory. One reason for need to parse complete message is message structure that do not enforce a specific order in which message elements can appear. You can partially mitigate need to parse complete object by enforcing such order.

Exception handling: As stated, you can transmit content of complete database, multiple orders in above mentioned example, in a single message. If your receiving application handles each message as a single transaction then a single failure will require reprocessing of complete message.

Let us now evaluate relative merits of three formats – XML, JSON and EDI/TEXT.

XML is a well established and popular standard. It is self describing, open and extensible. Extensibility allows you to add elements to message with limited programming impact. Multiple out of box parsing libraries exist in almost all popular languages. XML standards do not enforce a sequence in which elements must appear. This becomes a major weakness as receiving application will need to parse complete message to find element that it is interested in. Often this may require multiple passes through the message. One option is to parse complete message at once as a structure (called Document Object Model structure) that can be used later to find elements of interest. However, DOM parsing requires memory and is also overkill if you only need few elements from message. Self-describing structure of XML is another one of its major weaknesses. XML uses starting and end TAGs around each data element. While these descriptive tags are useful for a human reader, they add to overall size of XML.

JSON is an upcoming message format. This format is also open, extensible and self describing. As this format is a direct representation of Java in-memory object, parsing and loading it to memory requires significantly lower time than that needed to parse an XML. However, as JSON also does not enforce an element sequence, you still need to load complete message. JSON does not require an end tag. Hence size of a JSON message is typically 30% to 40% smaller than corresponding XML message. Parsing libraries exist for Java and for limited number of other language.

I am using term EDI like flat file format for a generic variable length text based message structure where each line in message corresponds to an individual record of data. First few characters of each line, called record identifier, identify record type. Elements within each line (record) are separated by an element separator. This message format is most compact and can be 60% to 70% smaller than a corresponding XML. This format is obviously not self-describing. Hence source and recipients need to share a previously agreed definition of message structure. Parsing libraries exist for standard EDI. However, one may need to write custom parsers for custom message formats. As formats are mutually agreed between senders and receivers, record & element sequences are usually enforced as part of that agreement. This guaranteed sequencing allows extremely large messages to be parsed sequentially using limited system resources at a significantly faster throughput. As messages are not self-describing, programmers need to be careful before changing formats.

I will now show same data in XML, JSON and EDI like format.

XML : size – size 341 characters

<ORDERS>

<ORDER>

<HEADER>

<SHIP_TO>Don Trump</SHIP_TO>

<SHIP_TO_ADDRESS>Atlanta, GA</SHIP_TO_ADDRESS>

<ORDER_DATE>April 21 2012</ORDER_DATE>

<PAYMENT_INFO>XYZ BANK</PAYMENT_INFO>

</HEADER>

<LINES>

<LINE>

<ITEM>Pen</ITEM>

<QTY>10</QTY>

</LINE>

<LINE>

<ITEM>Tablet</ITEM>

<QTY>05</QTY>

</LINE>

<LINE>

<ITEM>Laptop</ITEM>

<QTY>100</QTY>

</LINE>

</LINES>

</ORDER>

</ORDERS>

 

JSON: size – 241 characters

{

"ORDERS": {

"ORDER": {

"HEADER": {

"SHIP_TO": "Don Trump",

"SHIP_TO_ADDRESS": "Atlanta, GA",

"ORDER_DATE": "April 21 2012",

"PAYMENT_INFO": "XYZ BANK"

},

"LINES": {

"LINE": [

{

"ITEM": "Pen",

"QTY": "10"

},

{

"ITEM": "Tablet",

"QTY": "05"

},

{

"ITEM": "Laptop",

"QTY": "100"

}

]

}

}

}

}

 

EDI: size-88 characters

*B*ORD*

*H*Don Trump*Atlanta, GA*April 21 2012*XYZ Bank

*L*Pen*10

*L*Table*05

*L*Laptop*100

*E*ORD

 

You must have noticed that EDI-like format is most compact. Following table summarize pros and cons of three formats

 

XML

JSON

EDI like Flat File

Size (scale of 100 to 1)

100

70

25

Can enforce element sequencing

No

No

Yes

Standard-based

Yes

Yes

No

Availability of parsers

Best

Java and few limited languages

Limited, custom parsers may be needed

Ease of parsing huge messages

Need custom parsers

 

Easiest

Even though EDI like format requires more programming, I would recommend using this format as much as possible. If other application or module can handle only XML or JSON formats then you can implement translators to convert your EDI like format to XML, JSON or any other open standard format.

Note: you can use compression to further reduce size of your text messages by another 80%. I will write another note on message compression.

Wednesday, May 6, 2009

Hermes - JMS browser - Configuring for WAS JMS Provider

Finally I could configure it with WAS embedded JMS provider

First I defined a classpath group WAS and added WAS jar files
sibc.jms.jar
sibc.jndi.jar
sibc.orb.jar
idl-6.1.0.1.jar

Then I created a context with Loader=WAS and other properties (provider URL, initial context factory, credentials, principal)
Added a user properties file with following line
com.ibm.CORBA.ORBInit=com.ibm.ws.sib.client.ORB
Added a new session WAS
with asession=WAS, Loader=WAS, Class=hermes.JNDIQueueConnectionFactory, binding=jms.connection.OFRQueueFactory, initial Context Factory - com.ibm.websphere.naming.WsnInitialContextFactory, user properties file=

and it worked like magic!!

Tuesday, July 1, 2008

webMethods - some useful internal services - 1

webmethods has added a service "wm.server.admin:getDiagnosticData". one can run this service from administrator UI. This service generates a zip file that contains all diagnostic information, as well as server logs.

Pretty useful stuff!!

I plan to add details on following additional services. I will appreciate if someone can help me in creating this content.
wm.server.query:getServiceStats
wm.server.soap:registerProcessor
wm.server.soap:unregisterProcessor
wm.server.ui:addMenu
wm.server.ui:addSolution
wm.server.ui:getMenuTabs
wm.server.ui:getMenus
wm.server.ui:mainMenu
wm.server.ui:removeMenu
wm.server.ui:removeSolution