Tuesday, February 9

The Real Pay As You Go - AWS Lambda

My Serverless Computing post received queries about AWS Lambda and microservices.  AWS Lambda  is not microservice but you can create Microservices using AWS Lambda function and API Gateway that would trigger the function (if you are familiar with AWS services). Anyway for now lets understand AWS Lambda

What is AWS Lambda?

AWS Lambda is  famous in serverless world. Amazon Web Services did not invent serverless but their Lambda service has popularized concept of Serverless Computing. So whats AWS Lambda?

AWS Lambda is an event-driven, serverless computing platform provided by Amazon as a part of Amazon Web Services. It is a computing service that runs code in response to events and automatically manages the computing resources required by that code. It was introduced in November 2014.

A simple case for AWS Lambda

  • Take example of a website hosted on AWS EC2  with auto scaling enabled
  • The website is accessed by 100 concurrent users
  • At 12pm PST the administrator starts to uploads 100 videos to the server or starts a batch job for processing. 
  • This increases the load on the EC2 server, and triggers the auto-scaling feature, EC2 provisions more number of instances to meet this requirement. 
  • From triggering auto-scaling to provision more instances takes X milliseconds duration which eventually results in slow actions on the website when the initial spike in the task is received. 
  • This problem of slow response can be solved using distributed computing and allocating dedicated instance for website and 2nd dedicated EC2 for running the back-end code. 
  • When the users are reading blog on the website & the back-end job is running in parallel the performance is not affected. However, video processing still takes a lot of time, as the load increases, because auto-scaling takes comparatively more time on EC2.
  • A better solution is a stateless system called AWS Lambda

AWS Lambda Features

AWS Lambda computing services is event-driven & can be triggered by an message or email 

AWS Lambda computing services is serverless

AWS Lambda is stateless & runs process as background tasks in most efficient manner.

AWS Lambda Components

AWS Lambda is one of the computing services provided by AWS, which is event-driven and serverless. It is a stateless serverless system that helps us run our background tasks in the most

  • Lambda function: Whatever custom codes and libraries that we create are called a function.
  • Event source: Any AWS or custom service that triggers our function and helps in executing its logic
  • Log streams: Lambda monitors each function and its metric can be viewed on CloudWatch, Developer can code our function in a way that it provides us custom logging statements to let us analyze the flow of execution and performance of each function.

 

AWS Lambda Working

 AWS Lambda

 

AWS Lambda Key Benefits

  • No need for provisioning server - Due to its serverless architecture
  • No need to set up any virtual machine (VM)
  • Distributed Event Driven computing and highly scalable service allows developers to run and execute codes in response to events
  • Cost Benefits of - just pay for the compute time taken and only when the code runs. Also, pay only for the used memory and the number of processed code requests, and the code execution time is rounded up by 100 milliseconds.
  • Allows code performance monitoring in real time through Cloud Watch

AWS Lambda Limitations

By design AWS Lambda is not for long running tasks and it has few limitations & drawback

  • The maximum execution duration per request is set to 300 seconds
  • The maximum disk space provided is 512 MB for the runtime environment
  • Memory volume varies from 128 MB to 1,536 MB
  • Event request body cannot exceed more than 128 KB
  • Code execution timeout is only 5 minutes
  • Lambda functions write their logs only to CloudWatch, which is the only tool available  to monitor or troubleshoot our functions


 

Tuesday, February 2

Why is Natural Language Processing making such advances?

According to Wikipedia the field of study that focuses on the interactions between human language and computers is called natural language processing, or NLP for short. It sits at the intersection of computer science, artificial intelligence, and computational linguistics. There are other definitions that you can Google and find so lets jump to what is NLP and why is it making rapid advances in field of Artificial Intelligence.

Natural Language Processing

Natural language processing (NLP) is a field of artificial intelligence in which computers analyze, understand, and derive meaning from human language in a smart and useful way. By utilizing NLP, developers can organize and structure knowledge to perform tasks such as automatic stigmatization, translation, named entity recognition, relationship extraction, speech recognition, and topic segmentation.

“Apart from common word processor operations that treat text like a mere sequence of symbols, NLP considers the hierarchical structure of language: several words make a phrase, several phrases make a sentence and, ultimately, sentences convey ideas,” John Rehling, an NLP expert at Meltwater Group, says in How Natural Language Processing Helps Uncover Social Media Sentiment. “By analyzing language for its meaning, NLP systems have long filled useful roles, such as correcting grammar, converting speech to text and automatically translating between languages.”

NLP is used to analyze text, allowing machines to understand how humans speak. This human-computer interaction enables real-world applications like automatic text summarization, sentiment analysis, topic extraction, named entity recognition, parts-of-speech tagging, relationship extraction, stemming, and more. NLP is commonly used for text mining, machine translation, and automated question answering.

NLP is characterized as a difficult problem in computer science. Human language is rarely precise, or plainly spoken. To understand human language is to understand not only the words, but the concepts and how they’re linked together to create meaning. Despite language being one of the easiest things for the human mind to learn, the ambiguity of language is what makes natural language processing a difficult problem for computers to master.

Where can Natural Language Processing be used?

NLP algorithms allow developers and businesses to create software that understands human language. Due to the complicated nature of human language, NLP can be difficult to learn and implement correctly. However, with the knowledge gained from this article, you will be better equipped to use NLP successfully, no matter your use case.

Examples of natural language processing

NLP algorithms are typically based on machine learning algorithms. Instead of hand-coding large sets of rules, NLP can rely on machine learning to automatically learn these rules by analyzing a set of examples (i.e. a large corpus, like a book, down to a collection of sentences), and making a statistical inference. In general, the more data analyzed, the more accurate the model will be.

Natural Language Processing application in business use cases

Natural language processing has a wide range of applications in business.

As just one example, brand sentiment analysis is one of the top use cases for NLP in business. Many brands track sentiment on social media and perform social media sentiment analysis. In social media sentiment analysis, brands track conversations online to understand what customers are saying, and glean insight into user behavior.

“One of the most compelling ways NLP offers valuable intelligence is by tracking sentiment — the tone of a written message (tweet, Facebook update, etc.) — and tag that text as positive, negative or neutral,” according to Rehling.

Similarly, Facebook uses NLP to track trending topics and popular hashtags.

“Hashtags and topics are two different ways of grouping and participating in conversations,” Chris Struhar, a software engineer on News Feed, says in How Facebook Built Trending Topics With Natural Language Processing. “So don’t think Facebook won’t recognize a string as a topic without a hashtag in front of it. Rather, it’s all about NLP: natural language processing. Ain’t nothing natural about a hashtag, so Facebook instead parses strings and figures out which strings are referring to nodes — objects in the network. We look at the text, and we try to understand what that was about.”

It’s not just social media that can use NLP to its benefit. There are a wide range of additional business use cases for NLP, from customer service applications (such as automated support and chatbots) to user experience improvements (for example, website search and content curation). One field where NLP presents an especially big opportunity is finance, where many businesses are using it to automate manual processes and generate additional business value.

Other practical uses of NLP include monitoring for malicious digital attacks, such as phishing, or detecting when somebody is lying. And NLP is also very helpful for web developers in any field, as it provides them with the turnkey tools needed to create advanced applications and prototypes.

MUSTREAD : How can you use Index Funds to help create wealth? HDFC MF Weekend Bytes

https://www.hdfcfund.com/knowledge-stack/mf-vault/weekend-bytes/how-can-you-use-index-funds-help-create-wealth?utm_source=Netcore...