Sunday 19 August 2018

Introduction to Akka Framework

Current challenge in writing Distributed Application
 Writing concurrent programs is hard. Having to deal with threads, locks, race conditions, and so on is highly error-prone and can lead to code that is difficult to read, test, and maintain.
My assumption is that most of people have worked with the Java multithreading model, and they are aware of the fact that it is very difficult to write multithreaded concurrent applications. This is because we have to manage low-level details like locking an object, releasing the lock on the object, notifying, waiting for threads to join each other to complete a task, and freeing up resources that a thread holds. It is difficult for us to write multithreaded programs, because we have to focus more on thread management details instead of focusing on business logic only.
Many therefore prefer to avoid multithreading altogether. Instead, they employ single-threaded processes exclusively, relying on external services (such as databases, queues, etc.) to handle any needed concurrent or asynchronous operations. While this approach is in some cases a legitimate alternative, there are many scenarios in which it is simply not a viable option. Many real-time systems – such as trading or banking applications, or real-time games – don’t have the luxury of waiting for a single-threaded process to complete (they need the answer now!). Other systems are so compute- or resource-intensive that they would take an inordinate amount of time (hours or even days in some cases) to run without introducing parallelization into their code.
One fairly common single-threaded approach is to use an event-based, non-blocking paradigm. While this does help performance by avoiding context switches, locks, and blocking, it still does not address the issues of using multiple processors concurrently (doing so would require launching, and coordinating between, multiple independent processes).
So does this mean you have no choice but to journey deep into the bowels of threads, locks, and race conditions in order to build a concurrent application?
Thanks to the Akka framework, the answer is no. 
Akka Framework
In today's world, computer hardware is becoming cheaper and more powerful, as we have multiple cores on a single CPU chip. As cores keep on increasing, with the increasing power of hardware, we need a state of the art software framework which can use these cores efficiently.
Akka is such a framework, or you can say, a toolkit, which utilizes the hardware cores efficiently and lets you write performant applications.
As we are living in big data world, a lot of traffic comes to our servers, and we want our servers to respond in milliseconds instead of seconds. Akka is here to scale up the application as the load on it increases.
We want our application to run day and night continuously with high availability.
Akka is here to build fault tolerance for our application.
Akka is a toolkit for writing truly concurrent, fault-tolerant, distributed, and scalable applications, which can run for days, months, and years without stopping, and can heal themselves in case of failure. It is very hard to write concurrent applications using the plain Java multithreading model, which also satisfies fault-tolerant, distributed, and scalable properties. Akka provides a high-level of abstraction to build such an application that satisfy these properties. 
In short Akka is open source middleware for building highly concurrent distributed and fault tolerant systems on the JVM. Akka is built with Scala, but offers both Scala and Java APIs to developers

Akka follows reactive model principles.Reactive applications aim at replacing traditional multithreaded applications with an architecture that satisfies these requirements:
  • Resilient: Applications that can heal themselves, which means they can recover from failure, and will always be responsive, even in case of failure like if we get errors or exceptions
  • Elastic: A system which is responsive under varying amount of workload, that is, the system always remains responsive, irrespective of increasing or decreasing traffic, by increasing or decreasing the resources allocated to service this workload
  • Message Driven: A system whose components are loosely coupled with each other and communicate using asynchronous message passing, and which reacts to those messages by taking an action
  • Responsive: A system that satisfies the preceding three properties is called responsive

Monday 11 May 2015

Cracking Elitmus

There are 3 sections in Elitmus.

1- Quantitative Aptitude
2-Logical Reasoning
3-Verbal Ability

Basic Strategy: Attempt 7-8 questions in QA and LR and 10-12 in VA and try to more accurate as there is negative marking also. Please Don't Over attempt. And time management is another very important key to crack Elitmus. If you are leaving any section that will cost you.

Important links:

http://www.m4maths.com/  As it contains previous Elitmus questions.


QUANT Section 

DO's: If you do a topic, make it your own, Study the topic thoroughly ,go in deep details and be very sure. And try using the options to get answers as it will save your time.

DONT's : Don't try to brush up all the topics.Otherwise you willn't be able to solve questions.Don't over attempt.


Try to practice as much as you can.Number System,Progressions are important topics.Try to solve the question using options as it will save your time. Upto Level-2 of Quantitative Aptitude by Arun Sharma would be enough for this. 


Logical Reasoning Section:

In LR also practice as much as you can as there are no formulas in it.Your approach is very important. Practice previous years CAT questions. As some questions are repetitive.Logical Reasoning by Arun Sharma is fine.Don't over attempt otherwise you will lose percentile.

You can try cryptarithmetic on this link http://cryptarithmetic.in/. Go for cryptarithmetic question only if you are confident otherwise it will eat your time.

Important: Data Sufficiency

Verbal:

Those who have prepared for CAT need not worry about this section. It is no where near the level of CAT. For others practice is the key. You can't improve your english overnight. So go through the previous Elitmus papers.You will get the idea. Try passage and parajumbling as 3 passage usually comes.




Hope this blog will help you. 

Do share your views in comments.

 If you liked this blog, do share with your friends on social network.










Thursday 5 February 2015

Software AG

Hi All,

Hope that all of you are preparing well for Software AG.

I am sharing experience of software AG.First of all there was written test which constitute of Core Java and Aptitude.Aptitude was quite easy and it also contains some logical reasoning questions also so you can prepare them through Arun Sharma. Java was quite tough.You should be familiar with Collections very well and should run the basic questions of them.It is one of the most important topics in the test.Next is multi-threading so go through all the concepts and try to do some questions on your own.Besides these topics OOPS concepts were there and other basic concepts of JAVA.
Java plays an important role in your selection,So concentrate more on it.

After the written round only 20 qualified for GD round out of 70. GD round was also important as it was elimination round.So please take care of that also.And put up your points in proper manner.Don't argue too much and let other people speak when they are speaking.

After GD round only 10 qualified for interview.Go through SCJP book by Katthy Sierra. As it has covered all the good concepts.And think about the practical example of very concept i.e abstract classes and interfaces and you should which one to use practically when and where.Don't give the theoretical concepts to explain the difference.So google all the practical examples of concepts.
And read about the Singleton design pattern also. And Be confident of what are you saying.You should the how different data structures are implemented in your system.Prepare Collections and Multi-threading very well.You should be able to write programs also.I was not selected in the interview but it was great experience.

All the very best to all

Hope this blog will help you. 

Do share your views in comments.

 If you liked this blog, do share with your friends on social network.