SQL OR NOSQL?

If you are searching for SQL or noSQL solutions, it is very difficult to decide among top SQL / noSQL Databases.

MySQL is the best for multi-document transactions, complex security, complex join, extreme compression.

NoSQL is good for linear scalability, high performance, schema flexibility.

But both depend on data need to manage 😉

Scalability

MySQL support master and slave approach for scaling (vertical scalability).
NoSQL supports horizontal scalability.

Vertical scalability is the ability to increase the capacity of existing hardware or software by adding resources – for example, adding processing power to a server to make it faster. On the other hand, horizontal scalability is the ability to connect multiple entities so that they work as a single logical unit.

Flexibility

SQL is the best for query flexibility, SQL supports both simple and complex queries.
MongoDB supports SQL query and indexes.

Down Time

NoSQL perform well for database size and server performance.

Transactions

SQL is king of transactions.
MongoDB and Redis support limited transactions.

Hosting

Every database solution need deployment, backups, monitoring, and performance tuning.

NoSQL are modern web-scale databases having qualities of non-relational, distributed, open-source and horizontally scalable database.

How to play wowza live video on ipad

Install Wowza Examples

Take care for common problems:

Do you have the Application.xml in the right place?
[wowza-install-dir]/conf/[appName]/Application.xml

Server URL: rtmp://[wowza-address]/live
Stream Name: livestream

Which format need to broadcast from FMLE?
For iOS streaming, you’ll need h.264 baseline profile 3.0 on the video side and AAC on the audio side.

what is playlist.m3u8?
With Wowza cupertinostreaming…
http://[wowza-address]:1935/live/livestream/playlist.m3u8

Sample Code with HTML5 JWPlayer Support

<script type="text/javascript" src="jwplayer.js"></script> 

<div id='mediaplayer'></div>

<script type="text/javascript">  

jwplayer('mediaplayer').setup({
    'id': 'playerID',    'width': '623',    'height': '365',
    'provider': 'rtmp',  
    'streamer': 'rtmp://[wowza-address]/live',
    'autostart': 'true',
    'stretching': 'exactfit',  

    levels: [{
              bitrate: "500",
              file: "livestream",
              width: "800"
              }, {
              bitrate: "800",
              file: "livestream",
              width: "1280"
              }],   
               
    'modes': [
         {type: 'flash', src: 'player.swf'},
         {
          type: 'html5',
          config: {
           levels: [ {'file': 'http://[wowza-address]:1935/live/livestream/playlist.m3u8'} ],
           'provider': 'video'
          }
        }
    ]
  });
 
</script>

To play using Adobe Flash player (RTMP)

Server: rtmp://[wowza-address]/vod
Stream: mp4:sample.mp4

To play using RTSP/RTP player or device
rtsp://[wowza-address]:1935/vod/mp4:sample.mp4

To play using an Apple iDevice (Cupertino/Apple HTTP Live Streaming)

http://[wowza-address]:1935/vod/mp4:sample.mp4/playlist.m3u8

How to set up live streaming using an RTMP based encoder

Amazon SES integration with Joomla

Amazon Simple Email Service (Amazon SES) is a highly scalable and cost-effective bulk and transactional email-sending service for businesses and developers. Amazon SES eliminates the complexity and expense of building an in-house email solution or licensing, installing, and operating a third-party email service. The service integrates with other AWS services, making it easy to send emails from applications being hosted on services such as Amazon EC2. With Amazon SES there is no long-term commitment, minimum spend or negotiation required – businesses can utilize a free usage tier and after that enjoy low fees for the number of emails sent plus data transfer fees.

Read this article for general Idea about “Amazon SES”

Amazon SES integration with Joomla

Get Remote Host Client IP Behind Load Balancers (ELB)

I was working on “Private AWS Cloudfront Distribution” for AWS Elastic Load Balancer (ELB), allowing our application servers private access to our AWS cloudfront.

But PHP Server Environment Variable $_SERVER[“REMOTE_ADDR”] is displaying suspicious results, it really tedious to get remote host client IP behind ELB 🙁

Now we have 2 options…

1. mod_rpaf and Amazon ELB
http://tech.superhappykittymeow.com/?p=281
http://giantdorks.org/alain/easily-get-the-correct-client-ip-with-mod_rpaf/

if ($_SERVER[“HTTP_X_FORWARDED_FOR”]) {
$realclientip = $_SERVER[“HTTP_X_FORWARDED_FOR”];
} else {
$realclientip = $_SERVER[“REMOTE_ADDR”];
}

2. %{X-Forwarded-For}i from Apache Log (Time Consuming)
http://blog.kenweiner.com/2009/09/amazon-elb-capturing-client-ip-address.html
https://forums.aws.amazon.com/message.jspa?messageID=216977

You Apache log format would then look something like this:
LogFormat “\”%{X-Forwarded-For}i\” %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-agent}i\”” combined-elb
CustomLog log/acces_log combined-elb

Apache Module mod_remoteip

PHP: $_SERVER[“HTTP_X_FORWARDED_FOR”]
PHP: $_SERVER[“HTTP_X_CLUSTER_CLIENT_IP”]

$_SERVER[‘REMOTE_ADDR’]; Apache Enviromental Variable is not working on your server 🙂
http://php.net/manual/en/function.getenv.php
http://www.zytrax.com/tech/web/env_var.htm

Data Transfer from Amazon S3 to Web Server

We can transfer / copy Amazon S3 bucket with GB of data to EC2 machine and then transfer the data to the dedicated server.

We need Amazon S3 details:
Access Key: ?
Secret Key: ?

We need Web Server details:
Host: ?
User: ?
Password: ?

One option would be to run an Amazon EC2 machine, install CloudBerry Explorer onto it and start the copy process. the data will go through EC2 of course, but since it is in the same data center with S3 it will be fast and efficient.

Backup mysql database to amazon S3

Make Own CDN

Well… I am working on alternatives to make OWN CDN…

I have few options to create such CDN

* Google App Engine
http://24ways.org/2008/using-google-app-engine-as-your-own-cdn
http://www.digitalistic.com/2008/06/09/10-easy-steps-to-use-google-app-engine-as-your-own-cdn/

* Amazon EC2

* Wowza
http://www.wowza.com/forums/content.php?81-How-to-achieve-the-lowest-latency-from-capture-to-playback

* GeoIP, NGinx, Bind, Varnish
http://blog.unixy.net/2010/07/how-to-build-your-own-cdn-using-bind-geoip-nginx-and-varnish/
http://www.caraytech.com/geodns/
https://www.varnish-cache.org/

* ONApp
http://onapp.com/cdn/pricing/
http://cdn.onapp.com/files/datasheets/onapp_cdn_datasheet.pdf

Some Open Source to create CDN
http://www.fromdev.com/2011/06/create-cdn-content-delivery-network.html
http://labtel.ing.uniroma1.it/opencdn/
http://www.coralcdn.org/
http://cacheboy.net/
http://code.google.com/p/phloem/

Other Resources
http://serverfault.com/questions/244158/how-to-create-my-own-cdn-or-private-cloud
http://nixcraft.com/web-servers/17014-creating-own-cdn-using-nginx-possible.html

Limitations
* Performance that you get from a professional / Commercial CDN
* Smart DNS
* Edge points
* Caching server – squid or nginx

Install MovieMasher

Movie Masher open source flash based online video editing software and media player is free code to white label on your web site.

Movie Masher Feature

Movie Masher- Free Open Source Online Video Editor

Adobe Flash™ applets that provide front-end tools for common video editing tasks:

* Trim, composite and timeshift video
* Mix and fade multiple audio tracks
* Add effects, transitions and titling

An XML API is used to customize both the appearance and behavior of the tools:

* Colorize and reposition panels
* Reskin and bind interface controls
* Reconfigure bundled effects
* Integrate with CGI scripts

Customize Movie Masher Free Open Source Online Video Editor

Quick Start

1. transfer and decompress the applet archive to your web server.
2. load the /example/static/index.html file in your web browser.
3. read the README.txt files from other examples you want to run.
4. explore those examples by loading their index files in your browser.

Install Movie-Masher

# wget http://nchc.dl.sourceforge.net/project/moviemasher/moviemasher/3.1.13/MovieMasher_3-1-13.zip
# unzip MovieMasher_3-1-13.zip

Restart web server then point address bar to

http://server_ip:5080/moviemasher/example/static/index.html

Webisode

The webisode is simply a web episode, this is a new medium called web television that stream live broadcast, dramas, serial storyline, media events online over the Internet

The webisode is web episode especially viewed at a Web site for TV show have been telecast.

Technologies Used

* HTTP
* RSS/JSON
* RTSP/RTMP
* SMIL
* WTVML
* ASX
* MMS

Streaming Audio/Video formats

* Adobe Flash – MP3, FLV, MP4
* Microsoft Media – Silverlight, ASF, ASX, WAX, WMA, WMV
* RealNetworks – RM, RAM, RA, SMIL
* Apple QuickTime Audio/Video streams
* Shoutcast/Icecast – MP3, AAC, OGG
* MoveNetworks MoveMediaPlayer

CDN Used

* Amazon S3 CloudFront
* Google
* YouTube
* MaxCDN
* Rackspace CDN
* EdgeCast
* Flickr
* Akamai
* StreamGuys

Servers Used

* Wowza
* Adobe
* Red5
* SHOUTCast
* Windows Media Server

Clients Used

* Adobe – Flash Media Live Encoder
* Windows Media Encoder
* VLC Player
* SMPlayer
* SAMCast

Streaming Tools

* MPlayer
* FFmpeg
* RTMPDump
* VLC
* Flash Media Players
* HTML5

CMS Used

* Kaltura
* VidZapper

A webcast is a media streaming technology to distribute single media content source to many simultaneous listeners/viewers. The webcast might be distributed live or on demand. Webcasting is “broadcasting” over the Internet.

https://www.svnlabs.com/services/media-streaming

 

There are only two ways to live your life

Tolerate things the way they are…… Or take responsibility to change them.

PHP Cloud

Introduction to the Zend Developer Cloud

PHPCloud help to Develop, Deploy and Manage PHP Applications in to Any Cloud (Amazon, Rackspace, RightScale, IBM SmartCloud) using Zend Application Fabric.

Demo: http://svnlabs.my.phpcloud.com
Contact: https://www.svnlabs.com/blogs/contact/

Rackspace Cloud Servers vs Amazon EC2

Rackspace Cloud Servers Amazon EC2
Support Cloud Servers™ is backed by the legendary Fanatical Support you can only get from Rackspace. To receive 24x7x365 support for Amazon EC2, you pay the greater of $400 per month or 10% (scaling down) of your EC2 costs.
Third Party Software Support The Cloud Servers™ with a managed service level option gives our customers support for a number of third party software. Amazon does not provide support for third party software even if customers purchase the highest level of support.
Admin Level Troubleshooting If requested by a Cloud Servers™ with a managed service level customer, Rackspace Cloud support techs will log in to a customer’s Cloud Server to help fix a problem. Amazon Support will not log in to a customer’s EC2 server to help its customers fix a problem.
Persistence One of the most significant differences between Cloud Servers™ and EC2 is the persistence of each virtual server. Cloud Servers™ has access to local, RAID10 disk storage, much like you’d expect in a physical server. Amazon EC2 instances are transient or ephemeral—if there is a host failure that causes your instance to terminate, all local data on that instance will be lost. Data persistence (not server persistence) can be added with Amazon EBS; however, EBS adds additional cost and complexity.
Server Sizes We provide a wide variety of Cloud Server sizes, starting at 256 MB and going up to 30 GB. Cloud Servers™ can be resized to scale without any reinstallation. Amazon EC2 Standard Instances start at 1.7 GB, so if your workload requires fewer resources, you are stuck paying for much more than you need. Amazon recently introduced Micro Instances (starting at 613 MB) for customers needing CPU burst capabilities.
Hybrid Hosting Depending on your needs, you can get the best of both worlds with a combination of cloud and dedicated servers with our RackConnect™ solution. Amazon only offers part of the answer, with only cloud solutions. Amazon VPC is a beta service offering to connect a company’s infrastructure to Amazon’s cloud; however, Amazon does not offer hosting on dedicated/managed servers.
CPU Scheduling Cloud Servers™ has guaranteed minimum CPU power (relative to the size of the Cloud Server), with free bursting when extra capacity is available on the host. Amazon EC2 instances have a capped CPU. If additional CPU capacity is required, you need to launch another instance. Amazon recently introduced Micro Instances which can be added (at an additional cost) for extra CPU resources.
Compute Power A recent study conducted by an independent third party demonstrated that US-based Cloud Servers™ is, on average, more than two times more powerful than comparable Amazon EC2 servers. While the pricing of EC2 instances appears to be lower, if it takes more than twice the time to complete a task, the total price to complete a task increases proportionally.
Disk I/O A recent study conducted by an independent third party demonstrated that on average US-based Cloud Servers™ have a higher disk throughput than comparable Amazon EC2 servers. Amazon has a block storage solution that can show better performance than their built-in ephemeral storage under the right conditions; however, this solution results in additional costs, as both the amount of data stored and transferred are billed for.
IP Addresses Each Cloud Server comes with the simplicity of a dedicated and persistent public IP address (no NAT) with a second, private IP address for free. There is also low latency bandwidth between your Cloud Servers™. Additional public IPs are available upon request and shared IPs can be provided for high availability. With EC2, the IP configuration is more complex. Each instance gets a non-persistent private IP address NATed to a public IP address. When instances terminate and new ones are launched, a new private IP address is assigned which means you need to plan for changing private IPs.
Open Philosophy In 2010, Rackspace became a founding member of OpenStack, an open-source cloud platform designed to foster the emergence of technology standards and cloud interoperability. Amazon has not embraced an open-source approach for cloud interoperability.

 

Source: http://www.rackspace.com/cloud/cloud_hosting_products/servers/compare/