Wednesday, 6 July 2016

Object Pooling in Csharp


What is Object Pooling in Csharp ?

Object Pooling is Technique for Efficient Resource Allocation.A Performance Optimization Technique that is based on using Pool of Pre-Allocated Resources Such of Objects For Efficient Resource Allocation . It refers to Reusing of Allocated Memory again and again instead of demanding for more memory as there are chances that more required  memory may be not available at runtime (In Running Application) 

Why We Need Object Pooling & How It Works?

Have you Heard about Car Pooling ? Let me tell you about that . Car Pooling and Object Pooling is based on Same Concept . 

Both are based on Re-using / Proper Utilization of Resource . Instead of Having or using new Resource Each Time We Require . 

In Car Pooling We Use Same Resource Car for Multiple Person Instead of Using Car for Each Person . If 4 Person are going to office instead of going from their own car . Car Pooling Tells to Use one car For all 4 People That will save various Natural Resource and money .

Similarly In Object Pooling Memory is assigned to Program Execution and When more objects are required to initialized then instead of demanding and getting more memory resources it waits for previous memory block to get free to be used .

Didn't Got it Don't Worry See Below  


Real Time Example of Object Pooling  ?

Problem :
Let’s assume we are running an application which needs allocation of memory for its execution and this application is using Multithreading. This means more than one threads can allocate the same amount of memory simultaneously . 

Consider that the application needs 100K memory for its execution and there are 50 threads running simultaneously. All 50 threads will call a method of the application simultaneously.

All the threads will try to allocate 100000 bytes in the heap simultaneously. The OS may not get enough time to swap pages. Thus the application will be under heavy concurrent access, and the application may fail due to misleading memory management!

Solution :

WE can also create a pool of large Memory Block as much we can according to how much memory we require, at startup. That way, say we create 100 times 100K bytes in memory at startup. If it fails, well enough - we know that right at startup! So there is no surprise at runtime, when the application is live! So we can reduce that number to 75 (from 100) and try again to start our application. Once up and running, we know that there will be barely a need for it to allocate more memory at runtime, as we already have the memory for 75 or 100 arrays allocated. It just uses that as "an object pool", pulls from it, and when done, returns the byte arrays for subsequent use. Chances are that unless truly "concurrent", the already allocated byte arrays will be re-used over and over again, and at runtime, no extra memory will be allocated. If all 75 or 100 arrays are in use, and a 101st request comes in, it will need to allocate an additional memory of only one array - which is easy for the OS to manipulate in RAM.

Still Din't Got Don't Worry Feel Free! To Comment  

Tuesday, 5 July 2016

Amazon : Buy Products With Amazon Echo



What Is Amazon Echo 


Amazon Echo is a voice-enabled wireless speaker developed by Ecommerce Giant Amazon (www.Amazon.com) . Echo is a  9.25-inch Device Structure is something looks like cylinder that contains speaker with a seven-piece microphone array. Amazon Echo Can also be called as "Alexa" . As It Responds to Words "Alexa" . We can also change this word to Amazon or Echo But Default One is Alexa .



Amazon Echo was initially limited to Use For aAmazon Prime members or by invitation, but became widely available in the USA on June 23, 2015

ORDER PRODUCTS WITH AMAZON ECHO 



We Can Order Products Like - 
User : Alexa , Show Me Levis Jeans

Amazon Echo is on the way to be best approach For Voice Driven Website In which websites will function by voice driven commands .

Amazon Echo Can also do voice interaction, music playback, making to-do lists, setting alarms, streaming podcasts, playing audiobooks, and providing weather, traffic etc

At last Amazon has featured the Order from Amazon Echo it was most awaited thing expected from Amazon Echo . Amazon Has taken some time to implement this very useful feature, you know, Amazon.

How Amazon Echo Works

You Need to Say alexa the type of item you want to buy or name / brand of item . Example -

YouSay: Alexa order Sandisk Pendrive

Then Alexa with respond with Options for available brands and cost
Alexa : We Have 8GB Pendrive for $10 , 16 GB Pendrive for $18

You Say: Alexa Get Me 8GB Pendrive
Alexa : Thank you ! You Order is in Process



Monday, 4 July 2016

Google Will Now Show Recent Earthquake Magnitude In Google Search



Google Is Expanding Like Amazon ( Amazon River ) . Its increasing its features like Water in Amazon River . One more Gold Star on Google Milestones is Now Google Will Give Information About Recent EarthQuake in your City / Area . It will give you information about When Earthquake occured and What was the Magnitude of Earthquiake Occured .

How To Search For Recent Earth Quake Information on Google Search


  • Open Google Search ( www..gogole.com )
  • Seach For "earthquakes near me"
  • Then the magic come and show you Shake Map showing Affected Areas of Recent Earthquake Near your Location .
  • That's not all It will also give you information about what you should do in this situation

Google Maps Road Trips Upgraded




Make Your Trips Navigable With Google Maps Now . Google Upgraded Google Maps . Upgrade Google Maps Now on Your Android Smartphones To Taste The latest Upgraded Road View for Google Maps .

New Update to Google Maps Will Now Allow you to Add Multi-Stop Directions Directions for All Your Trip Stoppages . You Can Easily Add Small Stoppages Between Source and Destinations of Trip

Latest Update also Allows you to Rearrange your Marked Stops , You Can drag & Drop Stops To Different Locations easily to rearrange your stops

Statement  By Sanket Gupta , Product Manager ( Google Maps ) -

“No matter where your travel plans take you this monsoon season and beyond, the new Google Maps features will get you there and help keep track of all the memories you make along the way,”


Updated Features are not Finished still , One more feature in this update is "TimeLine"

"Timeline" Allows You To Preserve Travel Memories . This This update comes right after hints of multi-destination navigation found in the Google Maps APK.

Saturday, 2 July 2016

Google Changed Standard Plans for Using Google Maps .



Google no longer support keyless access (any request that doesn't include an API key). Now You must include API Key in your googleMap API Request .It includes all API Request like GoogleMaps Places , Autopicker , Google Maps Javascript API , Location Picker API .You can't Use Google Maps API without API Key generated for Google Maps . API keys allow us to contact developers when required and help us identify misbehaving implementations.

The new policies will apply immediately to all Maps API implementations created on or after June 22nd, 2016. 

There is one Restriction Came with This Update From Google .

Your Application Using GoogleMaps Can have 25,000 map loads per day free  to new Google Maps ( Updated As Per 22 June ) JavaScript API , Static Maps API, and Street View Image API implementations. 

So For very Large Websites You Need a Premium Plan License In order to Use Google Maps , Places , Google Maps Javascript API etc . 

Google have also reduced the daily map load maximum limit you can purchase for Google Maps JavaScript API, Static Maps API, and Street View Image API from 1,000,000 to 100,000 requests per API.

In order to gofor More Request than Standard Plan you need to go for a Premium Plan license, which includes technical support and a Service Level Agreement

Google now count Google Maps JavaScript API client-side requests towards the daily limit of the associated web service API.

Google Maps Standard Plan Policy Updates Summary


Google Announcement For changes to the Google Maps APIs authentication and usage limits:
http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html