Where to store wireless credential on Raspbian

/etc/wpa_supplicant/wpa_supplicant.conf

Image result for raspbian

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
ssid=”wireless ID”
psk=”myPassword”
key_mgmt=WPA-PSK
}

network={
ssid=”wireless ID”
psk=”myPassword”
key_mgmt=WPA-PSK
}

 

 

Advertisements

Class-D amplifier

class-D amplifier or switching amplifier is an electronic amplifierin which the amplifying devices (transistors, usually MOSFETs) operate as electronic switches, and not as linear gain devices as in other amplifiers. They are rapidly switching back and forth between the supply rails, being fed by a modulator using pulse width, pulse density, or related techniques to encode the audio input into a pulse train. The audio escapes through a simple low-pass filter into the loudspeaker. The high-frequency pulses, which can be as high as 6 MHz, are blocked. Since the pairs of output transistors are never conducting at the same time, there is no other path for current flow apart from the low-pass filter/loudspeaker. For this reason, efficiency can exceed 90%.

Block diagram of a basic switching or PWM (class-D) amplifier.
Note: For clarity, signal periods are not shown to scale.

 

Basic operation

Class-D amplifiers work by generating a train of square pulses of fixed amplitude but varying width and separation, or varying number per unit time, representing the amplitude variations of the analog audio input signal. It is also possible to synchronize the modulator clock with an incoming digital audio signal, thus removing the necessity to convert it to analog, The output of the modulator is then used to gate the output transistors on and off alternately. Great care is taken to ensure that the pair of transistors are never allowed to conduct together. This would cause a short circuit between the supply rails through the transistors. Since the transistors are either fully “on” or fully “off”, they spend very little time in the linear region, and dissipate very little power. This is the main reason for their high efficiency. A simple low-pass filter consisting of an inductor and a capacitor are used to provide a path for the low-frequencies of the audio signal, leaving the high-frequency pulses behind. In cost sensitive applications the output filter is sometimes omitted. The circuit then relies on the inductance of the loudspeaker to keep the HF component from heating up the voice coil.

The structure of a class-D power stage is somewhat comparable to that of a synchronously rectified buck converter (a type of non-isolated switched-mode power supply (SMPS)), but works backwards. Whereas buck converters usually function as voltage regulators, delivering a constant DC voltage into a variable load and can only source current (one-quadrant operation), a class-D amplifier delivers a constantly changing voltage into a fixed load, where current and voltage can independently change sign (four-quadrant operation). A switching amplifier must not be confused with linear amplifiers that use an SMPS as their source of DC power. A switching amplifier may use any type of power supply (e.g., a car battery or an internal SMPS), but the defining characteristic is that the amplification process itself operates by switching. Unlike a SMPS, the amplifier has a much more critical job to do, to keep unwanted artifacts out of the output. Feedback is almost always used, for the same reasons as in traditional analog amplifiers, to reduce noise and distortion.

Theoretical power efficiency of class-D amplifiers is 100%. That is to say, all of the power supplied to it is delivered to the load, none is turned to heat. This is because an ideal switch in its on state would conduct all the current but have no voltage loss across it, hence no heat would be dissipated. And when it is off, it would have the full supply voltage across it but no leak current flowing through it, and again no heat would be dissipated. Real-world power MOSFETs are not ideal switches, but practical efficiencies well over 90% are common. By contrast, linear AB-class amplifiers are always operated with both current flowing through and voltage standing across the power devices. An ideal class-B amplifier has a theoretical maximum efficiency of 78%. Class A amplifiers (purely linear, with the devices always “on”) have a theoretical maximum efficiency of 50% and some versions have efficiencies below 20%.

Terminology

The term “class D” is sometimes misunderstood as meaning a “digital” amplifier. While some class-D amps may indeed be controlled by digital circuits or include digital signal processing devices, the power stage deals with voltage and current as a function of non-quantized time. The smallest amount of noise, timing uncertainty, voltage ripple or any other non-ideality immediately results in an irreversible change of the output signal. The same errors in a digital system will only lead to incorrect results when they become so large that a signal representing a digit is distorted beyond recognition. Up to that point, non-idealities have no impact on the transmitted signal. Generally, digital signals are quantized in both amplitude and wavelength, while analog signals are quantized in one (e.g. PWM) or (usually) neither quantity.

Signal modulation

The 2-level waveform is derived using pulse-width modulation (PWM), pulse density modulation (sometimes referred to as pulse frequency modulation), sliding mode control (more commonly called “self-oscillating modulation” in the trade.) or discrete-time forms of modulation such as delta-sigma modulation.

The most basic way of creating the PWM signal is to use a high speed comparator (“C” in the block-diagram above) that compares a high frequency triangular wave with the audio input. This generates a series of pulses of which the duty cycle is directly proportional with the instantaneous value of the audio signal. The comparator then drives a MOS gate driver which in turn drives a pair of high-power switches (usually MOSFETs). This produces an amplified replica of the comparator’s PWM signal. The output filter removes the high-frequency switching components of the PWM signal and recovers the audio information that the speaker can use.

DSP-based amplifiers which generate a PWM signal directly from a digital audio signal (e. g. SPDIF) either use a counter to time the pulse length or implement a digital equivalent of a triangle-based modulator. In either case, the time resolution afforded by practical clock frequencies is only a few hundredths of a switching period, which is not enough to ensure low noise. In effect, the pulse length gets quantized, resulting in quantization distortion. In both cases, negative feedback is applied inside the digital domain, forming a noise shaper which has lower noise in the audible frequency range.

Design challenges

Switching speed

Two significant design challenges for MOSFET driver circuits in class-D amplifiers are keeping dead times and linear mode operation as short as possible. “Dead time” is the period during a switching transition when both output MOSFETs are driven into Cut-Off Mode and both are “off”. Dead times need to be as short as possible to maintain an accurate low-distortion output signal, but dead times that are too short cause the MOSFET that is switching on to start conducting before the MOSFET that is switching off has stopped conducting. The MOSFETs effectively short the output power supply through themselves in a condition known as “shoot-through”. Meanwhile, the MOSFET drivers also need to drive the MOSFETs between switching states as fast as possible to minimize the amount of time a MOSFET is in Linear Mode—the state between Cut-Off Mode and Saturation Mode where the MOSFET is neither fully on nor fully off and conducts current with a significant resistance, creating significant heat. Driver failures that allow shoot-through and/or too much linear mode operation result in excessive losses and sometimes catastrophic failure of the MOSFETs. There are also problems with using PWM for the modulator; as the audio level approaches 100%, the pulse width can get so narrow as to challenge the ability of the driver circuit and the MOSFET to respond. These pulses can get down to just a few nanoseconds and can result in the above undesired conditions of shoot-through and/or Linear mode. This is why other modulation techniques such as Pulse Density can get closer to the theoretical 100% efficiency than PWM.

Electromagnetic interference

The switching power stage generates both high dV/dt and dI/dt, which give rise to radiated emission whenever any part of the circuit is large enough to act as an antenna. In practice, this means the connecting wires and cables will be the most efficient radiators so most effort should go into preventing high-frequency signals reaching those:

  • Avoid capacitive coupling from switching signals into the wiring.
  • Avoid inductive coupling from various current loops in the power stage into the wiring.
  • Use one unbroken ground plane and group all connectors together, in order to have a common RF reference for decoupling capacitors
  • Include the equivalent series inductance of filter capacitors and the parasitic capacitance of filter inductors in the circuit model before selecting components.
  • Wherever ringing is encountered, locate the inductive and capacitive parts of the resonant circuit that causes it, and use parallel RC or series RL snubbers to reduce the Q of the resonance.
  • Do not make the MOSFETs switch any faster than needed to fulfil efficiency or distortion requirements. Distortion is more easily reduced using negative feedback than by speeding up switching.

Power supply design

Class-D amplifiers place an additional requirement on their power supply, namely that it be able to sink energy returning from the load. Reactive (capacitive or inductive) loads store energy during part of a cycle and release some of this energy back later. Linear amplifiers will dissipate this energy away, class-D amplifiers return it to the power supply which should somehow be able to store it. In addition, half-bridge class D amps transfer energy from one supply rail (e.g. the positive rail) to the other (e.g. the negative) depending on the sign of the output current. This happens regardless of whether the load is resistive or not. The supply should either have enough capacitive storage on both rails, or be able to transfer this energy back.

Error control

The actual output of the amplifier is not just dependent on the content of the modulated PWM signal. The power supply voltage directly amplitude-modulates the output voltage, dead time errors make the output impedance non-linear and the output filter has a strongly load-dependent frequency response. An effective way to combat errors, regardless of their source, is negative feedback. A feedback loop including the output stage can be made using a simple integrator. To include the output filter, a PID controller is used, sometimes with additional integrating terms. The need to feed the actual output signal back into the modulator makes the direct generation of PWM from a SPDIF source unattractive. Mitigating the same issues in an amplifier without feedback requires addressing each separately at the source. Power supply modulation can be partially canceled by measuring the supply voltage to adjust signal gain before calculating the PWM and distortion can be reduced by switching faster. The output impedance cannot be controlled other than through feedback.

Advantages

The major advantage of a class-D amplifier is that it can be more efficient than an analog amplifier, with less power dissipated as heat in the active devices. Given that large heat sinks are not required, Class-D amplifiers are much lighter weight than analog amplifiers, an important consideration with portable sound reinforcement system equipment and bass amplifiers. Output stages such as those used in pulse generators are examples of class-D amplifiers. However, the term mostly applies to power amplifiers intended to reproduce audio signals with a bandwidth well below the switching frequency.

Despite the complexity involved, a properly designed class-D amplifier offers the following benefits:

  • Reduced power waste as heat dissipation and hence:
  • Reduction in cost, size and weight of the amplifier due to smaller (or no) heat sinks, and compact circuitry,
  • Very high power conversion efficiency, usually better than 90% above one quarter of the amplifier’s maximum power, and around 50% at low power levels.
 

Boss Audio mono amp. The output stage is top left, the output chokes are the two yellow toroids underneath.

Uses

  • Home theatre in a box systems. These economical home cinema systems are almost universally equipped with class-D amplifiers. On account of modest performance requirements and straightforward design, direct conversion from digital audio to PWM without feedback is most common.
  • Mobile phones. The internal loudspeaker is driven by up to 1 W. Class D is used to preserve battery lifetime.
  • Hearing aids. The miniature loudspeaker (known as the receiver) is directly driven by a class-D amplifier to maximise battery life and can provide saturation levels of 130 dB SPL or more.
  • Powered speakers
  • High-end audio is generally conservative with regards to adopting new technologies but class-D amplifiers have made an appearance
  • Active subwoofers
  • Sound Reinforcement and Live Sound. For very high power amplification the powerloss of AB amplifiers are unacceptable. Amps with several kilowatts of output power are available as class-D. The Crest Audio CD3000, for example, is a class-D power amplifier that is rated at 1500 W per channel, yet it weighs only 21 kg (46 lb). Similarly, the Powersoft K20 is a class-D power amplifier that is rated at 9000 W per 2-Ohm channel, yet it weighs only 12 kg (26.5 lb).
  • Bass amplifiers. Again, an area where portability is important. Example: Yamaha BBT500H bass amplifier which is rated at 500 W, and yet it weighs less than 5 kg (11 lb). The Promethean P500H by Ibanez is also capable of delivering 500 W into a 4 Ohm load, and weighs only 2.9 kg (6.4 lb). Gallien Krueger MB500 and Eden WTX500, also rated at 500 W weighs no more than 2 kg (4.4 lb).
  • Vacuum Tube-based Class-D Amplifier. By means of a suitable grid polarization technique and connections through controlled impedance and length equalized transmission lines, vacuum tubes can be used as power switching devices in Class-D power audio amplifiers in full-bridge and half bridge configurations.

See also

 

Frozen connection using ssh over Amazon EC2 using Ubuntu

Question:

When I am connected to Amazon EC2 using the secure shell and don’t type anything for a few minutes, everything freezes. I can’t type anything or exit. After a few minutes I get a message from the server…

Last login: Fri Dec 6 23:21:28 2013 from pool-173-52-249-158.nycmny.east.verizon.net ubuntu@ip-172-31-31-33:~$ Write failed: Broken pipe

Some of you have had to have this problem before. If you could shed some light on the situation for a newb using the cloud.

Answer:

ry below options:

Explore ServerAliveCountMax and ServerAliveInterval. These settings are set in /etc/ssh/ssh_config on SSH client side.

from man ssh_config:

ServerAliveCountMax
             Sets the number of server alive messages (see below) which may be sent without ssh(1) receiving any mes‐
             sages back from the server.  If this threshold is reached while server alive messages are being sent, ssh
             will disconnect from the server, terminating the session.  It is important to note that the use of server
             alive messages is very different from TCPKeepAlive (below).  The server alive messages are sent through
             the encrypted channel and therefore will not be spoofable.  The TCP keepalive option enabled by
             TCPKeepAlive is spoofable.  The server alive mechanism is valuable when the client or server depend on
             knowing when a connection has become inactive.

             The default value is 3.  If, for example, ServerAliveInterval (see below) is set to 15 and
             ServerAliveCountMax is left at the default, if the server becomes unresponsive, ssh will disconnect after
             approximately 45 seconds.  This option applies to protocol version 2 only; in protocol version 1 there is
             no mechanism to request a response from the server to the server alive messages, so disconnection is the
             responsibility of the TCP stack.


And

ServerAliveInterval
             Sets a timeout interval in seconds after which if no data has been received from the server, ssh(1) will
             send a message through the encrypted channel to request a response from the server.  The default is 0,
             indicating that these messages will not be sent to the server, or 300 if the BatchMode option is set.
             This option applies to protocol version 2 only.  ProtocolKeepAlives and SetupTimeOut are Debian-specific
             compatibility aliases for this option.


Also similar settings are available from the server side which are ClientAliveInterval and ClientAliveCountMax. These settings palced in /etc/ssh/sshd_config on Server side.

from man sshd_config:

ClientAliveCountMax
             Sets the number of client alive messages (see below) which may be sent without sshd(8) receiving any mes‐
             sages back from the client.  If this threshold is reached while client alive messages are being sent,
             sshd will disconnect the client, terminating the session.  It is important to note that the use of client
             alive messages is very different from TCPKeepAlive (below).  The client alive messages are sent through
             the encrypted channel and therefore will not be spoofable.  The TCP keepalive option enabled by
             TCPKeepAlive is spoofable.  The client alive mechanism is valuable when the client or server depend on
             knowing when a connection has become inactive.

             The default value is 3.  If ClientAliveInterval (see below) is set to 15, and ClientAliveCountMax is left
             at the default, unresponsive SSH clients will be disconnected after approximately 45 seconds.  This
             option applies to protocol version 2 only.


And

ClientAliveInterval
             Sets a timeout interval in seconds after which if no data has been received from the client, sshd(8) will
             send a message through the encrypted channel to request a response from the client.  The default is 0,
             indicating that these messages will not be sent to the client.  This option applies to protocol version 2
             only.

Jawbone’s demise heralds the end of the wearables industry

Personal note: The decline of this type of wearables started two years ago when the market was flooded with them and it’s no longer “cool” to have one. Most people stop using it after a few months. Just think – who wants to check the heart rate so many times a day? We acknowledge the fact that this type of device exposes some information to consumers which they didn’t have easy access to before. But people just won’t develop a habit for it. 

The company’s apparent collapse is a lesson for all that hardware is hard.

Sometimes deaths are sudden, but most company deaths are the opposite, with Jawbone’s protracted terminus taking upward of a year. The company was an early pioneer in the consumer-wearables market and had raised close to a billion dollars in investment, but that wasn’t enough to save it. Its end doesn’t just mean the demise for one company, but signals the end of the great generation of wearables.

A report by The Information claims the company has begun the process of liquidating itself, at least in part. It’s also believed that co-founder and CEO Hosain Rahman is launching a new company — Jawbone Health Hub — to continue part of his mission. Health Hub will apparently produce health-related wearable hardware and software, as well as service the existing Jawbone devices in the wild.

Whatever form the remains of Jawbone take, the company will never again scale the heights it once did. The wearables market, and the world, has moved on to the point where new entrants have a nigh-impossible journey to success. A variety of factors killed Jawbone the first time out, but there’s no indication that Rahman knows how to get past those obstacles.

One lesson that many startups learn the hard way is that developing consumer hardware is far harder than it may seem. Even Jawbone, which had experience building Bluetooth audio gear, couldn’t easily apply its knowledge to wearable technology. In 2011, the Jawbone Up promised the world a stylish fitness tracker that made the Nike+ Fuelband and Fitbit’s belt-worn pedometers look outdated by comparison.

In reality, however, the first version of the Up was a disaster, with individual models randomly bricking and components liable to failure. The promised 10-day battery life never materialized, and vibration motors were prone to breaking at inopportune moments. Engadget’s review unit broke after two weeks, and while the company began offering free replacements to buyers, its reputation was already damaged.

Unlike software, which can be fixed months or even years after it is originally released, hardware is a much trickier proposition. Whatever advantage Jawbone had in getting the first Up through the door was lost when the company had to claw back those devices and start again. If some of the richest companies in the world can ship hardware with massive defects, what hope does a tiny startup have?

Jawbone’s hardware chops didn’t improve, however, and my own Up 3 review unit broke after just three weeks of use. I charged it to full before going to bed, but the low-battery alarm went off five times in a single night. Given that the company had talked up its smart-wake features, the failure was extraordinarily grating.

Jawbone might have been smart to prioritize durability and looks over function, but the follow-up device was hamstrung by what it couldn’t do. A lack of wireless connectivity meant you had to plug the band into your smartphone’s headphone jack to sync data, a bugbear rival wearables quickly eliminated. Its high cost also began to alienate users who were looking for cheaper devices — a market that Fitbit was quick to embrace.

Then there’s the fact that the watch industry itself is never going to be as big as that for other technology products, like Bluetooth speakers or smartphones. The advent of the mobile phone helped reduce people’s need for a dedicated timepiece on their wrist, and not everyone wears one on a daily basis, anyway. Those who do may want a device that can actually tell the time — a feature that Jawbone’s devices notably lacked.

Economics played its part in Jawbone’s demise, because the job its devices professed to do could be done by much cheaper hardware. It’s hard to justify buying the Up 3, a $180 fitness band that can’t tell the time, if your smartphone can track your activity just as well. It was also released after the first Apple Watch, making Jawbone’s newest device a relic from a simpler time.

For those people who don’t want a smartwatch, it’s possible to buy a fitness tracker for the same as a bucket of fried chicken. Chinese behemoth Xiaomi has become the biggest name in the wearables market with its MiBand, which is priced at around $22. For that little cash, you get a device that will monitor your activity and sleep that packs both an optical heart rate monitor and an OLED display.

Jawbone isn’t the only wearables outfit to face tougher competition, and gloomy clouds are beginning to linger over Fitbit. The company has spent big to control the middle tier of the wearables market with its $70-ish devices like the Flex. But it’s hard to justify such a purchase if you can get a similarly-workable piece of kit for half, or even a third, of that price. Meanwhile, at the top end, it’s hard to justify spending almost as much as a true smartwatch for a premium fitness tracker like the Blaze.

The Blaze is a good case study, because it retails for $199.95 — just $50 less than LG’s Watch Style and $70 less than the cheapest Apple Watch model. It explains why Fitbit is so desperate to build its own smartwatch platform that can stand toe-to-toe with the offerings from both Apple and Google. But even Fitbit, which has spent big to acquire smartwatch companies like Pebble and Vector, is struggling. Although it may, once again, attempt to buy Jawbone in the hope of bolstering its own ambitions — something we’ve talked about before.

The wearables market is looking an awful lot like Main Street after the advent of big-box retail on the outskirts of town. Jawbone, Basis, Pebble, Vector and the rest look like mom-and-pop stores compared to the behemoths of Apple and Google. Fitbit is holding on and using its cash to buy up whatever talent it can in the hope of staying afloat, but that’s no guarantee of success.

It’s hard to see how the wearables market, at least concerning devices that go on your wrist, can continue from here. Earlier this year, iMore’s Rene Ritchie commented that there is no longer a “smartwatch market, just an Apple Watch market.” Looking at the IDC figures for the first part of 2017, it’s hard not to see his point, especially when the only company coming close to Apple is Xiaomi.

It’s easy to predict that the wearables market will soon crunch down, with Apple dominating the high end and Google living off its scraps. Fitness trackers, the stock in trade of companies like Fitbit and Jawbone, will become the province of cheap, mass-market brands like Misfit in the US and Xiaomi in China. The rest will be divided up between niche players like Garmin and Polar, the traditional-watch industry, and Fitbit, for however long the latter can survive.

Micro:bit Small-board Computer Launches in U.S. & Canada to Inspire Next Generation of Students

The Micro:bit Foundation aims to put the device into the hands of 2 million children in the U.S. & Canada by 2020

microbit

The Micro:bit Educational Foundation announced today the micro:bit is now available to schools, clubs and families across the U.S. and Canada. The micro:bit is a credit card-sized, programmable device designed to teach the next generation of children fundamental critical thinking skills through computer programming.

The goal of the micro:bit is to give educators and parents an easy-to-use tool to teach the basics of computer programming and inspire students to imagine, invent and innovate, said Hal Speed, Head of North America at the Micro:bit Foundation. Our goal is to put this device into the hands of 2 million elementary and middle school students in the U.S. and Canada by 2020, in an effort to ensure all children have the opportunity to learn these valuable skills. In the digital age, computer science is a foundational skill vital for every student to learn. It’s a skill that applies to many different subjects, including math, science, art and music.

A recent study conducted by Gallup found that while 90 percent of parents in the U.S. want their child to learn computer science, only 40 percent of schools offer computer programming or coding classes. Additionally, the diversity problem in STEM fields starts in elementary school. Girls, students of color and lower-income students are all less likely to have access to computer science learning in K-12 schools.

schoolchildren working with microbit

The Micro:bit Foundation hopes to address these disparities by integrating the micro:bit device into elementary and middle school curricula throughout the U.S. and Canada. As part of this effort, the Foundation has partnered with a number of organizations that specialize in the development of curricula including, Project Lead The Way in the U.S. and Fair Chance Learning in Canada. Microsoft has also developed its own curriculum for the micro:bit and a wide-range of lesson plans are available on the micro:bit website

The micro:bit is incredibly powerful, not only for getting students excited about computer science, but also for teaching the critical thinking skills necessary to solve complex problems, said Heather Koleszar, an elementary STEAM teacher at the Union School District in San Jose that recently participated in a micro:bit pilot study.

The pilot study focused on pinpointing the most effective ways to integrate the micro:bit into existing curricula and on identifying new opportunities for teachers and educators to use the device to fulfill their digital education goals.

code blocks

The micro:bit includes 25 LEDs to display simple images and text, two programmable buttons, a variety of sensors and can connect to other devices via Bluetooth. Additionally, the pins on the edge of the device allow for easy expansion to other hardware modules and broadens the creative options for students.

The micro:bit can be programmed using the popular block-based coding language Scratch. The micro:bit Scratch extension is available at scratchx.org. Students can also program the device using Microsoft MakeCode, which allows them to switch back and forth between block-based and text-based coding.

The Micro:bit Foundation aims to put the device in the hands of 2 million children across the U.S. and Canada by 2020 and hopes to eventually reach more than 100 million kids around the world. The device starts at $14.95 USD and authorized resellers include Adafruit, CanaKit, Fair Chance Learning, Fry’s, MCM Electronics, Micro Center, SparkFun and others. For more information about the micro:bit or to find the nearest reseller, visit the Foundation resellers list.

For those attending, the micro:bit will be on display at ISTE 2017 in booth 3241.

About the Micro:bit Educational Foundation

The Micro:bit Foundation is enabling children around the world to get creative with technology and invent in school, in clubs and at home. A micro:bit was given to every year 7 student in the UK in 2016 and is now starting to be used around the world. Started by the BBC and a great team of partners, the Micro:bit Foundation is an international nonprofit organization.

Amazon Greengrass launches as a snap on Ubuntu

Personal note: Take a look at Ubuntu Core with Qt for Internet of Things development (6/25/2017)

Last week, Amazon launched Greengrass, their new IoT platform allowing developers to create intelligent edge software. Amazon is collaborating with a variety of manufacturers to make Greengrass available on as many devices as possible from home gateways, industrial gateways to smart microphones. This is a reflection of the increased appetite from hardware vendors and developers to bring software definable devices to market, where third party developers can add new functionalities to existing devices and get rewarded for it. By deploying more intelligence at the edge, developers can build devices with more offline functions, faster responses that are cheaper for them to operate and give users an improved experience. By offering software definable devices they also give themselves the opportunity to offer a continuously improving experience but also new paid services that help them monetise their device even after they’ve been purchased.

Image result for ubuntu

AWS Greengrass is a step in this direction and solves one of the major problems associated with the software definable internet of things, namely how to give developers a simple and familiar development experience on edge devices by letting them re-use their backend code. With AWS Greengrass developers can now use the same skills and code they use in the cloud to write Lambda functions of MQTT based rules to write internet of things applications right at the edge of the network.

For device makers, building a software definable device using AWS Greengrass is, therefore, the guarantee of building an attractive option for developers. To facilitate this process Amazon has collaborated to make Greengrass available as a snap – the universal Linux packaging format. Snaps allow software companies like Amazon to distribute their software in immutable packages that will run consistently across hardware independent of the operating system they use and regardless of the state of that OS. This makes it simple for device manufacturers like Advantech to include Amazon Greengrass in their devices and thus propose a certified Greengrass device for developers to use. Combined with Ubuntu Core, the all snap version of Ubuntu for IoT devices, Greengrass as a snap also offers an opportunity for device makers and developers to monetise their software by building an app store for things.

Where is Java used in Real World?

If you are a beginner and just started learning Java, you might be thinking where exactly Java is used? You don’t see many games written in Java except Minecraft, desktop tools like Adobe Acrobat, Microsoft Office are not written in Java, neither is your operating systems like Linux or Windows, so where exactly people use Java? Does it have any real-world application or not? Well, you are not alone, many programmers ask this question before starting with Java, or after picking Java is one of the programming language of choice at graduate level. By the way, you can get a clue of where Java is used by installing Java at your desktop, Oracle says more than 3 billion devices run Java, that’s huge number, isn’t it? Most major companies use Java in one way or other. Many server side applications are written in Java to process tens of millions of requests per day, high frequency trading applications are also written in Java e.g. LMAX trading applications, which is built over their path breaking inter-thread communication library, Disruptor. In this article, we will see more precisely, what kind of projects are done in Java, which domain or sector Java is dominating and where exactly Java is useful in real-world?

Real World Java Applications

There are many places where Java is used in real world, starting from commercial e-commerce website to android apps, from scientific application to financial applications like electronic trading systems, from games like Minecraft to desktop applications like Eclipse, Netbeans and IntelliJ, from open source library to J2ME apps etc. Let’s see each of them in more detail.

1) Android Apps
If you want to see where Java is used, you are not too far away. Open your Android phone and any app, they are actually written in Java programming language, with Google’s Android API, which is similar to JDK. Couple of years back Android has provided much needed boost and today many Java programmer are Android App developer. By the way android uses different JVM and different packaging, but code is still written in Java.

2) Server Apps at Financial Services Industry
Java is very big in Financial Services. Lots of global Investment banks like Goldman Sachs, Citigroup, Barclays, Standard Charted and other banks use Java for writing front and back office electronic trading system, writing settlement and confirmation systems, data processing projects and several others. Java is mostly used to write server side application, mostly without any front end, which receives data form one server (upstream), process it and sends it other process (downstream). Java Swing was also popular for creating thick client GUIs for traders, but now C# is quickly gaining market share on that space and Swing is out of its breath.

3) Java Web applications
Java is also big on E commerce and web application space. You have a lot of  RESTfull services being created using Spring MVC, Struts 2.0 and similar frameworks. Even simple Servlet, JSP and Struts based web applications are quite popular on various government projects. Many of government, healthcare, insurance, education, defense and several other department have their web application built in Java.

Real world application of Java

4) Software Tools
Many useful software and development tools are written and developed in Java e.g. Eclipse, InetelliJ Idea and Netbans IDE. I think they are also most used desktop applications written in Java. Though there was time when Swing was very popular to write thick client, mostly in financial service sector and Investment banks. Now days, Java FX is gaining popularity but still it is not a replacement of Swing and C# has almost replaced Swing in Finance domain.

5) Trading Application
Third party trading application, which is also part of bigger financial services industry, also use Java. Popular trading application like Murex, which is used in many banks for front to bank connectivity, is also written in Java.

6) J2ME Apps
Though advent of iOS and Android almost killed J2ME market, but still there is large market of low end Nokia and Samsung handset which uses J2ME. There was time when almost all games, application, which is available in Android are written using MIDP and CLDC, part of J2ME platform. J2ME is still popular on products like Blu-ray, Cards, Set top boxes etc. One of the reason of WhatsApp being so popular is because it is also available in J2ME for all those Nokia handset which is still quite big.

7) Embedded Space
Java is also big in the embedded space. It shows how capable the platform is, you only need 130 KB to be able to use Java technology (on a smart card or sensor). Originally Java was designed for embedded devices. In fact, this is the one area, which was part of Java’s initial campaign of “write once, run anywhere” and looks like it is paying up now.

8) Big Data technologies
Hadoop and other big data technologies are also using Java in one way or other e.g. Apache’s Java-based HBase and Accumulo (open source), and  ElasticSearch as well. By the Java is not dominating this space, as there are technologies like MongoDB which is written in C++. Java has potential to get major share on this growing space if Hadoop or ElasticSearch goes big.

9) High Frequency Trading Space
Java platform has improved its performance characteristics a lot and with modern JITs, its capable of delivering performance at C++ level. Due to this reason, Java is also popular on writing high performance systems, because Though performance is little less compared to native language, but you can compromise safety, portability and maintainability for more speed and it only takes one inexperienced C++ programmer to make an application slow and unreliable.

10) Scientific Applications
Nowadays Java is often a default choice for scientific applications, including natural language processing. Main reason of this is because Java is more safe, portable, maintainable and comes with better high-level concurrency tools than C++ or any other language.

In 1990s Java was quite big on Internet due to Applet, but over the years, Applet’s lost its popularity, mainly due to various security issues on Applet’s sand boxing model. Today desktop Java and Applets is almost dead. Java is by default Software industries darling application development language, and given its heavy usage in financial services industry, Investment banks and E-commerce web application space, any one learning Java has bright future ahead of him. Java 8 has only reinforced the belief that Java will continuing dominating software development space for years to come.