My First Post      My Facebook Profile      My MeOnShow Profile      W3LC Facebook Page      Learners Consortium Group      Job Portal      Shopping @Yeyhi.com

Pages










Thursday, May 24, 2018

How to Load Test APIs: Methods and most effective way to test web or downstream services

There are three typical approaches to load testing an API. These, as well as various hybrids, each have drawbacks and advantages.

#1 Faking it – API Mocking

The least useful for load testing is API Mocking These are basically temporary placeholders used during development of an API. Developers use these for early unit testing. But they also provide these “dummy” versions to other teams that need to call the unfinished API from within their own code.
Mocks return hard-coded responses, the formats of which often change during development. Also, the effort to create the mocks is wasted after their initial use.
Remember that, mocks aren’t yet hooked up to actual data sources, their performance isn’t at all representative of the real world. In summary, mocks may be useful for unit testing, but they aren’t representative of the real world.

#2 Cloning it – A Full Test Environment

This approach stands up a full-blown test environment using a snapshot of production data. disadvantages-of-cloned-environmentsOften you’ll have a copy of all the applications running, too, because your code relies on other APIs, not just database queries.
The good in this approach is that it’s very representative of the live system’s performance. If your load test brings the system to its knees, no problem! It hurts no one.
However, they raise privacy concerns, require constant data reloading, and can be very expensive if calling third party APIs.

#3 Hitting production – Load Testing Live APIs

Sadly, the method so many companies use is to test on production itself. Why? Well, it’s live, so it’s the most representative of all methods. It’s also “easy” –  no separate test environment to stand up and maintain. 
Disadvantage is that all data created are actual and stateful. And you still have to worry about the cost of pay-per-use APIs.
It’s important to schedule your load test “off hours.” And, any break would cause your production to become down.

#4 API Virtualization – The Risk-free Approach

You want to perform an exhaustive load test of your API – and keep your existing customers and your job. That rules out hitting the production system. And, you also need more than a test version of your API in a cloned environment. You need to test the real API in an environment where you can control the load condition for aspect of the test.
That’s where API Virtualization comes in. A virtual API provides a sandbox environment where you can simulate environmental loads on network bandwidth, server and database connections, simultaneous users and more.
With API virtualization, minimal resources are required for standing up and testing the API. You test the API itself, not the end-to-end application with all its required backend systems.  This eliminates the need for a clone of the production environment. 
load-testing-with-api-virtualization
You can test your API in isolation, gauging the reaction against real data,  under a variety of load conditions. 
API Virtualization allows you to load test your API in isolation from the rest of the system. With complete control of the test conditions, you can simulate network load, maximum connection limits, latencies and other conditions that happen in the real world.

Wednesday, May 23, 2018

What is SMSC number : Indian Mobile Operators - How does it work and how to change SMSC Number in Android phones

A Short Message Service Center (SMSC) is a network element in the mobile telephone network. Its purpose is to store, forward, convert and deliver Short Message Service (SMS) messages.

The flow of message in mobile network system happens as follows:

  1. From mobile to another mobile - referred to as MO-MT (Mobile Originated - Mobile Terminated)
  2. From mobile to a content provider (also known as Large Account / ESME) - referred to as MO-AT (Mobile Originated - Application Terminated)
  3. From application to a mobile - referred to as AO-MT (Application Originated - Mobile Terminated)


We should remember that An SMS message is stored temporarily in the SMS center if the recipient mobile phone is unavailable. It is possible on most mobile handsets to specify an expiry period after which the SMS message will be deleted from the SMS center. Once deleted, the SMS message will no longer be available for dispatch to the recipient mobile phone (even if it comes on line). The validity period should be regarded by the handset user as a request, as the SMSC itself can be configured to ignore or otherwise handle message delivery schedules.


Sometimes you face problem in sending SMS or Changing SMS center number. While sending SMS you will get ‘unable to send’ error, this Error is mainly caused by Mobile SMS center number is changed. You can change this number in your mobile Network/SMS settings


Following is the list of SMSC numbers (latest) for leading mobile operators in India:

  • Aircel sms center number +919809099060
  • Airtel sms service center number +919895051914
  • Jio sms center number +917010075009
  • BSNL sms center number +919440099997
  • Idea sms service center number +919847099996
  • Reliance sms service center number +919020000500
  • Tata Docomo sms service center number +919032055002
  • Uninor/Telenor sms center number +919084051550
  • Vodafone SMS center number +919846000040


An SMS centre (SMSC) is responsible for handling the SMS operations of a wireless network.

  1. When an SMS message is sent from a mobile phone, it will first reach an SMS centre.
  2. The SMS centre then forwards the SMS message towards the destination.
  3. The main duty of an SMSC is to route SMS messages and regulate the process. If the recipient is unavailable (for example, when the mobile phone is switched off), the SMSC will store the SMS message.
  4. It will forward the SMS message when the recipient is available and the message's expiry period is not exceeded.

Guess what! This completes the full information you should know.

Thursday, May 10, 2018

Nine Planetary Differences between SOAP and REST APIs

Here is what I technically feel the major difference between  SOAP and REST. To begin with, SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer.

Like 9 planets of our Solar system, I list down following 9 major differences that will completely settle down the discussion. So here is what I call, The Nine Planetary Differences Between SOAP and REST:

1) The first of all is that SOAP is a protocol while REST is an architectural style. So, this is a monumental difference in itself.

2) Next is to remember that SOAP can not use REST as it is a protocol. On the other hand, the REST architecture can use SOAP web services because it is a concept and hence it can use any protocol like HTTP, SOAP. Generally, it's HTTP.

3) Other important difference is  that SOAP permits XML data format only while REST permits different data format such as Text, HTML, JSON, XML etc.

4) Its important to note that SOAP uses services interfaces to expose the business logic. REST, on opposite, uses the URI to expose business logic.

5) In Java, JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services.

6) Next difference is related to the standards followed by each. SOAP defines standards to be strictly followed but the REST architecture does not define too much standards.

7) SOAP requires more bandwidth and resources. REST requires less bandwidth and resource than SOAP. Hence, RESTful APIs shall be bit faster. But your choice of what should be chosen in your application depends more on your architectural needs.

8) Any discussion shall be incomplete without talking about the security. So, let's remember that SOAP defines its own security. RESTful web services inherits security measures from the underlying transport mechanism.

9) Last, but not the least, SOAP is less preferred than REST. RESTful APIs are becoming more popular. However, there is no near future where one can totally surpass the other. Both are useful depending upon the needs of the software web application or services you are building.

Cheers!

*PS: don't crib that solar system now has only eight planets. For such cribbing souls, consider the ninth difference above as striked off. After all, it's just a consequence of the eight differences above. Ahem!

Success lessons from Marvel's Avengers strategy: A must business lesson.

All Marvel movies since 2008 have earned over $16 billion worldwide. And, Marvel’s Avengers: Infinity War earned more than $1.2 BILLION in just 2 weeks!
As a business enthusiast, you can learn some valuable lessons from the way Marvel achieved this.

Future prediction and long term thinking
The new MCU (Marvel Cinematic Universe) timeline started in 2008 with the release of Ironman.
Even at that moment, Marvel had already planned at least 7-8 years ahead, and knew exactly what movies would be released, and when.
Marvel teams already had meetings about movies up until 2025, and they’ve already planned out 20 movies to come out after Infinity War.
When you think long-term like Marvel does, you start thinking differently. You think strategically, not tactically. You focus on important things, not on shiny new objects.
And it’s ok if you don’t have all the pieces figured out. Marvel doesn’t.
Plan ahead. Have long-term goals. Focus on long-term wins, not short-term gains.
You’ll avoid distraction and stress, and you’ll deal with temporary failures much easier.

Do not wish to be successful at each stage, but keep larger goal at aim
Hulk is one of the most beloved characters in the Marvel universe.
But even despite that, a 2008 version - The Incredible Hulk - brought only $135 million in the US ($263M worldwide) on the $150M budget.
Not even close, compared to Ironman that was released that same year.
Even if you choose to sell a product that you’re sure will be a winner - and it turns out to be a loser, don’t lose hope.
Maybe you released the product too soon. Maybe you missed some step in the process. Or maybe it just isn’t the right time.
Remember lesson #1.

Don't just run after your dream product. Rather think what people want
No, there are no spoilers here. Keep reading.
I’m referring to lesson #2.
The audience wasn’t thrilled with Hulk, so Marvel “killed” the standalone Hulk movie… for now.
But in later movies, Hulk became the audience’s favorite hero.
Will they try again? It’s very possible.
The point is, if you love your product, but your market doesn’t - kill it.
Don’t waste your resources on something people don’t want.
But keep it handy. Maybe offer it as a bonus. Maybe as an upsell. (Marvel did that with Hulk. :))
As I said, maybe it’s just wrong timing.

Keep a good team and hold them tight
After The Avengers and Ironman 3, Marvel encountered some problems.
There’s no doubt that Robert Downey Jr. was (and is) the biggest star of the MCU.
No wonder he’s the highest paid actor on the team.
However, some other important team members were paid very low! Apparently, Chris Hemsworth made less than $1 million from the first two Marvel movies.
However, the team stood together.
The lower paid actors demanded a pay raise, and Robert Downey Jr. said that he’d quit as well, if any of them quit.
Marvel had no option but to raise their pay.
Based on how much money Marvel made from that moment until now, it was a smart decision and a small price to pay.
If you find people who are worth keeping, keep them at any cost.
It may cost you some extra money in the beginning, but they’ll either make you or save you 10x more when you need them.

Be innovative and take risks
Thor: Ragnarok is an interesting movie.
Up until that moment, Marvel movies were serious action, with a dose of humor.
Ragnarok is 180° opposite. It’s a movie full of humor, with a dose of action.
Marvel decided to play with it. And it paid off.
But notice WHEN Marvel decided to test an unorthodox approach… Years after it was established. When they already had a loyal audience. And when they had enough cash on their hands to cover the potential loss.
Experiment with new products, new launches, new strategies, new approaches… but experiment wisely.

First do something, then dwell deeper
Be honest, had you ever heard of Guardians of the Galaxy before Marvel made that movie?
Guardians of the Galaxy was never a mega-popular comic.
But Marvel apparently cracked the code, and now knows how to create a blockbuster, even with less popular heroes.
Again, check the timing.
They didn’t start the MCU with the Guardians. It was too risky.
They started with the most popular hero - Ironman - and they introduced the Guardians when they already had a loyal MCU fan base.
If you’re starting out, don’t go with an untested product.
Start with something that is proven to sell well. Once you have enough cash and a customer base, try something unusual and new.

Deal with high-quality product as sub-optimal products will jeopardize your growth
You can say anything you want about Marvel movies, but you can’t say they’re not perfectly executed.
Scripts, directing, casting, special effects, sound effects…
Nothing but high-quality work.
Whatever you sell, you should always strive to offer only high-quality products.
You’ll feel better about yourself, your customers will appreciate it, and your business will thrive.
These 7 simple lessons made Marvel movies into the highest cash-producing machines in the entertainment world.
These strategies can help you transform your business as well.
The only “trick” is, they require time and effort.
Success never happens overnight; it’s always a result of planning, clear vision, hard work, and dedication.
Now go, and build a marvelous business.

(This article is inspired and adapted using an Amazing.com advert)


How to add custom Ads.txt in Blogger : A must for blogger adsense monetization enthusiasts

When you want to add monetization to your blog and you have a publisher Id, you want to set it up fast. Am i correct? Afterall, why to loose even a single day of your sweet traffic.


But the problem sometimes is that the website you own is on Blogger and you have no ideas as to how and where to add the custom ads.txt file required by the blogger. Sounds known! Yeah, this is a usual problem with many. So lets start step by step:


First of all know that ,if your blog is monetized with third-party providers or you’ve manually integrated AdSense in your blog, you will need to manually set up the content of the ads.txt file.


  • Sign in to Blogger.
  • In the top left, click the Down arrow Down Arrow .
  • Click the blog you want to set up an ads.txt file on.
  • On the left, click Settings.
  • Under "Settings," click Search preferences.
  • Under "Monetization," find "Custom ads.txt" and click Edit.
  • Click Yes.
  • Copy the settings from your third-party monetization provider and paste them in the text box. This is typically like "google.com, pub-<0000000000>, DIRECT, 00000000"
  • Click Save settings.


Cheers! It's done.




If you want to check the content of your ads.txt file, go to http:///ads.txt.


Also, do note that if your blog is not monetized, or it’s only configured to use AdSense using the Blogger-AdSense integration, then you do not need to manually set up ads.txt. Blogger will do this for you. Read more about ads.txt for AdSense.


Now certainly, wait for 24 hours before the money starts flowing in your blog. Surely, you might want to thank me. For that just like the post and share to others who might help themselves as well.