Thursday, July 16, 2015

Solid State Drives / Flash Introduction

Storage technology and associated  protocols, connectors, and process tech


Introduction

Storage of program and data long has been stored on a Hard Disk Drive (HDD). HDD  has been the workhorse for storage for the past two decades. It had the luxury of a long "learning" curve because there were many factors that can be improved : number of platters, spin RPM, form factor, protocol improvement, and connector improvement.

Solid State Drives (SSD) now has taken over the role of HDD and more. SSD  can put into tight small place that HDD never had a chance because of SDD's small form factors and low power. SDD is also experiencing a learning curve. The next bump will be "behind the scenes" : 1) continuing the roll out of NVMe and 2) pushing process technology from TLC to 3D.

But just swapping out a HDD for a SSD won't reap all of the performance benefits of SDD.  Hard Disk Drives (HDD) typically connect to the system via the SATA bus. As SSDs replace HDD, SSDs still use the SATA protocol to allow SSDs to directly replace HDDs. But that SATA protocol was design for a spinning disk such as HDD. It is time for a new protocol. That protocol is NVMe. But NVMe requires a high bandwidth bus. Luckily, PCIe already exists and is already in wide adoption.




Here is a quick top to bottom breakdown of a storage system in a laptop:

1. Storage Protocol: ATA, AHCI, NVMe

Protocol is the way software applications talk to the storage device. ATA was one of the ways for PCs to talk to HDD, CD-ROM, DVD, etc. AHCI was created to speed up transfer of data directly from memory to storage (instead of having data pass through the CPU - so that there is a direct path) for HDD.  NVMe the latest storage protocol geared specifically for SSD storage.


2. Storage Connector : IDE/PATA, SATA, PCIe

How a storage device connects to the system changed over time. IDE/PATA was a wide ribbon interface that connected the mother board to the HDD.  The reason for the wide ribbon connector is that the interface was parallel (Parallel ATA).  SATA improved on the IDE/PATA connector by making the connector run at a much higher frequency and serialize the connected (Serial ATA). PCIe improves upon SATA because PCIe is a more "standard" connector : plug in GPU, Ethernet, etc - whereas SATA is focused only on storage.

3. Storage Tech : HDD, SSD/Flash

Hard Disk Drives are physical spinning platters that take time to spool up, seek the first data, and transfer data. Solid State Flash Drives are purely "electronic" with no spinning platters - so no spool up time, seeks are much faster, and transfers are much faster too. It is debatable if HDD drives


4. Storage Fundamental: SLC, MLC, TLC, 3D

The bits that store data physically resides on a transistor. The original technology (called SLC) stored one bit per cell. But as manufacturing and design techniques improved, each cell can store two bits (called MLC) or three bits per cell (TLC). This allows the same solid state drive to multiple the capacity by two (MLC is 2X more dense than SLC) or by eight (TLC is 8X more dense than SLC). The draw back is that the cells are less reliable and require more circuitry to keep them refreshed.

In additional to packing more cells per area from SLC to MLC to TLC, 3D NAND technology will stack even more flash bits (vertically).

Wednesday, July 15, 2015

VirtualBox Hypervising Two Virtualized OSs (Ubuntu, Windows 7) on Windows 8

W7, Ubuntu on W8 via VirtualBox

There is much excitement about Docker Containers - an new form of VM where its footprint  is greatly reduced -  because the Guest OS is now shrunk/removed from the VM. But to support this, the Hypervisor needed by the VMs is now replaced by a Docker Engine.  The disadvantage to Container is that multiple different Host OS's will not be supported anymore. The server community don't care about this limitation and is rejoicing because they can squeeze more linux app into a given hardware. But the development community that relies on virtualization to host multiple target OSs (MacOS, Windows, Linux, etc) will not benefit from the Container trend. Perhaps small businesses will also not make the switch so fast. Here is why.

Here is a screen shot of a Hypervisor (VirtualBox) running on Windows 8. One Virtual Machine is running with Guest OS Windows 7, whilst the other Virtual Machine is running with Guest OS Ubuntu. For those curious as to why I need Windows 7 virtualized on Windows 8, the reason is that  there are critical programs and data that only run on Windows 7 and won't run on Windows 8. Container does nothing for this small business owner.

When the Container takes the IT world by storm, many small users will be clinging on to their little trusty Hypervisor.

Tuesday, July 14, 2015

Internet of Things Industry Groups


Two IoT Industry Groups - But Several Key Players Did Not Join!


Standardization has allowed technologies to proliferate.  How? If  a few key players in an industry  agreed on how hardware and/or software should work, a standard can be published and everyone can focus on building interoperable products to sell.  IBM PC was an open standard and gained great lead in market share over "closed" Apple Macs. Most standards are open, so what will differentiate one product from another is dictated by the 4Ps : product, price, promotion, placement. Good for the consumer.


IoT has become the next major area of focus for hardware and software companies. So much so that much hype (too much) has been endowed on it. One key draw of IoT devices is that they operate in a heterogeneous environment - a mish mash of devices can talk to any network. The devices, the protocol, the access and gateway points, and how it communicates with the cloud - all can benefit from standardization so the the devices can plug-n-play.

In order to increase the adoption of IoT, devices and gateways need to talk to each other. To do that, hardware is usually under the control of software for data and control. Software have Application Programming Interfaces (API) that allow different blocks of software to talk to each other in a standards, predictable way. In order to establish a standard software API,  key players in this industry need to band together to form standards. Unfortunately, two major camps have formed two competing industry groups:

   1. Allseen Alliance (premier member) : Canon, Eletrolux, Haier, LG, Microsoft, Panasonic, QEO, Qualcomm, Sharp, Silicon Image, Sony

   2. Open Interconnect Consortium (Diamond Members listed): Cisco, GE, Intel, Mediatek,  Samsung


Apple HomeKit


An astute reader will probably notice some of the biggest players in the mobile arena is absent - Apple, Google, and Amazon. Apple is famously closed (aka secretive) about its hardware and software. But it is fairly public about its push into the IoT world with its HomeKit.   Google made its intention for IoT obvious by buying Nest for $3.2B mid 2014. Amazon "snuck" into the IoT fray with its popular and ever increasing in functionality Amazon Echo.




With a battle of the 2 industry IoT open standards looming, plus with the big "close standard" heavy weights not even participating, there appears to be a huge fragmentation of the IoT industry. With the push for Open Source,  will the consortium approach win? Or will the closed standard companies be able to point the product in a laser sharp fashion, making the slow consensus based consortium behind?

Saturday, July 11, 2015

Android App Development - App SW Components

Android Apps require a Manifest, Layout, Resources, and Java


Most mobile developer know that Android phones are powered by Java and iOS phones are powered by Swift (was Objective-C).  The Java language was invented by Sun. It was an OOP language like C++, but with some differences such as automatic memory management in Java. The salient feature of Java, though, was Write Once Run Everywhere. This was possible because Java compiler produced machine independent Java bytecode that can run on any Java Virtual Machine (JVM). So your HelloWorld Java bytecode can be compiled once and run on your laptop, mobile device, and even your DVR if it has the JVM built in.

So Java seems ubiquitous - but how does it survive on an Android mobile device? Very well. Because Java is OOP, and  the Android framework treats everything as a class (the main screen is an Activity class, the button is a Button class, etc).

1. Manifest (XML)

The manifest lists the major top level components of an Android app - such as Activities (an Android window), Services (background programs that run silently), etc. The manifest identifies which Activity is the main one that the user sees when the app is first invoked. The manifest is written in XML and is created manually by the user via the Android Studio.

2. Layout (XML)
 
The window inside of an Android application can be laid out via several built in Android layouts (List, Grid, Relative, etc). This is where the designer can point to where buttons should reside, where the image should appear, etc. The process to create an layout is 1. pick a built in Android layout 2. customize the layout using either XML or drag-n-drop GUI in Android Studio. Once the layout is specified, it can be altered programmatically as the app is running.

3. Resources

Android apps usually have icons, built in pictures and sound that part of the app. These are all located in a central place called resources. The labels on your buttons, such as "Submit", are found in the central resource. One of the benefits of this is that if the app needs to be translated into another language, all of the English text is found in one place and the translation can be done in the resource - as opposed to searching through every file to replace. Some discipline is needed to adopt resource while developing an app.


4. Activity Java

The app's main control logic and the heart of the program is located here. "Activity" is another name for the main window in Android. Because it is written in Java, the developer have access to all Android objects from here can can read, calculate, output to Java Views such as buttons, text, etc.

Conclusion

Android apps are written in standard Java. But knowing the Java language is not enough. You will need to also understand the other components : the Manifest, the Resource, and Layout.

Friday, July 10, 2015

Internet of Things (IoT) - From Device To AWS Cloud

A AWS centric IoT architecture - device (blue & green), gateway (orange) , and cloud (red)


Introduction

Internet of Things (IoT) will allow humans and machines to make better decision and live better lives. How? With more data and more insight. But how does one go about creating an IoT? An IoT is comprised of three parts : 1. Device 2. Gateway 3. Cloud


Device

A device can sense information on its environment, collect the data, then send it to the gateway. Looking at the picture above, a device is comprised of input sensors (yellow), software (blue), hardware (green), and output (gray). Input sensors convert analog information such as temperature, humidity, switches, velocity into digital values.

Gateway

Most devices at home or the office will connect to the gateway via WiFi. Outside of home or the office, the gateway will mostly be cellular/2G/3G/4G LTE. For areas without WiFi, a personal area network (PAN) such at Bluetooth or Zigbee can be used to pass data from the device to the gateway. NFC is another option, but it is mostly relegated to close distance payment systems.


Cloud

The cloud is the end point of data that was collected by the device and delivered by the gateway. There are many companies vying to be in this market - from bare bone compute provider like Rackspace to traditional enterprise providers like HP & Dell joining the fray. Amazon AWS has a slick end to end solution : starting with AWS IAM to ensure the the right person and device can only access proper data. AWS Kinesis enables devices to stream data to the gateway and eventually into the AWS Kinesis as streams via JSON data objects. AWS Lambda Function is code that wakes up instantly to data in the Kinesis  - so that the data can be processed and shipped to AWS S3 Bucket for storage or AWS Dynamo NoSQL DB for analysis. Amazon AWS provides a complete suite of API to enable this entire flow.

Conclusion

IoT system is comprised of a device, a gateway, and the cloud.  IoT will allow humans and machines to operate more intelligently with data and insights.

Thursday, July 9, 2015

Extending The Life of Hardware and Software Via Windows XP Virtualization

Windows XP system on left. XP virtualized on Windows 7 on the right.



Virtualization has been a hot topic - for good reasons. It turns compute/storage/networking hardware into "software". In the "software' form, compute/storage/networking resources can be consolidated, copied, killed, or started via management software- thereby saving energy, space, and maintenance. But if you are not a data warehouse provider, why should you care about virtualization? How can average consumers benefit from virtualization?

Perfectly good working hardware rendered obsolete due to Windows 7 not supporting these hardware.
Let's take a consumer who has made major investment in electronic products. In a real life case, the products are a slick thin Canon scanner,  an easy to use Panasonic  digital voice recorder, a unique power saving and beautiful OLED Sony MP3 player, as well as non electronic investment in prosumer level authoring software. With the switch to Windows 7, all of this investment has been flushed down the toilet.  Even if one simply spent the money to buy the new version of these products, some are no longer available. For instance, the slim Canon scanner is no longer in production. Same goes for the Sony OLED MP3 player. These were bought about 5 years ago and have worked flawlessly. A great testament to excellent engineering, manufacturing, and design.

With virtualization, the investment in hardware, software, and knowledge can all be propagated to Windows 7 from XP.  With several virtualization technologies such as VMWare, VirtualBox, and even Microsoft built in XP virtualization on 7,  old software and hardware works! After installation, my dead dust-collecting devices came to life!

As a normal consumer, virtualization saved me by:

1.  $100 : Sony OLED cigar shaped mp3 player
2.   $80  : Canon Lide scanner
3.   $50   : PDA (don't laugh)
4.  $350  : Authoring software
5.   $20   : Time and frustration of porting old data and music (Sony had a ATARC format)

Simulation Using Hybrid SAAS & PAAS Cloud Compute

High level architecture of a hybrid on-premise and off-premise/cloud SAAS/PAAS solution.

Simulation of very large IC designs can take weeks of compute time to complete. In order to speed up simulations, the IT department usually have to invest in either newer machines, increase RAM on existing machines, try to utilize multi-core processing (on software that supports multi-threading), faster storage, or faster networking I/O. But once the project is over, the IT investment will sit idle until the next phase of the project, or until the next project. With the advent of cloud computing, simulation of IC designs can be sped up greatly without the upfront IT cost. Instead of investing in IT equipment that will be only used during burst modes, cloud computing allows compute/storage/networking to be rented as needed. 

To protect IP in a cloud/SAAS environment, the simulation binaries can be designed to obfuscate the original design. Measures are incorporated to ensure that a break during the simulation run does not reveal design source. The output of the simulation run such as waveform, db, and log are obfuscated as well and are passed back to on-premise for debug and analysis.

This hybrid on-premise/off-premise approach can leverage cloud/SAAS for great simulation speed-up while enabling sensitive debug and analysis on on-premise.

Tuesday, July 7, 2015

A Map of Mobile & Web & IOT Technologies




A map of mobile, web, and IoT technologies



Web, Mobile, and Internet of Things (IoT) technologies drive all modern personal and commerce interactions.  Web, mobile, and IoT technologies each have two halves - 1) the client half and 2) the server half. The client is the user facing device such as your phone or web browser. The server is the machination running in the background that the user does not see. The client-server combined offers compute, storage, or networking to its end user.  This architecture has been in use for decades.

The client side is user facing, and user view can be broken down basically into three viewing models: 1) web 2) mobile 3) internet of things. Web is essentially a web browser such as Firefox/Chrome/Safari running on your laptop with the help of HTML5/CSS3/JaveScript/AJAX.  Mobile is a smartphone such as an Apple iPhone or Samsung Galaxy  that can run apps natively in Android (Java) or iOS (Objective-C or Swift). IoT  are electronic gadgets that don't require rich user interaction, but instead have dedicated displays, buttons, and sensors. IoT devices usually run on a small Real Time Operating System (RTOS) or Linux running with a JavaScript environment called Node.JS. 

The server side is the compute/storage/networking machine that is not user facing and solely serves the client. Servers can be 1) on-premise or 2) cloud/off-premise. On-premise servers are simply compute/storage/networking machines that sit in the company property. On-premise is a term that was coined with the advent of CLOUD compute/storage/networking.  For those who have been computer users for the past 20 years,  on-premise server is not a foreign concept. Cloud/off-premise are compute/storage/networking servers that located outside of the company - in an etheral place affectionately called the "cloud".  For most consumers, the cloud offers software without the need to install it on your device. For example, if you have been using Facebook, LinkedIn, or Gmail, you have been using the cloud.  Cloud/off-premise servers are built on a hardware and software template. One popular template is called Linux Apache MySQL Python (LAMP).  can offer Software As A Service (SAAS), Platform As A Service (PAAS), or Infrastructure As A Service (IAAS).  Amazon AWS has been a leader in this field.

Usually bound by the hip but not exactly the same as cloud is the same is the term virtualization.  Virtualization basically allows physical servers (compute/storage/networking) to be converted into software. Once in the software form, these compute/storage/networking servers can be controlled via management software so that the servers can be started, stopped, moved around, and copied. The ability to do this make cloud compute/storage/networking possible.


Monday, July 6, 2015

Mobile Vertical Eco-Systems - Around In 5 Years?





The two dominant mobile platforms  -Apple iOS & Google Android - make up over 90% of the mobile market (http://www.idc.com/prodserv/smartphone-os-market-share.jsp). An examination of the two ecosystems reveals some interesting facts. 1) ARM dominates the CPUs supplied into mobile devices 2) Android has over 80% of the mobile OS market share 3) there is a large HW fragmentation of Android devices (Samsung, HTC, LG, etc). Just a few mere years ago, 

Blackberry was the dominate enterprise mobile device just a mere few years ago (remember President Obama being addicted to it)? 

http://www.slate.com/blogs/future_tense/2013/12/05/obama_s_blackberry_president_not_allowed_to_use_iphone_for_security_reasons.html



What will the landscape look like next year? Will Samsung's Tizen rise from small devices to full mobile? Will China's home developed OS be sufficient to sell to the biggest market in the world? Will India refocus its software expertise into consumer electronics?