Category Archive Technology

ByBala Manikandan

Anonymous Inner Classes and Lambda Expressions in Java

Reading Time: 6 minutes

Before beginning this post, I would like to state that this post assumes some prior knowledge of Java (particularly inheritance, using interfaces and overriding methods)

Most classes we have seen have their own name and exist on their own (outside any other class or method). But anonymous inner classes can exist inside another class/method, and do not have a name (hence the name ‘anonymous’). These classes must either extend another (named) class or implement an interface. When the interface being implemented has only one abstract method, the anonymous inner class can be converted into a special expression called a lambda expression (as of Java 8), which simplifies the code. This post talks about anonymous inner classes and lambda expressions in detail.

Anonymous Inner Classes

As mentioned above, anonymous inner classes do not have a name, can exist within another class/method, and must extend another class or implement an interface.

Let us see the various examples that can be used to work with anonymous inner classes:

  1. The following example uses an anonymous inner class to extend another class and create an object of it on the spot. Observe the syntax carefully:

//Using anonymous inner classes to override methods of an existing class

package codingexamples;

class Sample{

    public void display(){

        System.out.println(“Sample”);

    }

}

public class Example1 {

    public static void main(String[] args){

        Sample s1 = new Sample();

     

        Sample s2 = new Sample() {                //line 1

            public void display(){

                System.out.println(“Sample 2”);

            }

        };                            //this semicolon is very important

       

        useSample(s1);

        useSample(s2);

    }

    static void useSample(Sample s){

        s.display();

    }

}

The output of the above code is:

Sample

Sample 2

Observe the bold section of the code carefully. Note that the first line of code in this region ends in a curly brace, not a semicolon. This line declares a reference variable of type Sample, and initializes it with an object whose type is not Sample, but an anonymous subclass of Sample. The curly brace at the end of the line is the start of the anonymous inner class body.

The next three lines of code, as we can see, are overriding the display() method in the class Sample. This is, of course, the reason behind creating anonymous inner classes. The last line of (bold) code requires some attention. The closing curly brace marks the end of the class, but that’s not all – there is also a semicolon to end the statement started on line 1! As it is unusual to see semicolons after closing braces, this is very easy to miss.

On the whole, the code creates two Sample references, one holding a Sample object, and another holding an object of an anonymous subclass of Sample (which overrides display()). These variables are then passed to the useSample() method which calls their respective display() methods. This leads to the output mentioned above.

 

2. Anonymous inner classes implements an interface in the second example:

//Using anonymous inner classes to implement methods of an interface

package codingexamples;

interface Movable{

    void move();

}

public class Example2 {

    public static void main(String[] args){

      Movable m1 = new Movable(){

            public void move(){

                System.out.println(“m1 is moving”);

            }

        };

       

        useMovable(m1);

    }

    static void useMovable(Movable m){

        m.move();

    }

}

 

The output of the above code is, as expected:

m1 is moving

This code is very similar to the first example. Note that even though the syntax used is ‘new Movable()’, the code is not instantiating the interface (it’s not legal to do so). The variable m1 refers to an anonymous implementer of Movable.

3. Anonymous inner classes can extend/implement classes/interfaces having more than one method as well. They can also be used as method arguments (watch the syntax again). The following example illustrates these two points:

//Another example of anonymous interface

package codingexamples;

interface Bounceable{

    void bounce();

    void jump();

}

public class Example3 {

    public static void main(String[] args){

        /* Create an anonymous implementer of Bounceable in the argument list of useBounceable() */

       useBounceable(new Bounceable(){

            public void bounce(){

                System.out.println(“Anonymous object bouncing”);

            }

            public void jump(){

                System.out.println(“Anonymous object jumping”);

            }

        });

    }

    static void useBounceable(Bounceable b){

        b.bounce();

        b.jump();

    }

}

 

The output of the above code is:

Anonymous object bouncing

Anonymous object jumping

Observe how the object of the anonymous inner class is created right inside the argument. Also note that in this case, the statement ends with a closing curly brace, a closing parenthesis and then a semicolon.

Lambda Expressions

Now we will move onto Lambda expressions. Consider the following scenario. You have a class Student, which stores some details of a student such as name, marks etc. You also have an interface Check, as shown below:

interface Check{

    boolean test(Student s);

}

This is meant to create multiple custom ‘checks’ on the attributes of each student (for example, ‘name’ starts with ‘A’, ‘marks’ >= 95 and so on). For each such test condition, prior to Java 8, it would be necessary to define a class that implements the interface. Of course, it would be inconvenient to define multiple such implementers with names such as ‘CheckName’, ‘CheckMarks’ etc. (as one can see, it is repetitive). Another approach is to use anonymous inner classes as implementers of interface Check (already discussed above), which removes the problem of repetitive names. However, each anonymous implementer, as we have seen already, spans at least five lines of code.

Java 8 allows you to create ‘instances’ of functional interface ‘implementers’ through the use of lambda expressions (a functional interface is one that contains exactly one abstract method). These can, in certain cases, replace anonymous inner classes and simplify the code. The following example defines the class Student, interface Check and makes use of the interface through lambdas:

//Demonstrate the use of lambda expressions

package codingexamples;

class Student{

    private int marks;

    private int grade;

    private String name;

    public Student(String n, int m, int g){

        name = n;

        marks = m;

        grade = g;

    }

    public String getName(){

        return name;

    }

    public int getMarks(){

        return marks;

    }

    public int getGrade(){

        return grade;

    }

}

//Check is a functional interface (one abstract method)

interface Check{

    boolean test(Student s);

}

public class Example4 {

    public static void main(String[] args){

        Student[] students = {

            new Student(“John”, 90, 7),

            new Student(“Roger”, 70, 9),

            new Student(“Fred”, 88, 6),

            new Student(“Robert”, 60, 8)

        };

       //Lambda expressions

        Check seniorsChk = s -> s.getGrade() >= 9;

        Check toppersChk = s -> s.getMarks() >= 85;

       System.out.println(“Senior students:”);

        filterStudents(students, seniorsChk);

       System.out.println();

       System.out.println(“Toppers:”);

        filterStudents(students, toppersChk);

    }

    static void filterStudents(Student[] stu, Check chk){

        for(Student s: stu){

            if(chk.test(s))

                System.out.println(s.getName());

        }

    }

}

The output of the above code is:

Senior students:

Roger

Toppers:

John

Fred

Before going into the working of this code, let us observe the syntax of the lambda expression. The general syntax of a lambda expression is:

<Parameter(s)> <Arrow> <Lambda Body (must be an expression which evaluates to the abstract method’s return type)>

To understand better, keep in mind that the following expression:

s -> s.getGrade() >= 9

Is equivalent to (in this case):

new Check(){

     public boolean test(Student s){

            return s.getGrade() >= 9;

     }

}

Thus a lambda expression essentially just behaves like an anonymous inner class, with fewer lines of code. Now we can understand that the code basically creates two ‘test conditions’ on Student objects, using lambdas, and then filters a list (array) of Student objects using these ‘test conditions’ (implementers of interface Check). Walk through the lines of code to understand better. Here, Roger is considered a senior as he is in a grade higher than or equal to grade 9, and John and Fred are considered toppers as each of them has scored more than or equal to 85 marks each.

Before we end, let us rewrite the code in Example 2 using a lambda expression (interface Movable used in that example is also a functional interface). Old code is commented out:

//Example 2 rewritten using a lambda expression

package codingexamples;

//assuming interface Movable already exists

public class Example5 {

    public static void main(String[] args){

        /* Movable m1 = new Movable(){

            public void move(){

                System.out.println(“m1 is moving”);

            }

        };

        */

        Movable m1 = () -> System.out.println(“m1 is moving”);

        /* note that parentheses are needed when the method

                accepts zero arguments or more than one argument */

        useMovable(m1);

    }

    static void useMovable(Movable m){

        m.move();

    }

}

The output of the code remains the same as before. Note that examples 1 and 3 above cannot be rewritten using lambdas, as example 1 uses a class, and example 3 uses a non-functional interface (two abstract methods).

We have seen different types of anonymous inner classes and Lambda expressions in this post… stay tuned for more technical posts!

 

ByJayanthi

SOC

Reading Time: 2 minutes

‘SOC’ is the acronym for ‘Security Operations Center’. The 2018 Verizon DBIR (Data breach investigations report) states that there were 53,308 security incidents and there were 2,216 data breaches in the year 2018. It also states that the 68% of the breaches took months or longer to discover! Isn’t it amazing – there is a  breach in your organization and you don’t have any idea about it till your customers let you know about it or a third party lets you know about it! That is probably the sad truth in the industry!!

SOC:

Keeping that in mind, the SOC is a team that has been informed whose sole purpose is to monitor and analyze the security of an organization. As with other things in security, a SOC team must be formed only after the formal assent from senior management. For any security program to be successful, the senior management in an organization must always be in tune with the goals of the Information security team.

Since security is mostly a reactive approach for most organizations, the SOC team is trained to detect security incidents within an organization and pass the control onto the ‘incident response team’ if an incident occurs. 

The SOC team consists of security engineers, SOC managers and security analysts along with other security professionals. The SOC team will hopefully reduce the time needed to respond to a cyber attack – since a team is always there to detect attacks as early as possible.

The SOC team must be up 24 hrs a day, 7 days a week, 365 days a year! There might never be a dull moment in the SOC team. The day may start out calm and before long alarm bells might be ringing detecting a security incident.  The SOC infrastructure involves the defensive security mechanisms of firewalls, IDS/IPS, breach detection solutions and more. 

Responsibilities of a SOC:

A professional in the SOC team is expected to be able to perform these tasks:

  • network analysis
  • IDS monitoring and analysis
  • malware analysis and forensics
  • The SOC team should also be in tune with the emerging trends and threats in the cyber security landscape. 

What are the skills to be a member of the SOC team?

You may need to have:

  • a Computer Science degree
  • 1-3 years of work experience related to SQL, TCP/IP, IDS/IPS, C, C++, Java, PHP, OS(like Linux, Unix, Windows)
  • Certifications such as GIAC, CISSP, CEH

These are some skills that are suggested to become a member of the SOC. There are other ways if you have the passion for joining a very happening team in the InfoSec domain!!

This post is for alphabet ‘S’ for #Blogchatter challenge. The previous post can be found here.

ByJayanthi

What is Cryptojacking?

Reading Time: 2 minutes

It just feels like we hear something new about  cryptocurrencies everyday, but let us delve into the concept of ‘Cryptojacking’ in this post.  Having blogged about cryptocurrencies and blockchain before, here are a few facts about them:

  1. ‘Bitcoin’ and ‘Blockchain’ are two entirely different concepts
  2. ‘Bitcoin’ is a cryptocurrency while ‘blockchain’ is the underlying technology powering cryptocurrencies like Bitcoin 
  3. Blockchain is a distributed, immutable and shared ledger
  4. Transactions on a blockchain cannot be edited
  5.  ‘Bitcoin’ is one of the more popular cryptocurrencies based on the ‘Blockchain’ concept. 

Bitcoin’s energy consumption:

Since bitcoin is based on the blockchain concept, where there is no central authority directing the stakeholders(or miners in Blockchain/Bitcoin lingo), the only way a new block(FYI – a ‘block’ is where transactions are recorded) can be created and agreed upon is by means by of mathematics. This is called ‘mining’, which uses humongous amount of energy. Bitcoin mining can be done by simple software and specialized hardware.

Bitcoin’s current electricity consumption is 46.74 TWh!!(Terawatt hours) (Source: https://digiconomist.net/bitcoin-energy-consumption) To put this into perspective, according to one study in April 2018, Bitcoin’s energy consumption numbers were equal to the energy consumption of an entire country like Switzerland! (Source: https://www.forbes.com/sites/shermanlee/2018/04/19/bitcoins-energy-consumption-can-power-an-entire-country-but-eos-is-trying-to-fix-that/#116123d81bc8)

Having understood that bitcoin mining is heavily energy intensive, we can understand that cyber criminals will look for alternate means to mine cryptocurrencies.

Cryptojacking:

This alternate and malicious way to mine cryptocurrencies is by means of a concept known as ‘Cryptojacking’. ‘Cryptojacking’ unsuspectingly makes use of an innocent person’s computer, tablet, phone or any other connected device to mine cryptocurrencies. The innocent individual is lured by means of suspicious email links or online ads which then runs the mining code in the background and drains your energy for wrong purposes.

The unsuspecting user continues to use his computer/connected without knowing that his connected device is being used for malicious purposes.

What do criminals gain from this?

They get bitcoins or any other cryptocurrency with minimal effort and electricity usage on their side. They can then use these cryptocurrencies to buy things that they wish.

How do we detect that cryptomining code is running on your computer:

The only way that we can detect if the cryptomining code is running on our computer is when the computer gets slow or gets heated up. 

How do we prevent cryptojacking?

We can prevent ‘cryptojacking’ by installing ad-blocking and anti-cryptomining extensions. Users should also turn off Javascript in the browser and be wary of phishing emails. It is also necessary to keep up with the latest in the security realm and install all patches as and when they are released. 

Future of cryptojacking:

The current damage caused by ‘Cryptojacking’ may only be slowing down of the device but this malicious attack may evolve further with time and pose a risk to personal and financial information. According to this report from eset.com, cryptojacking may not be slowing in 2019. So, it is necessary to take note of this attack and be knowledgeable about it and guard against it.

 

ByMani Prithiviraj

Tesla

Reading Time: 4 minutes

Tesla’s Role in Evolution of Electric Cars

Modern day private and public transportation are primarily based on non-renewable energy resources.  These traditional forms of transportation contribute towards global warming since the one of the products of combustion using non-renewable fuels (e.g. Petrol, Diesel, Kerosene, Natural Gas) is Carbon-di-Oxide. Carbon-di-Oxide (CO2) is a greenhouse gas that traps heat in the atmosphere and leads to global warming. In addition, the exhaust from vehicles also contains pollutants like unburnt hydrocarbons, carbon monoxide, oxides of nitrogen and soot.

Electric cars work on the principal of converting the chemical energy stored in batteries to mechanical energy using an electric motor. The mechanical energy is then transferred to the wheels of the car to propel it. The main systems in an electric car are the battery, inverter, motor, transmission, cooling system for the battery, cabin comfort and electronics. The first electric car actually dates back to 1832 when Scottish Inventor Robert Anderson invented a crude Electric Carriage. However, it is only in recent times has a commercially viable Electric Car made it to the market.

 

 

Advantages of Electric Car over Internal Combustion (IC) Engines

  • Zero emissions (other than the generation of electricity used for charging batteries)
  • Very few moving parts (compared to an IC Engine)
  • Fewer systems leading to larger availability of space (e.g. The entire engine compartment area that is needed for an IC engine can be used as storage space)
  • 2-3 times higher efficiency compared to an IC Engine
  • Low Center of Gravity located roughly mid-way along the length of the car providing very stable handling characteristics.

Key Challenges / Disadvantages of Electric Cars over IC Engines

  • Driving range with a full charge is typically shorter than traditional IC engine powered cars.
  • Time to re-charge the battery pack is much longer compared to filling petrol/ diesel in a traditional car.
  • Except perhaps the US, Europe and a few countries in the developed world, the infrastructure available for charging electric cars is very minimal.

One of the biggest contributors in recent times towards commercialization of the Electric Car is Tesla, which is an auto-manufacturer based out of California (Yes! California and not Detroit). Tesla was originally founded by Martin Eberhard and Marc Tarpening in 2003. Eberhard was a smart engineer who wanted to reduce America’s dependence on oil. He built a technical model of an electric car using a spreadsheet.  Tarpening focused on creating a financial model that would be required for Tesla. Prior to Tesla the previously founded car company in the US was Chrysler in 1925. The company founded by Eberherd and Tarpening was named Tesla as homage to inventor and electric motor pioneer Nikola Tesla. The company was set up with the objective of ending America’s dependence on oil. Elon Musk shared the vision of Eberhard and Tarpening in reducing America’s dependence on oil and agreed to contribute about $6.5 Million towards building of the first prototype (or mule) of the electric car that would be named the Roadster. This was the time when Musk became the CEO of Tesla.

Elon Musk was born in South Africa and then moved to Canada and later to the US. He was an avid reader, who could understand and digest huge volumes of information. As a youngster, he had read and remembered all facts in Encyclopedia Britannica.  He got his dual degree from University of Pennsylvania (Economics and Physics). From his college days, Musk had a fascination for designing Electric Vehicles without compromising performance seen in traditional IC powered vehicles.

With Engineers like Straubel (who worked on using Lithium Ion Batteries for Electric Vehicles), Gene Berdichevsky (who was a member of the Stanford Solar Powered Car team) and David Lyon (a clever Mechanical Engineer), Elon Musk assembled an enterprising team that built the first prototype of the Roadster. This team figured how to get the Motors, Batteries, Power Electronics, Transmission and Electronic controls all to work together. The team also worked on various design aspects including, ensuring sufficient cooling of the battery pack, safety of the battery pack, crash protection of the vehicle to name a few. The Roadster could accelerate from 0 to 60mph in about 4 seconds and it had numerous revolutionary features (e.g. door handles that automatically popped out when the driver approached the vehicle, a 17- inch Infotainment system for controls and navigation)

To keep costs under control, Tesla decided to have different parts of the vehicle manufactured in different locations around the globe and assembled. (e.g. Batteries were manufactured in Thailand, Body Panels in France). Between 2008 and 2012, Tesla sold about 2500 Roadsters.

May key global Automotive companies (BMW, Honda, GM, Daimler to name a few)  have taken note of  Tesla’s success and have started designing Electric Cars.  In India, we have started seeing a few Electric Vehicles on the road, with Mahindra and Mahindra being a key player in the 4 Wheeler segment (e.g e2O, E-Verito). Companies like Ather Energy are producing Electric Scooters (Model 350 and 450). In addition companies like Bajaj and TVS are investing in bringing Electric Scooters to market.

The share of electric vehicles in the world market is expected to grow steadily over the next 10-15 years. This will help the world move away from dependence on oil and in reduction of greenhouse gases.

References:

  1. Elon Musk, “How the Billionaire CEO of SPACEX and TESLA is shaping our Future”, By Ashlee Vance

 

ByJayanthi

What is ‘Steemit’?

Reading Time: 2 minutes

Do blogging/writing and blockchain have anything in common? Yes – with ”Steemit’. What is ‘Steemit’? It is a blockchain based blogging platform. Imagine writing a blogpost and it being stored on a Blockchain namely the ‘Steem’ blockchain… so, next what is a ‘Blockchain’? To refresh, Blockchain‘ is a distributed ledger of information with no central authority(decentralized) The most popular application of Blockchain is of course, the ‘Bitcoin’. 

We have all heard about ‘Blockchain’ being used for the mortgage industry, car auction industry – but for blogging and writing content? yes, it is true – bloggers can write their content which will be  posted on the ‘Steem’ blockchain  and you ‘may’ even get paid for it. The ‘Steem’ blockchain is used for other decentralized applications as well like DTube (decentralized video platform), eSteem (Steem based mobile app)

‘Steemit’:

‘Steemit’ is a ‘Dapp’ or ‘Decentralized application’ which was started in 2016.One can upvote, downvote,comment on other’s posts (similar to other communities but with a difference , you get paid for it and it is on a blockchain)

Depending on the number of upvotes you get, you get paid in the form of digital tokens called ‘STEEM’. Everyday, STEEM tokens are mined on the ‘Steem’ blockchain and this can be used as rewards to different users.

 

 

Other points about ‘Steemit’:

  1. Users can earn money by creating content and if it receives generous upvotes – one can earn enough ‘STEEM’ tokens
  2. Users will also a receive a reward in another way. If they upvote another post and that post becomes popular later, they get rewarded with STEEM tokens too
  3. Unlike regular blogging sites, if an user loses his/her password/owner key, it cannot be reset! Hence, it is recommended for users to store an offline copy of the same. There are a number of keys too – such as owner, active, posting and memo. Since each account contains funds, it is critical for owners to safeguard their keys appropriately.
  4. Another interesting point about ‘Steemit’ is that since the content is stored on the ‘Steem’ blockchain – it cannot be deleted(though a blank page can be shown for the time the post is active) Since one important property of a blockchain is immutability(changes made to a block cannot be altered)   – all edits, comments are stored on the ‘Steem’ blockchain permanently.

Can ‘Steem’ be converted?

Yes, ‘Steem’ digital tokens can be converted to Bitcoin or to a country’s native currency or your local bank account. You can also convert it into other cryptocurrencies.

We saw the concept of ‘writing and blockchain’ merging in this post by means of the ‘Steemit’ blockchain…join me as I uncover most interesting topics…

Disclaimer: This article is to be used for informational purposes only. With cryptocurrencies being banned in many countries including India – it is up to the user to research and make decisions on the same.

BySarah Rothrie

The Challenges of Cloud Computing and How Blockchain Can Help

Reading Time: 5 minutes

The challenges of cloud computing are easily overshadowed by the fact that the market is going through a huge boom right now. The cloud computing sector is dominated by a small number of big tech firms including Amazon Web Services (AWS), Microsoft Azure, and IBM. AWS leads the pack in market share, but all of these companies are undergoing staggering growth. AWS reported 49 percent revenue growth in the first quarter of 2018, while Microsoft said its Azure revenue shot up 93 percent.

Sounds like good news? Perhaps, but even in a booming market, the challenges of cloud computing should not be underestimated. Here, we look at how the big tech firms are struggling to keep up with demand, and how decentralization could be one of the critical enablers for cloud computing of the future.

Why Is Cloud Computing in Such Vast Growth?

One reason is the development of artificial intelligence (AI). AI algorithms rely on massive quantities of data. Until a few years ago, there just wasn’t the available computing power needed to run AI programs. Now, better hardware means that AI development is eating up computing power as quickly as it becomes available. One analysis showed that AI computing power consumption has doubled every three and a half months since 2012. Compare that to Moore’s Law, which had an 18-month doubling period.

artificial intelligence

Greedy AI robots ate all the computer pies. Image courtesy of Pixabay.

In light of AI’s voracious appetite for data and therefore computing power, the biggest challenges for cloud computing today are supply and demand. So as the demand increases, cloud computing providers must find ways to either increase their supply or manage the pricing to try and stem demand. They are doing both.

Challenges of Cloud Computing #1: Managing Supply and Demand with Existing Server Capacity

Cloud providers like AWS operate with tiered pricing. This model allows their clients to choose the type of computing power they need for particular jobs. AWS sells premium priced on-demand services that are always on for clients who need a continuous service. It also sells spot instances of cloud computing at variable prices. These work for clients who can queue jobs until there is available server capacity, so they can spend less.

So imagine a software company that’s got one product up and running, and is in the process of developing another. For the live product, the company operates a web-based customer service chatbot for its clients. For the product under development, they need to run some tests but they are fairly flexible in when the tests can be run as they can just queue them to run overnight if needed.

This company buys an on-demand service for its chatbot, so the bot is always available for their clients. For the developing product, they bid on spot instances. They stipulate the maximum limit they will pay for the server capacity. Their cloud computing provider prices server availability according to real-time demand. Once the price of computing power falls below the threshold value our software company has set, their test jobs start to run. If demand goes up partway through a job, the price increases again and their provider diverts power elsewhere.

The client saves up to 90 percent over the premium on-demand price by using the spot instances for flexible jobs. However, not all clients are able to be so flexible with their computing power needs. Plus, this solution only manages existing demand, it doesn’t address the massive growth in demand.

Challenges of Cloud Computing #2: Growing Capacity with More Data Centers

Cloud computing providers run on data centers. So, to address the capacity challenges of cloud computing, a provider can just build more data centers, surely?

They can, but data centers demand huge supplies of energy. One report from 2016 estimated that the world’s data centers had used more energy than the entire UK in the preceding year. It also highlighted a Japanese study that estimated that data centers in the country would consume the entire national electricity supply by 2030 if growth continued uninterrupted.

So, just building more data centers can’t be the only solution.

Future Outlook: Decentralization

Decentralization could offer a solution. Distributed networks of computers could work together to provide idle capacity to those in the network who are prepared to pay for it. So, say you own a GPU for mining cryptocurrencies, but you aren’t using it right now. Perhaps Bitcoin mining has become unprofitable in the depths of a price slump. You could put that GPU to use on a distributed cloud computing network. Someone would pay you in digital tokens so that they can use your GPU power to help drive their AI development testing.

DeepBrain Chain is one of the blockchain projects that is aiming to achieve this and is targeted directly at the burgeoning market for AI computing power. In DeepBrain Chain, anyone can earn tokens by contributing their idle computing capacity, which is sold on to AI developers.

Tatau is a similar but newer blockchain project that uses this concept of decentralized computing power for AI.

Decentralization offers a real solution to the problem of data center overdevelopment, as it doesn’t require bringing in new hardware. It’s also more flexible at managing fluctuations in capacity, as there are many smaller operators in the network. Once a data center is built, it has to be used to be efficient, whereas a decentralized computing network has more resilience to idle capacity.

This is just one scenario. Although, there could be plenty of other opportunities for blockchain and cloud computing in the future.

Quantum Computing

Quantum computing offers a further opportunity to solve the challenges of cloud computing. These computers utilize the ability of subatomic particles to exist in multiple states at the same time. A standard bit of data can only exist in one state at a time, either 1 or 0. A quantum bit, or qubit, can exist in two states simultaneously. This dual state allows them to hold vastly more data than a traditional bit.

Quantum computer

Quantum computers could be the future of the cloud

Quantum computing is still in its early days. However, two of the cloud providers, IBM and Alibaba, have now launched their own quantum computers. One startup, Rigetti, is working towards launching its own Quantum Cloud Services. So, quantum cloud computing could be here sooner than we realize.

Conclusion

Cloud computing is definitely here to stay. However, the challenges of cloud computing will soon weigh upon the existing operators if they try to maintain the status quo. Of the scenarios listed here, the future will likely include a hybrid of different models including existing infrastructure, decentralized networks and quantum computers at least for a while. With AI placing ever-increasing demands on the cloud, we need these alternatives sooner rather than later.

This article originally appeared here.

ByMarshall Taylor

What Is Cloud Computing? | The Basics of Digital Outsourcing

Reading Time: 5 minutes

Cloud computing: the synergistic boardroom buzzword that you still pretend know about.

Luckily, it’s a pretty simple idea, technically demanding, but simple none-the-less. On paper, cloud computing is just another way for humans to share resources and increase production.

When you use cloud computing you are essentially outsourcing a computer-related task the same way a company may choose to outsource a task like accounting, manufacturing, customer support, or human resources to name a few.

Cloud computing instead outsources tasks such as data storage, web server hosting, Bitcoin mining (warning), and software management among others.

What’s All the Fuss About?

In order to really understand the perks of cloud computing let’s paint a picture of two similar e-commerce businesses. Both businesses are selling a product and using a website as their primary sales portal. Both are also new businesses with a small customer base but can reasonably expect to increase traffic to their e-commerce store in the future.

The first business, let’s call it Tod’s Toys, is running their website on locally installed servers and hosts all their own data. Not to worry though, Tod’s Toys has an excellent CTO running the operation and has the current hardware/software stack purring along.

The second business, this one named Gupta’s Guitars, is a little more bespoke and decided to instead opt for hosting their website on a cloud server. Gupta’s Guitars also has a capable CTO monitoring the online store’s health.

In their beginning stages, Tod’s Toys and Gupta’s Guitars are seeing similar traffic rate to their stores. However, Tod’s Toys is noticing a higher operating cost coming from their web servers; they have more than they currently need. The toy store doesn’t mind though, as they expect traffic to increase into the server capacity they have.

Gupta’s Guitars, on the other hand, paid for their server use much more ad hoc. Their server access scales with traffic, so the guitar store hasn’t noticed any waste. In fact, while their traffic volume was low so was their cost for using the cloud servers. Naturally, they threw a guitar-fueled pizza party with their savings!

As predicted, both online stores begin to see a precipitous uptick in volume and sales. Gupta’s Guitars rejoices and probably throws another pizza party. Tod’s Toys, on the other hand, doesn’t have as long to celebrate.

The online toy store quickly pivots to scaling their server hardware as demand on their self-hosted platform outpaces their capacity. Potential customers are served 404 error messages instead of the spectacular toys that Tod’s offers. *Sad face*

You can see, cloud computing let Gupta’s Guitars outsource their server needs and as a result, focus on other aspects of their business.

A ridiculously oversimplified example but the key point is there.

The Basics of Cloud Computing

Cloud computing for businesses, as in the above example, is typically referred to as enterprise cloud computing. This differs from other cloud computing services that may be more consumer-facing like Google Drive or MegaUpload (R.I.P.).

In either case, cloud computing is actually a stack of three generalized cloud provided services. At the base of the stack is the infrastructure cloud services also known as infrastructure as a service (IaaS). The middle layer is the developer’s layer known as platform as a service (PaaS). The top and the most visible layer is the software as a service (SaaS) layer also known as the application layer.

IaaS (infrastructure as a service) is the foundational layer made up of all the necessary hardware that makes the digital cloud tick. Despite the reference to watery vapor above us, cloud computing is made of some serious hardware, real, tangible, and often loud. IaaS is all of the physical hardware that stores and moves our zeros and ones.

Examples of IaaS providers: CloudSigma, Digital Ocean, Linode, Cisco Cloud Infrastructure Services, Microsoft Azure, Citrix Workspace Cloud

PaaS (platform as a service) is the next layer up, where the developers and programmers get involved. In this middle layer, IaaS providers lease chunks of cloud hardware to developers and programmers pre-installed with developer tools like Apache or MySQL. This middle layer is where IaaS providers and software developers overlap.

Examples of PaaS providers: Oracle Cloud, Salesforce Platform, Google Cloud Platform, Amazon Web Services

SaaS (software as a service) is the topmost and more familiar layer of the cloud stack. This is where applications and software are, and we see some familiar names like Spotify, Adobe Creative Cloud, Google Play Store, Storj, and Dropbox to name a few. The SaaS layer is essentially where cloud services become user-friendly for consumers and businesses alike.

Examples of SaaS providers: Slack, WordPress, Trello, Mailchimp, InVision, Zoom, Buffer, Contently, Netflix

Cloud Computing Stack

The basic cloud computing stack

Each layer of the cloud service stack enables the one before it. In short, you can think of the three layers like this: first, you need hardware. Second, you need a platform to build from. Third, you need applications so people can use the hardware.

The Pros and Cons of Cloud Computing

While each use case will have much more granular pros and cons, the following are a few general benefits and drawbacks of cloud computing.

The Upside to Cloud Computing

  1. A Lower Barrier to Access
    Cloud computing has a fraction of the initial costs compared to building and managing your own hardware, platform, or applications.
  2. Far Less Waste
    Cloud computing scales to the user whether big or small. If you only need ten terabytes of storage then only pay for ten, and when your needs shift, so can the storage.
  3. Take Risks and Break Things
    With faster scaling, faster iterations, faster hardware builds, faster developer environments, creators can be wrong more often and for cheaper, lowering the cost of success.

Downsides of Cloud Computing

  1. A Security Catch 22
    On one hand, a cloud service may be able to provide better security management than you could on your own. On the other hand, centralizing your data to a cloud service creates new incentives for security breaches.
  2. Performance Lags
    Sharing infrastructure with other users can affect its consistency. Demand on the infrastructure can impact the share you are receiving. There are mitigating factors, but this is something to be aware of.
  3. Internet Connection
    Not surprising, but cloud computing requires an internet connection in most cases. There are many variables for how much data you need to transfer and how often, but the understanding is that you will definitely be affected by internet downtime if present.

The Future of the Cloud May Be the Blockchain

The next evolution to the cloud service stack should be one that can support a distributed infrastructure layer. By fragmenting smaller pieces of a sizable cloud infrastructure, we might be able to shift the centralization of hardware and alleviate that security vector.

If only there were a system of organization that could incentivize hardware providers to come together in a distributed method in order to provide cloud-like services to platform and software developers. If only.

This article originally appeared here.

ByJayanthi

Tracking

Reading Time: 2 minutes

As our dependence on electronic devices increases, from ordering food to paying bills and hailing cab services and making use of online maps to travel to different destinations,  the unseeing eyes are also following us everywhere tracking our every move.

We all know of GPS tracking when hailing a cab but did you know that you are being tracked at all times? By having the smartphone with you at all times, with the ‘Location’ being turned ‘on’, every move is being tracked. Some might not worry about this constant tracking by strange individuals, but I do think that it is necessary  to know all the possibilities that are present before forming our own conclusions about them.

It is quite a possibility that you will be using ‘Google maps’ for taking you to different places and you might be signed onto multiple devices using the same ‘gmail’ account. While, it looks perfectly harmless and seems that your life is getting simplified in every way in this electronic era – the reverse is unfortunately true.

How you are being tracked:

As an example, sign into your Google account and click on ‘Maps’ in the right hand corner. Once inside Google Maps, click on the menu and pick ‘Your timeline’. Now, you can see all the places you have visited in the last couple of years! You can also see the time of visit, the duration of visit,the latitude and longitude of the places that you visited! In addition, all these details are visible for a prolonged period of time too! 

You might have visited 100 places over a period of 5 years and chances are all of them might be listed right there on the screen! You may have forgotten where you went in October of 2017, but your device and ‘Location history’ does not forget!

So, what can be done?

If you would like to delete all of your location data and prevent your  location from being saved in the future, follow the steps below:

  1. After clicking on ‘Timeline’, click ‘Manage Location History’, disable ‘Location History’ under ‘Activity controls’. This makes sure that future Location tracking is disabled. 
  2. In order to delete previous ‘Locations’ go to ‘Timeline’ and under the settings tab click on ‘Delete all Location history’
timeline
Disabling Location history

Once this is completed, your Location history will neither be visible to you or anybody else(at,least for some time!) In today’s age, with so much information and power in our hands, it is up to us to do all the homework and control the data that is exposed to the outside world by disabling the various settings.

ByJayanthi

Can Blockchain prevent another economic crash?

Reading Time: 5 minutes

Like any other system, the global economy is susceptible to failure at many different points. Unfortunately, due to the interconnectedness of the world, an economic crisis in one country could have disastrous consequences for other countries. This was the case during the United States economic crisis of 2008 in which the stock market crashed.

Economic collapse on any scale usually happens as a result of disparities in the system that can easily be overlooked in the absence of clarity. However, blockchain technology could help avoid a financial crisis due to its transparency, security and decentralized mechanism. Cryptocurrencies such as Bitcoin are powered by this same technology which acts as a ledger for all transactions carried out on a network.

The endless benefits of the technology have attracted countless investors over the years. Now, it is fast becoming an addition to every major corporation, from IBM and Mastercard to Nasdaq. Its properties are also attractive to financial institutions which constitute the industry that is most in need of the benefits it provides.

The financial crisis of 2008 caused by a lack of transparency, greatly impacted various significant financial institutions and economies on a global scale. Blockchain technology affords banks full transparency, allowing them to spot such a crisis from a mile away. This way, they can take the appropriate preventive measures to ensure that it does not happen again. Banking authorities must make an effort to study the technology and better understand how it can be a force for the prevention of the next financial crisis.

What was the 2008 economic crash?

The economic crash of 2008 was the worst economic disaster in the U.S. and the world since the 1929 Great Depression. The crisis caused a great recession after the cost of housing fell by 31.8%, even lower than that of the Great Depression. Although the crash occurred in 2008, the first signs were observed in 2007 when the prices of homes were too high.

home

As a result, homeowners began to default on mortgage payments, leading to a downward economic turn which spread to the U.S. financial sector and eventually affected other countries. At the time, houses became extremely cheap, and homeowners were given loans worth up to 100% of the value of their new homes. Taking advantage of the profitable real estate sector, banks also made investments in subprime areas.

The affected institutions stretched from investment banking corporations to commercial banks, insurance companies, and lenders. The situation was so bad that financial institutions had to lay off their staff. Apart from financial institutions, the crisis affected individuals and businesses that were reliant on credit payments at the time. The economic disaster led to massive suffering on the part of businesses because banks stopped giving loans out. They did not trust anyone to pay back the loans due to the state of the economy.

Shortly after the crisis began, the American auto industry was on the edge of destruction and pleaded for a federal bailout. Unfortunately, banks were in the middle of damage control and bailouts were nearly impossible to get. Globally, share prices plunged, and the recession trickled down to other countries.

By the end of the year, most countries in the world including Germany, Japan, and China had gone into an economic recession as well. According to the National Bureau of Economic Research, the great recession had begun in December 2007, making it the third longest recession in the country since World War II.

In Europe, investors who had been involved with real estate securities in the U.S. took a hard hit. The same could be said for investors in smaller countries. However, China and Japan were able to escape that situation but registered huge losses where export was concerned. Their American and European markets were experiencing a fall in demand due to the recession.

Developing countries that depended on foreign investments for growth capital also lost their markets and investments. Since the largest countries were in a recession, the situation became a hopeless one with no chance of an easy recovery. Two years after the end of the recession, the unemployment failed to fall below 9 percent.

Why are banks looking to use this technology?

Banks are looking to use blockchain technology because its transparency can reduce the issue of financial losses that stem from a lack of it. There are three major ways in which the banks hope to achieve this:

1. Maintaining financial security

When banks have a bird’s eye view of all the financial transactions within an economy, it is easier to find discrepancies and adjust them. Due to the immutability and append-only function of a blockchain, it is easy for banks to keep open records of transactions that can be tracked easily.

Tracking cash flow can help institutions find and mitigate economic threats that may arise due to bad policy and bank operations. Using this technology, the banks can determine whether a financial institution, including shadow banks, requires support or control.

Another way that blockchain technology promotes financial security as a way to prevent an economic crisis is by providing access to information. With this information, these institutions can determine risks and potential points of failure within the system. It can also clarify the effects of various monetary policies and help out in the gathering of statistics for research purposes. Generally, if the banks have more information, then they can perform better and cut the costs associated with running separate systems as opposed to a single blockchain.

2. Preventing fraud

Banks can prevent fraud and bad debtors using smart contracts and digital cryptographic identities. Each institution can create smart contracts between the customers and banks, as well as between the banks and the central bank. This creates an immutable record of the exact terms of the contract and will only execute when the terms are fulfilled. Banks can also avoid loan fraud by using digital identities to find out the loan history of each customer, drastically lowering the chances of bad debt in the process.

The use of a cryptographic ledger ensures that stored information can only be accessed using cryptographic keys which are usually in possession of the owner of that information. A hacker would have to compromise every single system on a network to break such a system. This makes blockchain a secure way to store information.  

3. Eliminating shadow banking

According to the People’s Bank of China, shadow banking falls into three main asset classes–  entrusted loans, trust lending, and banks’ acceptances — which saw a $555 million increase in 2017. Using blockchain technology, banks can eliminate shadow banking since all transactions will be recorded.

Final thoughts:

The financial crisis of 2008 left many nations utterly devastated. The trickle-down affected various sectors even outside the financial sector, resulting in a near collapse of the economy. However, the world moved on from the effects of that event, and most countries have been able to pull themselves out of recession. However, it is essential to take measures that ensure that the crisis is not repeated.

For banks, the best bet may be the use of blockchain technology to securely store data, access information and ensure transparency in the system. Used properly, it can serve as an open system in which all transactions within the economy are recorded. With a clearer view of all banking processes, banks and other financial institutions can successfully prevent another economic crisis.

This article originally appeared on Mintdice.com

ByJayanthi

Introduction to Ethereum

Reading Time: 2 minutes

Just like Bitcoin, which is highly known, ‘Ethereum’ is yet another open source implementation of the Blockchain concept. However, the similarity between ‘Ethereum’ and ‘Bitcoin’ ends just there. While ‘Bitcoin’ is a cryptocurrency,  ‘Ethereum’ is a decentralized network for implementing ‘Smart contracts’. Recall, that ‘smart contracts’ are similar to normal contract clauses, but are automatically enforced without any interference from third parties.

The ‘Ethereum’ logo was first used in 2014 and the project was live on 30th July 2015 – so,  it is an absolutely brand new blockchain concept!  The ‘Ethereum’ idea was first conceived by Vitalik Buterin.

Now moving onto the article, the basic idea behind the blockchain technology  is the different nodes agreeing on transactions and having the same copy of the transaction. Instead of all the nodes in a network agreeing on the the coins moving towards and  away from a user(like in a Bitcoin), in a Ethereum network, the nodes have to agree on the smart contract transactions.

So, what can we do with a Ethereum blockchain?

Have an idea for an application? You can get it deployed on the ‘Ethereum’ blockchain. It is no longer a huge chore to build blockchain applications and definitely much more easier to get applications deployed on the Ethereum blockchin.

 You can create your own cryptocurrency, voting ballots, crowdsale or any idea of for a decentralized application without feelings and human emotions entwined in it. For more information about creating your own decentralized applications on the Ethereum blockchain please visit: https://www.ethereum.org/

Ethereum

To conclude, here are a few terms associated with ‘Ethereum’:

  1. Ether – is a form of currency that fuels the Ethereum network. It is specifically called as a “crypto fuel” and not as a cryptocurrency as it is used to pay for the smart contract services.
  2. Ethereum wallet – where will the ‘ethers’ be stored? In a Ethereum wallet of course! The Ethereum wallet is also used to “write, deploy and use smart contracts”
  3.  ‘EVM’ or ‘Ethereum virtual machine’- The EVM almost reminds me of the JVM or the ‘Java virtual machine’. The EVM runs on the Ethereum network and is a Turing  software. Similar to the JVM of the 90s, the EVM simplifies the process of creating applications. 

It should be noted that Ethereum  is another rapidly evolving technology. How the world will react to it and how the governments will react to it is left to be seen. This article is largely for informational purposes only!

Liked this article? Like and Share! 🙂