Thursday, 29 May 2014

Free Boost Web Application By 20% in Simple Steps

Simple Steps to Boost your appliction by 05 - 20%

  • echo is faster than print and use echo's for multiple parameters
  • Unset your large variables to free memory
  • use swtich case instead of if-else
  • Don't use @ because Error suppression with @ is very slow.
  • Turn on apache mod_deflate, mod_gzip which is available as an Apache module, compresses your data on the fly. It will boost your appliction and can reduce the data to transfer up to 80%
  • Incrementing/Decrementing a global variable is 2 times slower than a local variable
  • Incrementing/Decrementing an undefined local variable is 8 times slower than a initialized one.
  • use require instead of require_once
  • comment un-necessary code and remove the commented code
  • Avoid count(*) on entire tables, it can lock the entire table.
  • Use GROUP BY instead of DISTINCT when appropriate.
  • Use INSERT ON DUPLICATE KEY or INSERT IGNORE instead of UPDATE to avoid the SELECT prior to update.
  • Use Static Method, Speed improvement is by a factor of 4
  • Avoid necessary loops, because it may slow your application.

Friday, 23 May 2014

What is Streaming Servers, Streaming Protocol and Port Protocol

Streaming Servers: It is server which is more powerful in-terms of RAM, ROM, Processing & Disk spaces. These server kept the video/audio files and able to sent the video/audio in form of small packet(in right order) to the client machine bypass the webserver. 

Cleint Machhine Request the video/video to webserver => webserver sent the request to streaming server => Streaming server send the response in form of small packet to the clinet machine (By Passing the WebServer)

Why we need streaming server:

  • HTTP, FTP and TCP protocols  send the data in form of packets and reassembled later means first download full data in browser then play. In this case user have to wait  more time. where as in streaming server video playing and streaming simultaneouly. 
  • Streaming Server is more fast & better as compare to WebServer(Non-streaming Server).
  • Different Streaming Server use different type of protocol to enhance their speead and performace.


Web Server can re-send lost or damaged packets, and they allow randomly ordered packets to be reassembled later. This is convenient for downloading files and surfing the Web if Web traffic slows down or some of your packets disappear, you'll still get your file. But these protocols won't work as well for streaming media. With streaming media, data needs to arrive quickly and with all the pieces in the right order

PORT: PROTOCOL
20: File Transfer Protocol (FTP)
21: Secure File Transfer Protocol (SFTP)
22: Secure Shell (SSH)
25: Simple Mail Transfer Protocol (SMTP)
80: Hypertext Transfer Protocol (HTTP)
110: Post Office Protocol (POP3)
143: Internet Message Access Protocol (IMAP)
194: Internet Relay Chat (IRC)
443: Hypertext transfer Protocol Secure (HTTPS)
465: Simple Mail Transfer Protocol Secure (SMTPS)


Streaming Protocol
Apple HLS (HTTP Live Streaming)
RTMP, RTMPT, RTMPS, RTMPE, RTMPTE, Flash
Adobe HTTP Dynamic Streaming (HDS)
MS-WMSP (Windows Media HTTP Streaming Protocol), Windows Smooth Streaming, MMS, MMSH
RTSP, RTP, UDP
MPEG-DASH (HTTP)