Thoughts on AI/ML

I’ve been wanting to organize my thoughts around Artificial Intelligence and Machine Learning and their impact on our lives for a while now, and my 15-mile bike ride this morning inspired me just to do that.

We are living in very exciting times. Finally, we have enough data that’s good quality and labeled, we have enough space and compute power so we can start enjoying the fruits of many decades of hard work, in terms of real life applications of AI & ML.

From Siri to Google Assistant, from Autonomous Vehicles to Robotics, AI is part of our day-to-day life.

There are a lot discussions about the potential dangers of AI, and rightly so. I’m cautiously optimistic. Like many tools we invent and use; AI can be helpful or harmful. A knife itself is not dangerous, but it can be in the wrong hands with harmful intentions. It can also look like a brush of a talented painter in the hands of a passionate chef!

One fear that seems to come up over and over again is the fear of AI being “better than humans”, better than us. How dare they?! 🙂 With personal experience and humility, I can assure you; many things around us, whether machine or alive, are better than humans in so many different and stunning ways. A Tiger is infinitely better than us in running and surviving in the wild. An Eagle can see and recognize a mouse from a far distance, while gracefully flying over the clouds. A calculator can do crazy math in milliseconds. A vacuum is much better in cleaning and dusting the home than we are and a car can take us in distant places that we cannot go by simply walking. We are surrounded by things, beings, tools that are better than us in some way or another, and usually in many areas combined.

So we need to recognize and accept that, while being intelligent and proactive about the potential challenges and pitfalls. Even though, a knife is not inherently harmful, we need to be smart about not letting a 3 year old to play with it.

What became so obvious to me recently is that there’s definitely a huge cost of potential loss of opportunity, if we do not use these amazing technologies for the betterment of humanity. Can you imagine a life without electricity or the Internet? Would the human experience be better or worse without these technologies? There is a moral obligation to weigh these considerations.

One of my goals in life is to reduce human suffering; whether that’s the suffering of my own, my family, my friends, my colleagues, my neighbors, my community, my pets, fellow animals, the nature… Obviously, the bigger positive impact I can make, the better. So why not utilize the technology that’s available? Even if we can make an existing positive impact slightly better, slightly more efficient, less wasteful, faster, more available, more accessible… why not partner with technology to achieve these goals?

The possibilities of correctly applied AI in the following domains excite me the most:

Education: Understanding the Process of Learning and Personalized Education. Imagine helping a young child to learn better, in the way that he or she is wired and understands better. Imagine helping young professionals to advance in their fields, in a personalized way. I always thought that before anything else, Education comes first! I am looking forward to seeing how we can improve our lives in this area with the help of technology (in whatever form it comes).

Healthcare: Specifically in diagnosis, personalized treatment, drug discovery and discovery in general. AI and technology can provide drastically different; a much more positive and trusting relationship with the hospitals, our doctors and other partners in the medical field.

Mental Health: Understanding Human Mind and Psychology is no small task. We can discover hidden patterns and trends and work our way to a happier existence!

I have a few personal ideas on how we can utilize Computer Vision and AI to reduce mental stress and suffering and improve general well being. More to come on that in my future blogs… 🙂

Discovery, Exploration & Inspiration: I believe one of the most interesting applications of AI is to recognize or expose the patterns that we are not able to see. Whatever your domain is, AI can help you explore more deeply and inspire you.

We cannot finish this blog without talking about the “bias”. AI bias is an anomaly in the output of machine learning algorithms. Personally, I don’t think we will ever have any AI without any bias. Because the whole system is built by humans and humans have biases! And who can’t tell that certain bias is healthy and needed. Let’s consider 2 situations.

In one, there’s a baby is in a building that’s on fire. A machine learning or an AI algorithm without any bias might find several adults risking their lives to save the baby illogical. If all lives are equal, why is it a better decision to risk multiple humans lives to save a youngster; especially considering over population?

In second situation, we have 85 year old person having a heart transplant. A machine learning or an AI algorithm without any bias might find that decision illogical. Wasting time and resources on already an older person when those resources can be used to improve or even save many other younger and healthier people with better chances.

As you can see, these are very hard, moral questions that we will have to face working with machine learning and AI. I believe the best approach is to keep getting involved, keep having open conversations and discussions at every level; from researchers to technology leaders, from students to cashiers at the grocery store. These technologies will be affecting all of us in varying degrees and inclusiveness is going to help us cover as much areas as possible that we might be missing otherwise. People from different background and culture will bring new data, new ideas and discussion points to the table.

I do have a few ideas about bias detection that I’m researching, keep tuning in for new blog items!

As I said in the beginning, I am cautiously optimistic. I’m super excited about the possibilities of human journey evolving on the path of having helpful data and information that allows us to take the right actions versus manipulation, in favor of responsible AI that empowers humanity versus controlling it. Freedom over Slavery, Abundance over Scarcity, Innovation over Status Quo. Good over Evil!

I’ve always been fascinated with Consciousness. During my college years, I came across David Chalmers‘ “The Conscious Mind” book in the library, which explores The Easy and The Hard Problem of Consciousness. Even with my very limited English at the time, I thought it was full of fundamental questions about human existence. I think AI can help us explore not only our physical body, brain and consciousness, but also our environment and Nature in general in new, exciting and powerful ways.

I would like to finish this blog with another question: Is there a chance of AI becoming self-conscious and sentient? I asked this question to my meditation teacher, and his answer was: “I don’t think much about AI. If it becomes conscious, cool. But really most humans are just machines on autopilot, so what’s the difference?”

What do you think?

Learn more about Ethical Decision Making

Thanks for sticking around and checking this page out. As a bonus, here’s a very cute and fascinating video from OpenAI on how AI learns.

Chatbot with Rivescript & p5js

I recently came across a very cool scripting language; Rivescript, which can be used in chatbots or other conversational entities. It’s a plain text keeps simple replies simple; for example:

This will add a reply so that when a human says the words “Hello bot”, the bot would respond with “Hello, human!”

With more advanced RiveScript code we can learn and repeat user variables and use more complicated trigger matching patterns:

This looks like AIML (Artificial Intelligence Markup Language), doesn’t it?

Here’s a comparison of Rivescript vs. AIML

In my latest project; I used p5js and it’s Speech to Text (STT) and Text to Speech (TTS) libraries to create this little chatbot program.

Please try in Chrome and you will need to give permission to microphone.

Please click on me to speak with BlueBot

Please see my previous post to learn more about p5js and several cool Machine Learning projects.

Please click on me to see the blog post

Machine Learning Projects with JavaScript

I’m very excited to have completed 3 fun Machine Learning projects. I will try to explain in this blog how this works and include the resources/links.

My first project is Speech Recognition, which repeats what the user says on a colorful canvas.

2nd fun project is Draw , which recognizes user’s command and draws on the canvas.

And Body Parts via PoseNet processes the image it sees via the camera and recognizes various body parts.

All the points the PoseNet model can identify. Source : https://github.com/tensorflow/tfjs-models/tree/master/posenet

These projects were done by p5js, which is a JavaScript library for creative coding.

You could immediately start coding by using p5js’s online editor. https://editor.p5js.org/

There are tons of fun examples on the website: https://p5js.org/examples/.

I incorporated ml5js libraries for the machine Learning portion of the code. ml5.js is machine learning for the web in your web browser. Through some clever and exciting advancements, the folks building TensorFlow.js figured out that it is possible to use the web browser’s built in graphics processing unit (GPU) to do calculations that would otherwise run very slowly using central processing unit (CPU).

PoseNet is a machine learning model that allows for Real-time Human Pose Estimation.

PoseNet can be used to estimate either a single pose or multiple poses, meaning there is a version of the algorithm that can detect only one person in an image/video and one version that can detect multiple persons in an image/video.

The original PoseNet model was ported to TensorFlow.js by Dan Oved. For background, read Real-time Human Pose Estimation in the Browser with TensorFlow.js.

p5js library can be found on github here: https://github.com/processing/p5.js

ml5js library can be found on github here: https://github.com/ml5js

ml5js libraries currently support Chrome, so please use Chrome to review my sample projects above.

Also, check out Daniel Shiffman’s Coding Train youtube channel for very helpful and entertaining tutorials.

I hope you enjoy these 3 fun projects and hope they inspire you to learn more about these technologies.

Thank you! And Happy Valentine’s Day!

Ebru

Learning AWS…

There are so many great resources to learn more about AWS solutions and offerings.

I thought this youtube video was an excellent introduction. It maps the traditional architecture to AWS. Check it out:

Here’s FB architecture with traditional terminology
Here’s FB on AWS

AWS has one of the best documentations out there, so for any questions, this is the most reliable resources to go to: https://docs.aws.amazon.com/index.html

This is also a great resource for frameworks and best practices:

AWS Well-Architected Framework

What are your favorite AWS resources for learning or practicing?

Amazon’s Alexa

Unless you’ve been living on another planet, you’ve probably heard about Amazon’s Alexa. It is a pretty cool cloud-based voice service.

What can you do with Alexa?

I’ve been looking into the technology behind Alexa. At the high level, it’s simple, yet elegant.

I believe Alexa uses SSML; Speech Synthesis Markup Language, when converting Text to Speech (TTS); because she sounds very conversational; rather than a robot reading the text word by word.

Here are a few more technical diagrams of how it works at the high level:

ASR Overview

I thought that the developing an Alexa Skill was straight forward and user friendly; especially if you have used any ML/AI tools. Navigation and setup look similar to others.

I created a few new test skills by using existing templates and added new custom intents. It was fun and I can see by a little bit of creativity, some great skills can be added to this fun smart tool!

Please watch my demo down below:

  • First skill is a game template where I added new custom intents.
  • Second skill is calling a fun external API that returns the number of astronauts currently in space and their names. 🙂 http://api.open-notify.org/astros.json

Another interesting video about “Lessons Learned Growing Alexa” and a few fun capabilities/skills that the Amazon Team discusses.

Bonus point: If you’d like to do a deep dive and create Alexa Skills with serverless backend, this youtube video should help and here are some more technical diagrams from the presentation:

Build a Serverless Back End for Your Alexa-Based Voice Interactions

IAM Management Flow

PS: Photos/Graphics are from Amazon.com

System Design & Architecture Considerations: Samples and Resources

AWS – Well Architected
Infrastructure as a Service (i.e. AWC EC2), Platform as a Service (i.e. AWS Lamda or GCP App Engine, Software as a Service (i.e. Google Email)
Resiliency Design Patterns (+Retry)
ACID Properties
SOLID Principles in Software Architecture

8 Software Engineering Principles (Including SOLID)

System Design Interview Preparation Slides: https://drive.google.com/file/d/1IVAWvgvvpViyvBw9NB0JBgWsrfYj11Nl/view

How to rock a systems design interview

System Design Interviewing

Scalability for Dummies

Introduction to Architecting Systems for Scale

Think of CDN, Load Balancer, Multiple Servers, Cache, Multiple DBs or Sharding, Distributed

Scalable System Design Patterns

Scalable Web Architecture and Distributed Systems

What is the best way to design a web site to be highly scalable?

How web works?

https://github.com/donnemartin/system-design-primer

Requirements
Non-Functional Requirements
Where we store the data?
SQL vs. NoSQL Comparison

Detailed SQL/NoSQL , CAP, ACID/BASE Discussion

CAP Theorem
ACID vs BASE
SQL vs. Non-SQL

API GATEWAY

API Definition Sample
Load Balancer / OSI / Communication Protocol Layers

LOAD BALANCING METHODS

There is a variety of load balancing methods, which use different algorithms for different needs.

  • Least Connection Method — This method directs traffic to the server with the fewest active connections. This approach is quite useful when there are a large number of persistent client connections which are unevenly distributed between the servers.
  • Least Response Time Method — This algorithm directs traffic to the server with the fewest active connections and the lowest average response time.
  • Least Bandwidth Method – This method selects the server that is currently serving the least amount of traffic measured in megabits per second (Mbps).
  • Round Robin Method — This method cycles through a list of servers and sends each new request to the next server. When it reaches the end of the list, it starts over at the beginning. It is most useful when the servers are of equal specification and there are not many persistent connections.
  • Weighted Round Robin Method — The weighted round-robin scheduling is designed to better handle servers with different processing capacities. Each server is assigned a weight (an integer value that indicates the processing capacity). Servers with higher weights receive new connections before those with less weights and servers with higher weights get more connections than those with less weights.
  • IP Hash — Under this method, a hash of the IP address of the client is calculated to redirect the request to a server.

How to Identify Bottlenecks?

  • Performance Testing
    • Load Testing (Expected Load, how the system behaves, it’s scalable)
    • Stress Testing (Breaking Point; which components and resources memory, CPU, disk I/O)
    • SOAK Testing (Leaks in resources etc; i.e. memory)
    • Apache Jmeter can be used to generate large load
  • Health Monitoring
  • Metrics, Dashboards, Alerts that shows:
    • Latency (some kind of delay)
    • Traffic
    • Errors
    • Saturations
  • Auditing (Weak or Strong Auditing; Lamba system)
  • Play/Game dates

How to Fix Bottlenecks?

  • Optimise processes and increase output/products/services using the same resources (Vertical scaling)
  • Preparing before hand during non-peak hours (Pre processing / CRON job)
  • Keep backups and avoid single point failure (Replications / Master-Slave )
  • Hire more resources (Horizontal scaling)
  • Manage resources based on the business needs (7 pizza chef, 3 garlic bread) and separate duties, entities (Microservices)
  • Distributed Systems / Positioning. Have multiple DataCenters for Disaster Recovery and Business Continuity (maybe even in different countries). This might also help with response time (depending on how the data is routed) + Fault Tolerance.
  • LoadBalancing can help to be more efficient with using the resources (Send the customer orders to Pizza Shop1 vs. Pizza Shop2; based on the order, location, wait time etc).
  • Decouple the system; separate out the concerns… Order Processing, Processing, Delivery etc.
  • Put Metrics in place (Reporting, Analytics, Auditing, Machine Learning)
  • Make sure the solution is Extensible
Basic Latency Reduction Techniques
Tolerating Faults vs. Tolerating Variablity
Latency Tolerating Techniques
Selective Replication

Jeff Dean: “Achieving Rapid Response Times in Large Online Services” Keynote

Back of the Envelope Calculation – The Numbers Everyone Should Know

http://highscalability.com/blog/2011/1/26/google-pro-tip-use-back-of-the-envelope-calculations-to-choo.html

Kilobytes Megabytes Gigabytes Terabytes: https://web.stanford.edu/class/cs101/bits-gigabytes.html

System Design Interview Process – Summary
Data Flow Simulation – How many videos?
Technology Stack

System Design Samples

Dropbox Overview
Dropbox Detail
FB Messenger Overview
FB Messenger Detail
FB News Feed Overview
Instagram Overview
Instagram Detail
Pastebin Overview
Pastebin Detail
Short URL Overview
Short URL Detail
Ticket Master Overview
Twitter Overview
Twitter Detail
Twitter Search Overview
Twitter Search Detail
Youtube Overview
Youtube Detail
Web Crawler Overview
Web Crawler Detail
Uber Backend Overview

http://highscalability.com/blog/2016/10/12/lessons-learned-from-scaling-uber-to-2000-engineers-1000-ser.html

Stock Exchange (i.e. NASDAQ)
Stock Exchange – 2
UBER Detail
Yelp Overview
Facebook High Level Generic
FB High Level AWS

Introduction to AWS Services by AWS Training Center

Sports Score Update System
Varnish – To group similar requests
Hysterix – Circuit Breaker
Fast Cast
High Level – Notification Service
Temporary Storage / Database Considerations

System Design Interview – Notification System

Distributed Message Queue – Problem Statement
Functional & Non-Functional Requirements
High Level Architecture – Distributed Message Queue
Virtual IP and Load Balancer
FrontEnd Service

FRONTEND SERVICE COMPONENTS

Request Validation

  • Required parameters are present
  • Data falss within an acceptable range

Authentication/Authorization

  • Authentication is the process of validating the identity of a user or a service
  • Authorization is the process of determining whether or not a specific actor is permitted to take action

TLS Termination

  • TLS is a protocol that aims to provide privacy and data integration
  • TLS termination refers to the process of decrypting request and passing on an unencrypted request to the back end service
  • SSL on the load balancer is expensive
  • Termination is usually handled by not a FrontEnd service itself but a separate TLS HTTP proxy that runs as a process on the same host

Server-side encryption

  • Messages are encrypted as soon as FrontEnd receives them
  • Messages are stored in encrypted form and FrontEnd decrypts messages only when they are sent back to a consumer

Caching

  • Cache stores copies of source data
  • It helps reduce load to backend services, increases overall system throughput and availability, decreases latency
  • Stores metadata information about the most actively used queues
  • Stores user identity information to save on calls to auth services

Rate limiting (Throttling)

  • Throttling is the process of limiting the number of requests you can submit to a given operation in a given amount of time
  • Throttling protects the web service from being overwhelmed with requests
  • Leaky bucket algorithm is one of the most famous

Request dispatching

  • Responsbile for all the activities associated with sending requests to backend services (client management, response handling, resource isolation, etc)
  • Bulkhead pattern helps to isolate elements of an application into pools so that if one fails, the others will continue function
  • Circuit Breaker pattern prevents an application from repeatedly trying to execute an operation that’s likely to fail

Request de-duplication

  • May occur when a response from a successful sendMessage request failed to reach a client
  • Lesser an issue for “at least once” delivery semantics, a bigger issue for “exactly once” and “at most once” delivery semantics
  • Caching is usually used to store previously seen request ids
MetaData Service – Sharding
BackEnd Service
Option A – Leader-Follower
Option B – Small Cluster of Independent Hosts
Comparison of Cluster Managers
Other Consideration for Distributed Message Queue

System Design Interview – Distributed Message Queue

Top K (Most Viewed Video) – High Level Architecture

Kafka – Messaging Terms
Kafka Terminology
Lambda Architecture

System Design Interview – Top K Problem

Designing a URL Shortening like Tiny URL: https://www.educative.io/courses/grokking-the-system-design-interview/m2ygV4E81AR

Capacity Estimation and Constraints for Tiny URL #

Our system will be read-heavy. There will be lots of redirection requests compared to new URL shortenings. Let’s assume a 100:1 ratio between read and write.

Traffic estimates: Assuming, we will have 500M new URL shortenings per month, with 100:1 read/write ratio, we can expect 50B redirections during the same period: 100 * 500M => 50B

What would be Queries Per Second (QPS) for our system? New URLs shortenings per second: 500 million / (30 days * 24 hours * 3600 seconds) = ~200 URLs/s

Considering 100:1 read/write ratio, URLs redirections per second will be: 100 * 200 URLs/s = 20K/s

Storage estimates: Let’s assume we store every URL shortening request (and associated shortened link) for 5 years. Since we expect to have 500M new URLs every month, the total number of objects we expect to store will be 30 billion: 500 million * 5 years * 12 months = 30 billion

Let’s assume that each stored object will be approximately 500 bytes (just a ballpark estimate–we will dig into it later). We will need 15TB of total storage: 30 billion * 500 bytes = 15 TB https://js.educative.io/static/runjs/index.html?id=ULRhG

Bandwidth estimates: For write requests, since we expect 200 new URLs every second, total incoming data for our service will be 100KB per second: 200 * 500 bytes = 100 KB/s

For read requests, since every second we expect ~20K URLs redirections, total outgoing data for our service would be 10MB per second: 20K * 500 bytes = ~10 MB/s

Memory estimates: If we want to cache some of the hot URLs that are frequently accessed, how much memory will we need to store them? If we follow the 80-20 rule, meaning 20% of URLs generate 80% of traffic, we would like to cache these 20% hot URLs.

Since we have 20K requests per second, we will be getting 1.7 billion requests per day: 20K * 3600 seconds * 24 hours = ~1.7 billion

To cache 20% of these requests, we will need 170GB of memory. 0.2 * 1.7 billion * 500 bytes = ~170GB

One thing to note here is that since there will be many duplicate requests (of the same URL), our actual memory usage will be less than 170GB.

** High-level estimates:** Assuming 500 million new URLs per month and 100:1 read:write ratio, following is the summary of the high level estimates for our service:

New URLs200/s
URL redirections20K/s
Incoming data100KB/s
Outgoing data10MB/s
Storage for 5 years15TB
Memory for cache170GB
Youtube’s Daily Video Storage Estimate

Designing Instagram: https://www.educative.io/courses/grokking-the-system-design-interview/m2yDVZnQ8lG

Data Size Estimation for Instagram #

Let’s estimate how much data will be going into each table and how much total storage we will need for 10 years.

User: Assuming each “int” and “dateTime” is four bytes, each row in the User’s table will be of 68 bytes: UserID (4 bytes) + Name (20 bytes) + Email (32 bytes) + DateOfBirth (4 bytes) + CreationDate (4 bytes) + LastLogin (4 bytes) = 68 bytes

If we have 500 million users, we will need 32GB of total storage. 500 million * 68 ~= 32GB

Photo: Each row in Photo’s table will be of 284 bytes: PhotoID (4 bytes) + UserID (4 bytes) + PhotoPath (256 bytes) + PhotoLatitude (4 bytes) + PhotoLongitude(4 bytes) + UserLatitude (4 bytes) + UserLongitude (4 bytes) + CreationDate (4 bytes) = 284 bytes

If 2M new photos get uploaded every day, we will need 0.5GB of storage for one day: 2M * 284 bytes ~= 0.5GB per day For 10 years we will need 1.88TB of storage.

UserFollow: Each row in the UserFollow table will consist of 8 bytes. If we have 500 million users and on average each user follows 500 users. We would need 1.82TB of storage for the UserFollow table: 500 million users * 500 followers * 8 bytes ~= 1.82TB

Total space required for all tables for 10 years will be 3.7TB: 32GB + 1.88TB + 1.82TB ~= 3.7TB

https://cloud.google.com/docs/compare/aws

GCP-AWS Service comparisons

The following table provides a side-by-side comparison of the various services available on AWS and Google Cloud.

Service CategoryServiceAWSGoogle Cloud
ComputeIaaSAmazon Elastic Compute CloudCompute Engine
 PaaSAWS Elastic BeanstalkApp Engine
 FaaSAWS LambdaCloud Functions
ContainersCaaSAmazon Elastic Kubernetes Service, Amazon Elastic Container ServiceGoogle Kubernetes Engine
 Containers without infrastructureAWS FargateCloud Run
 Container registryAmazon Elastic Container RegistryContainer Registry
NetworkingVirtual networksAmazon Virtual Private CloudVirtual Private Cloud
 Load balancerElastic Load BalancerCloud Load Balancing
 Dedicated Interconnect connectionAWS Direct ConnectCloud Interconnect
 Domains and DNSAmazon Route 53Google Domains, Cloud DNS
 CDNAmazon CloudFrontCloud CDN
 DDoS firewallAWS Shield, AWS WAFGoogle Cloud Armor
StorageObject storageAmazon Simple Storage ServiceCloud Storage
 Block storageAmazon Elastic Block StorePersistent Disk
 Reduced-availability storageAmazon S3 Standard-Infrequent Access, Amazon S3 One Zone-Infrequent AccessCloud Storage Nearline and Cloud Storage Coldline
 Archival storageAmazon GlacierCloud Storage Archive
 File storageAmazon Elastic File SystemFilestore
 In-memory data storeAmazon ElastiCache for RedisMemorystore
DatabaseRDBMSAmazon Relational Database Service, Amazon AuroraCloud SQLCloud Spanner
 Document data storageAmazon DocumentDBFirestore
 In-memory data storageAmazon ElastiCacheMemorystore
 NoSQL: Key-valueAmazon DynamoDBFirestore (document workloads), Cloud Bigtable (key/value workloads), Cloud Spanner (scale-out relational workloads)
 NoSQL: IndexedAmazon SimpleDBFirestore
 SQLAmazon AuroraCloud Spanner
Data analyticsData warehouseAmazon RedshiftBigQuery
 Query serviceAmazon AthenaBigQuery
 MessagingAmazon Simple Notification Service, Amazon Simple Queueing ServicePub/Sub
 Batch data processingAmazon Elastic MapReduce, AWS BatchDataprocDataflow
 Stream data processingAmazon KinesisDataflow
 Stream data ingestAmazon KinesisPub/Sub
 Workflow orchestrationAmazon Data Pipeline, AWS GlueCloud Composer
Management toolsDeploymentAWS CloudFormationCloud Deployment Manager
 Cost managementAWS BudgetsCost Management
OperationsMonitoringAmazon CloudWatchCloud Monitoring
 LoggingAmazon CloudWatch LogsCloud Logging
 Audit loggingAWS CloudTrailsCloud Audit Logs
 DebuggingAWS X-RayCloud Debugger
 Performance tracingAWS X-RayCloud Trace
Security & identityIAMAmazon Identity and Access ManagementIdentity and Access Management
 Secret managementAWS Secrets ManagerSecret Manager
 Encrypted keysAWS Key Management ServiceCloud Key Management Service
 Resource monitoringAWS ConfigCloud Asset Inventory
 Vulnerability scanningAmazon InspectorWeb Security Scanner
 Threat detectionAmazon GuardDutyEvent Threat Detection (beta)
 Microsoft Active DirectoryAWS Directory ServiceManaged Service for Microsoft Active Directory
Machine learningSpeechAmazon TranscribeSpeech-to-Text
 VisionAmazon RekognitionCloud Vision
 Natural Language ProcessingAmazon ComprehendCloud Natural Language API
 TranslationAmazon TranslateCloud Translation
 Conversational interfaceAmazon LexDialogflow Enterprise Edition
 Video intelligenceAmazon Rekognition VideoVideo Intelligence API
 Auto-generated modelsAmazon SageMaker AutopilotAutoML
 Fully managed MLAmazon SageMakerAI Platform
Internet of ThingsIoT servicesAmazon IoTCloud IoT

From <https://cloud.google.com/docs/compare/aws>

Monolithic vs. Microservices Architecture

Monolithic vs. Microservices Architecture Comparison

SOAP vs. REST
Hadoop – MapReduce Phases
Hadoop – MapReduce Essentials
Characteristics of MapReduce
Steps for Building a MapReduce Program

MapReduce in Hadoop – by Simplilearn

Kubernetes – Multi-Port Services
Kubernetes – Headless
Kubernetes – Headless Services
Kubernetes – NodePort Services (Not Secure)
Kubernetes – Ingress & LoadBalancer
Ingress Controller
Kubernetes
Youtube daily video storage requirements estimate

ENTERPRISE ARCHITECTURE (EA)

The Open Group Architecture Framework (TOGAF)

TOGAF
Enterprise Architecture – Zachman Framework

Google G2 Library & Hilbert Curve

http://bit-player.org/extras/hilbert/hilbert-construction.html

Credits: Google Cloud, Grokking, System Design Interview, AWS Training Center, Simplilearn

Cloud Architecture Considerations.

What are some of the main areas to consider while building a cloud based solutions?

Areas to consider:

  • Business Case (Define Opportunities, Inefficiencies, Cost Metrics, “As is” vs “To Be”, ROI)
  • Applications & Application Interfaces/API Services
  • References
  • Devices (Connectivity and Management)
  • Architectures
  • End Points
  • Governance/Security (IAM, Encryption)
  • Data/Storage
  • Capacity
  • Processing
  • Speed/Performance/Response Time
  • Services / DevOps
  • Implementation Roadmap
  • Infrastructure Services
  • Prototype
  • QA/Testing Strategies/Automation
  • Technology Selection and Pilot
  • SDLC (including Cloud SDLC)
  • Catalogues and Frameworks
  • Analytics and Insights
  • Presentation and Business Connectivity
  • Expansions and Optimizations
  • Growth Models
  • Disaster Recovery

Watch out for:

  • Things get complex easily and quickly
  • Start with Logical Architecture and then move to Physical Technology
  • Consider necessary skills, tools and processes
  • Self Motivation and Innovation
  • Bringing Value vs Bringing “the coolest technology”
  • Architecture and Solution we build needs to be holistic (works for cloud, as well as on-premise/legacy)

In general the phases should follow as:

  • Logical Architecture
  • Physical Architecture
  • Technology and Tools
  • Testing and Deployment
  • Monitoring and Operations

Object Detection & Identification

Via YoloV3, TensorFlow, Python

Yolov3 is an algorithm that uses deep convolutional neural networks to perform object detection.

In this quick project, I used the code that converts YoloV3 official already trained weights into TensorFlow models.

Once converted, I run the detect python code to use TensorFlow models to detect and identify the objects. I think it did pretty good.

As you can see in the short video below, it did detect my refrigerator, books on the shelves, bottle, myself as a person, my cell phone and my cup, a teddy bear toy and potted plants. 🙂

Output Video of Object Detection

Very exciting and these are some of the technologies that are and will be utilized in self-driving cars.

Please also check out my Face Detection project, here:

Face Detection and Recognition

Project for the Web & Roadmap

Hello!

In this blog post, I would like to review Microsoft’s new “Project for the Web” & Roadmap products.

If you already have Office 365 and you do not have any good way of managing and tracking your projects and portfolio, I recommend checking Project for the Web and Roadmap. In one of my previous posts, I reviewed Microsoft’s Project Online, if you haven’t seen that, please check it out here: Streamlined Portfolio & Project Management/

So, which one should you be using? Here’s a quick comparison of these 2 products, before we dive into the details of Project for the Web and Roadmap.

High Level Comparison of Project For The Web vs Project Online

So, now that hopefully we have a better idea which product fits better for our needs, let’s look into how a new Project in Project For the Web looks like.

When you go to https://project.microsoft.com, you will see all your projects for the web and your roadmaps. The favorite Projects and Roadmaps are going to be at the top for easy access.

You can add a new Project or Roadmap by simply clicking “+ New blank project” or “New roadmap”

As you can see below, it’s a very clean and intuitive view. Below, the first image shows the project is in “Grid” view. As you can see, more columns can be added to this view.

Board view. The name of the buckets can be updated or new buckets can be added.

Here’s Timeline view, which also shows the dependencies:

Here’s how a roadmap can look like:

#1. You can easily add new rows to your roadmap. You can select either a Project for Web project or connect to your Azure Board and select items

#2. You can Add Key Date; which would then display on the roadmap as in #10. Project milestones would also show on the roadmap as a key date, as in #11

#3. Row items can be added to detail the project.

#4. You can move up and down the projects based on their priority or other criteria.

#5. Roadmap rows can be easily removed.

#6. We can zoom in and out to see a specific time period.

#7. Filter can be used to display roadmap items based on the ownership

#8. Like Zoom, we can go to a specific date to see what’s going on around that time.

#9. The projects and roadmaps can easily be shared with Office 365 groups or individuals

#12. As mentioned in #1, Projects from Azure Boards can be brought into the roadmaps.

As you can see, both Project For Web and Roadmap are very user friendly, easy to use products.

One important item to add is the new Power BI template that can be used out of the box to give great information and insights to the leadership team or executives.

Below you will see a few images of the reports available. To learn more about this PowerBI template, please click here.

Considerations for building better APIs

What is an API?

In the simplest of terms, API is the acronym for Application Programming Interface, which is a software intermediary that allows two applications to talk to each other. In fact, each time you check the weather on your phone, use the Facebook app or send an instant message, you are using an API.

Every time you use one of these applications, the application on your phone is connecting to the Internet and sending data to a server. The server then retrieves that data, interprets it, performs the necessary actions and sends it back to your phone. The application then interprets that data and presents you with the information you wanted in a human, readable format.

What an API really does, however, is provide a layer of security. Because you are making succinct and explicit calls, your phone’s data is never fully exposed to the server, and likewise the server is never fully exposed to your phone. Instead, each communicates with small packets of data, sharing only that which is necessary—kind of like you ordering food from a drive-through window. You tell the server what you would like to eat, they tell you what they need in return and then, in the end, you get your meal.

Excerpt from “Undisturbed REST”

Type of APIs

Six Key Constraints to REST

  • True Client-Server Inter-dependencies
  • Stateless: States should be stored on the Client, not Server
  • Proper Management of Cache on the Client
  • Uniform Interface; in a single language, independent of the architectural back-end of either
  • Layered System with loosely coupled modules
  • Code on Demand / Smart Applications

For more information on the different constraints, you can read Dr. Fielding’s full dissertation online at:
http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm
.

Consider these while planning your API:

  • Design for great user experience
  • Clear Understanding and Definition of the Audience/Users of your API
  • Clear Understanding and Definition of the Actions of your API
  • Review of how your API and application will interact with Existing Services
  • Security of your API
  • Avoid hard coded resources or actions
  • Maintenance and Versioning of your API
  • Documentation & Support of your API
  • Monitor the usage and performance of your API
  • Promotion and Socialize of your API
  • Build a community
  • Continue to improve
Understanding the Audience/Users and Actions
Spec Comparison

For more information about APIs, also check out ProgrammableWeb.com

To be continued…