Best deal on Apple iPhone X in India with future upgrade

iPhone X went on sale in India at 6pm IST on Friday(3rd Nov, 2017). It is already delivered to few people who pre-booked it. If you are also looking to buy an iPhone X wait, we will show you the best deal. We will explain, why it is the cheapest option. In addition we will also show an example to yearly upgrade iPhone by paying less.

People are waiting for an Apple exchange program for long, in India. Which means, we can get a new iPhone on discounted price by exchanging the old one. Now we don’t need it any more. Thanks to Flipkart Buyback Guarantee, this is the best offering in market, which works similar to that.

As per Flipkart, you can own an iPhone X at just 13,500 if you already own an iPhone 7 plus. Flipkart is offering cashback on Citibank cards, buyback guarantee and exchange as well. Here are the details of offer.

  • Cashback for Citi Credit and Citi World Debit card users:
    • ₹10,000 cashback when you buy iPhone X
    • ₹15,000 cashback when you buy iPhone X and AirPods
    • ₹22,000 cashback when you buy iPhone X and Apple Watch
  • Up to ₹45,500 guaranteed buyback value if exchanged b/w 6-8 months, & 36,600 if exchanged b/w 9-12 months.
  • You can also get up to ₹20,000 off on exchange of iPhone 7 Plus.

iphone x in 13500

This is a best offer available in market. Where you need to pay 45,500+13500=59000 & will get an iPhone X. You can again exchange iPhone X after 11 months and get a new phone around 36,600 free or discount of same amount on higher end phone.

This is not the final exchange price of iPhone X as you need to exchange the iPhone 7 and then need to buy a new phone to redeem 45,500. Lets convert this calculations to exchange model. Where we will calculate the price of new phone after 11 months. Generally Flipkart offers 50% buyback guarantee, if you exchange b/w 6-8 months and 40% if you exchange b/w 9-12 months. That is calculated on MRP instead of discounted price, as of today.

You will say the exchange price is simply 59k. No, because the iPhone 7 plus that we are giving in exchange didn’t had buyback guarantee. I guess it was launched at 72k and the exchange would be around 29k instead of 20k. The exchange price of iPhone X will be 50k. Apple fans will love that deal.

Lets assume, iPhone 11 will launch next year at price range of 80k and we will get 40% buyback. Lets calculate the future exchange the price at Flipkart. This is an assumption, please cross validate the numbers.

Assume price of iPhone 11 in future ₹80,000
General Cashback from bank offers ₹10,000
Guaranteed exchange value of iPhone X ₹36,600
Final price of iPhone 11 ₹34,000

As per our assumptions Apple fans can use iPhone X and iPhone 11 each for an year each (total 2 years), by paying 50k and 34k respectively. This is a great offer for Apple fans who want upgraded phone each and every time.

 

Redis 3.0.0 stable is released

Redis 3.0.0

On April 1st Redis team announced the release of Redis 3.0.0 stable. It is the firs stable version of Redis with native support for clustering. Team was working on this from long and many of the features were already back ported to Redis 2.8.

Major Changes

Other new things implemented in 3.0.0 that may be significative to
users not interested in Redis Cluster are:

  • An improved LRU algorithm, ways more precise to evict the older keys.
  • Redis 3.0.0 is generally sensibly faster under high (pipelined) load.
  • AOF rewrite was reworked in order to reduce latency spikes with slow disks when the process undertakes the final “write” of the accumulated buffer.

Changes compared to Redis 2.8?

  • Redis Cluster: a distributed implementation of a subset of Redis.
  • New “embedded string” object encoding resulting in less cache misses. Big speed gain under certain work loads.
  • AOF child -> parent final data transmission to minimise latency due to “last write” during AOF rewrites.
  • Much improved LRU approximation algorithm for keys eviction.
  • WAIT command to block waiting for a write to be transmitted to the specified number of slaves.
  • MIGRATE connection caching. Much faster keys migraitons.
  • MIGRATE new options COPY and REPLACE.
  • CLIENT PAUSE command: stop processing client requests for a specified amount of time.
  • BITCOUNT performance improvements. * CONFIG SET accepts memory values in different units (for example you can use “CONFIG SET maxmemory 1gb”).
  • Redis log format slightly changed reporting in each line the role of the instance (master/slave) or if it’s a saving child log.
  • INCR performance improvements.

Redis Sentinel or High Availability of Redis

Redis Sentinel:

Redis Sentinel is designed to monitor Redis Instance. It can automatically switch your master if it goes down or having some issue. Hence it will reduce the time for manual issue identification and switch. That will give us high availability,  that is why some people call it HA for Redis.

As per Redis team Sentinel does 4 things: Monitoring, Notification, Configuration Provider and Automatic failover. Redis Sentinel is used to monitor Redis Master Slave setup. If Redis Sentinel find a master is not working as expected then it starts a failover process, where it promotes the slave to master. In nutshell you can say Redis Sentinel will switch the master. All the other slaves are reconfigured or updated to use new master, by communicating new config. Application using Redis server is also updated about new configurations. We can also use Sentinel as service discovery, client can directly connect with Sentinel and ask for current master address. It will return new address in case of fail-over.

Redis Sentinel Distributed Nature:

Redis Sentinels are distributed in nature and following conditions are true for Redis Sentinel.

•    A cluster of Sentinel can failover a master even if some Sentinel are failing.
•    A single Sentinel not working well, or not well connected, can’t failover a master without authorization from other Sentinel.
•    Clients can connect to any random Sentinel to fetch the configuration of a master.

Keyword

You may get confused between Redis, Redis Server and Redis Sentinel. Redis Sentinel is packed in Redis 2.8, so Redis Sentinel is not a separate software or package. For clarity i am defining the terms used…

Redis2.8 refers to Redis package only. It contains Redis Server as well as Redis Sentinel.

Redis Server or Redis Master Slave means machine having some Redis package running Redis Servers.

Redis Sentinel Or Sentinel refers to Sentinel and is part of Redis package(majorly Redis 2.8).

Current Version of Redis Sentinel

“Sentinel 2”, is latest version as of today. Redis Sentinel 2 is shipped in Redis 2.8(latest version of Redis as of today).  “Sentinel 1” is buggy and advised not to used. That doesn’t mean you can’t use new “Sentinel 2” with Redis 2.6 Server or below.  You can install Redis 2.8 on Sentinel machines and let them monitor your Redis 2.6 server. But it will be good if you can migrate all your Redis Servers to Redis 2.8. Summary: Use Redis 2.8 to run Sentinel.

How to Run Redis Sentinel?

Redis Sentinel are very easy to setup. Here i assume that that you already have Redis Master Slave setup. if not, you can read here.

Redis Sentinel Config

Redis package have a file called sentinel.conf that contains documentation with examples. You can delete all the content of sentinel.conf and add below lines to it.

port 26379
pidfile /var/run/redis/redis-sentinel.pid
logfile /var/log/redis/redis-sentinel.log
daemonize yes
loglevel notice
dir /tmp

sentinel monitor MYMASTER 127.0.0.1 6379 2
sentinel auth-pass MYMASTER abc123
sentinel down-after-milliseconds MYMASTER 1000
sentinel parallel-syncs MYMASTER 1
sentinel failover-timeout MYMASTER 180000

First 6 lines of sentinel conf file are self explanatory and defines the configs of Sentinel daemon. We will explain other lines one by one below:

  • First line “sentinel monitor” tells Sentinel to monitor a master and name it “MYMASTER”(name doesn’t matter). It have the address “127.0.0.1” and port “6379”, with quorum 2. Quorom 2 means Sentinel can start a failover only if at-least 2 Sentinel fails. In nutshell, “start failover, if more than two Redis Sentinel has detected that master is failed”.
  • Second line defines the password of Redis instance “MYMASTER”, here we are assuming it as “abc123” .
  • Third “down-after-milliseconds” is the time after which if an instance is not reachable (does not reply to the PINGs or reply with an error)  from a Sentinel. Then it can start thinking it is down. Sentinel will mark this instance as down and communicate to others. If other Sentinel says same and count of Sentinel is equal or more than Quorom defined in first line and it can start the failover process.
  • Fourth “parallel-syncs”,  number of slaves that be reconfigured as master.
  • Last “failover-timeout” is the wait time to fail same master again.

If you noticed we only defined the master address in config file. Here the Sentinel will fetch the slave data from master machine itself.

Start Redis Sentinel:

redis-sentinel /path/to/sentinel.conf

OR

redis-server /path/to/sentinel.conf --sentinel

Any of the above methods will work, but sentinel.conf is mandatory otherwise it will through an error. By default, Sentinel runs on the 26379 port but you can change it in the config file.

Now you need to do the same thing on 2 more machines, which will end up a cluster of 3 nodes. All the Sentinel will coordinate with each other automatically. You don’t need to define the communication between them. Make sure the ports are open for communication.

Important Setting:

If you are using a password in the Redis Master slave setup, don’t forget to define “masterauth” variable in “redis.conf” of both master and slave. When your down master will come up again, this is required. Otherwise, your old master(down master) will not be able to connect with the new master.

masterauth abc123

Check Redis Sentinels logs you get more idea, how it works:

Redis Sentinel Instance logs

In the Above image Redis Sentinels version 2.8.17 is running on port 26379 with PID 22649. Sentinel is monitoring Redis master running on 127.0.0.1:6379. The last line says another instance of Sentinel is up and running on port 127.0.0.1:26380.

Redis Sentinel Logs for second instance

Logs of the Second instance are exactly similar to as explained above.

For more details read the Redis sentinel document:

http://redis.io/topics/sentinel

Xiaomi Announced MIUI 6 Update for Devices in India

MIUI 6 Update for Devices in India

MIUI 6

Today Xiaomi announced the MIUI 6 update for devices in India. Xiaomi announced that the Mi 3, Redmi 1S, Redmi Note 4G and the Redmi Note, all are getting the MIUI 6 update. Users will get OTA roll out very soon. As per them the UI or operating system will handle following things:

  • Manage apps and widgets: it will be more easy to handle apps and widgets even in bulk.
  • Notifications: Notification are getting smart, clean and simple.
  • Personalize Themes: with unique icons, lock symbols, ringtones and more
  • Animations: Life-like movements, transition effects, rainbow effect when uninstalling apps.
  • Security: Cleaner, Battery, Virus Scan, Data Usage, Permissions.
  • Emails: Auto Setup of email accounts and Streamlining email conversations.

 

As reported by users on MI India Facebook page and tested by us its OTA is not available on devices till now. Also nothing is announced by them when & how the updates will be available. We will update as soon as we will any news about it.

 

Some their devices already have MIUI 6. You can download the MIUI 6 ROM from their website for devices MI4, Redmi Note, Mi 3.

[EDIT][UPDATES]

Here’s the latest schedule MIUI6, released by xiomi:
1. Most Redmi phones will get MIUI 6 based on Android 4.4
2. Redmi 1S 3G W/C might get MIUI 6 based on Android L directly, so the release time might be delayed
3. MIUI 6 special edition for Mi 2/2S/2A is not perfect yet, so we’ve decided to develop it based on Android L later.

Timeline for MIUI 6 for Redmi Phones
Time
Device
Android Version
Dec.30, 2014
Redmi 1S  4G (TD)
Android 4.4
Jan. 13, 2015
Redmi Note 3G (TD / WCDMA)
Android 4.4
Early Feb., 2015
Redmi1S 3G (TD)
Android 4.4
Middle Feb.,2015
Redmi 1 (TD / WCDMA)
Android 4.4
Late March, 2015
Redmi 1S 3G (WCDMA / CDMA)
Android 4.4 / L (to be confirmed)



Timeline for MIUI 6 for Mi Phones
Time
Device
Android Version
Late Jan., 2015
Mi2 / 2S / 2A
Android L

Note: The above mentioned ROMs all refer to China ROM, not global ROM.

 

WhatsApp on PC, Official WhatsApp web client for System/PC

How to Use WhatsApp on PC/Web??

From long time people are using Bluestack, Android Emulator or some hacks to use Android apps on PC.  From long time WhatsApp users were waiting for “WhatsApp on PC”. Finally users got a good news, recently WhatsApp team launched the WhatApp Web client for PC. WhatsApp Web is a desktop extension of the WhatsApp account on your phone. Now you can use WhatsApp on PC and can chat with your friends and group with faster speed. All the messages are synced between PC and phone. You can take any action on PC and it will be synced to phone and vice versa.

At this time, WhatsApp Web is available only for Android, Windows Phone 8.0 and 8.1, Nokia S60, Nokia S40 Single SIM EVO, BlackBerry and BB10 smartphones.

 

Check/Install new WhatsApp Version

First of all check your WhatsApp version should be equal to or greater than 2.11.500.
To check WhatsApp version Go to Menu->Settings->Help->About

WhatsApp version for WhatsApp on PC

WhatsApp Version

If WhatsApp version is old; click on this link and download latest WhatsApp apk and install on your mobile/iPad/tab http://www.whatsapp.com/android/beta/WhatsApp.apk

Open new installed WhatsApp

After installation of new WhatsApp, open WhatsApp application
Now you will see a new option in WhatsApp Menu called WhatsApp Web(Menu->WhatsApp Web).

How to use WhatsApp on PC

WhatsApp Web Option in WhatsApp Menu

 

Click on WhatsApp Web then scanner will fire up, scan the chrome URL https://web.whatsapp.com/

Now you can use WhatsApp on PC.

Note: Make sure you have internet on mobile, its a web client that use your mobile internet.

Redis master slave setup on single machine

What is Redis Master Slave?

Redis Master Slave setup is same as any other Master Slave setup. It allows you to maintain multiple copies of same data automatically. That will serve the purpose of backup and scaling. You can use Redis Slave to serve the request the reading requests and hence your master load decreases.

We will start with installation of Redis Server, then Redis Slave and then will setup Redis Mater Slave replication.

About Redis:

Redis is an open source, BSD licensed, advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.

Many languages have Redis bindings, including: ActionScript, C, C++, C#, Clojure, Common Lisp, Dart, Erlang, Go, Haskell, Haxe, Io, Java, JavaScript (Node.js), Lua, Objective-C, Perl, PHP, Pure Data, Python, R, Ruby, Scala, Smalltalk and Tcl.

Install Redis

There are too many ways to install Redis, we will discuss two ways:

  1. One from source code that works for most of Unix based Operating system and Mac OS X.
  2. Another using apt package manager(that works on Debian/Ubuntu systems).

If you want to run both Master Slave on same machine and not familiar with Unix Systems; better to do that setup with source code(method1).

Install Redis by Method1(through source code):

Open Shell/Terminal/Command Prompt:
wget 'http://download.redis.io/releases/redis-2.8.19.tar.gz'
tar xzf redis-2.8.19.tar.gz
cd redis-2.8.19
make

‘make’ will take few seconds or up to 1-2 minutes to finish and your Redis is installed

Start Redis Command
src/redis-server &
Lets Verify it:
src/redis-cli
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"

By default Redis runs on port 6379, you can change it very easily from redis.conf file.

Install Redis by Method2 (using apt package manager):

Open Shell/Terminal/Command Prompt:
sudo apt-get update
sudo apt-get install redis-server

Your installation is done and it will start automatically, lets check…

Lets Verify it:
redis-cli
redis 127.0.0.1:6379> set foo bar
OK
redis 127.0.0.1:6379> get foo
"bar"

Till this point single instance of Redis is running fine, if you face any issue, please comment below with error message. Next thing is to run Redis in Master Slave mode. It means we will run two instances of Redis. Here we will run both the instances on same machine. But on production you should install it on different machines, otherwise it will not be HA.

Stop Redis
redis 127.0.0.1:6379>shutdown

Config changes to convert Redis instance to Redis Master:

Now we will change in config file to run mater slave. Steps are very simple and config properties are self explanatory.

Method1:
vi redis.conf
Method2:
sudo vi /etc/redis/redis.conf
Change Listening Interface:

By default Redis listens for connections from all the network interfaces available on the server. It is possible to listen to just one or multiple interfaces using the “bind” configuration directive, followed by one or more IP addresses. like bind 192.168.1.100 10.0.0.1 If the bind option is not specified all the interfaces will listen for incoming connections.

Lets comment it, if not.

bind 127.0.0.1
# bind 127.0.0.1 
Set Master password:

We should use redis with password authentication, to make redis connection secure. But it will solved one more issue. Without password sentinels works like charm. But with password authentication in Redis most of the people do same mistake. That is why we are taking password approach, you can skip this step if you don’t want to use Redis with password.

# requirepass foobared
requirepass abc123

Config changes to setup Redis Slave:

copy redis.conf to slave.conf if you want to run master and slave on same machine. Otherwise just use redis.conf on other machine and do the above two steps again on new machine conf file.

cp redis.conf slave.conf
vi slave.conf
Change slave port

Also change the port if both the master and slave are running on same machine. You can’t run two instances with same port in single machine.

#port 6379
port 6380
Declare the Master Details:

In slave.conf file set master host and port details, so that master slave can communicate. If on different machine add master machine IP address.

# slaveof <masterip> <masterport>
slaveof 127.0.0.1 6379
Master password in slave:

Set password that is required by Slave to connect to Master Redis server. Means the password we set earlier for master.

# masterauth <master-password>
masterauth abc123

Lets Start the Redis Master Slave

Method1:
src/redis-server redis.conf
src/redis-server slave.conf
Method2:
/usr/bin/redis-server /etc/redis/redis.conf
/usr/bin/redis-server /etc/redis/slave.conf
 Now we will test the Redis master slave setup on shell
redis-cli -p 6379 abc123
127.0.0.1:6379> keys *
(empty list or set)
127.0.0.1:6379> set foo bar
OK
127.0.0.1:6379> get foo
"bar"
127.0.0.1:6379> quit
Now check same on Redis Slave
redis-cli -p 6380 -a abc123
127.0.0.1:6380> keys *
1) "foo"
127.0.0.1:6380> get foo
"bar"
127.0.0.1:6380>quit

Setup of Redis master slave is done, if you want to run one more slave, just repeat the steps after we copied the  redis.conf to slave.conf.

References: