Advantages of Cloud Server over Standard Hosting Server

Cloud DeploymentCloud server is nothing but the virtual server runs on cloud computing environment. Cloud server works like the physical server and can be controlled through an administrator.

It can be called as Virtual Dedicated Servers (VDS). There are various advantages of cloud server over the standard hosting servers.

Scalability:

On Cloud platform you can customize hardware selection appropriate for your application. Eg. Your application may need a small CPU but with high storage or something similar.

But in standard hosting servers you may not have an option to choose what exactly you want, rather forced to choose a pre-defined configuration.

Elasticity:

As cloud is highly scalable you can increase or decrease the hardware needs depending high/low traffic to your application. So, no need to pay unnecessarily for a fixed hosting plan.

Run what you want:

On cloud hosting, you can choose which Operating system you want to run. You can customize the OS as your requirement. But in the standard hosting plan, this option is not available.

Downtime:

On cloud hosting chances of downtime is very remote as multiple servers are used.  In case one server goes down the others takes take care of it and virtually there is no down-time as such. But in standard hosting, if a server goes down then it takes time to resume.

Control Services:

On cloud hosting, you can control your cloud services by the API or from the web-console. This means you can start, stop, increase or decrease any service through API. This feature is not available on the standard hosting server.

Costing:

On standard hosting, we have to choose a plan for ours hosting on a periodical basis (week/ month/year), which is a fixed cost. But in Cloud, just pay as you actually consume. So, cloud-based hosting is cost-effective than a standard hosting server.

Private/Public:

There are several OpenSource apps available to configure the cloud environment. You can set up your own private cloud using cloud apps Cloudstack, Openstack, and Eucalyptus. Also, you can use the public cloud for your application hosting. Eg: AWS, Rackspace, Linode, etc.

KurrentJobs The Awesome iPhone App To Manage Your Job Search

In this era of Industrialization, everyone is planning to build a company of their own and run a successful business.  But they’re going to need skilled employees to get their jobs done.

Job posting websites could really make their search easy, but with all the available job board options, both recruiters and job seekers are getting frustrated in looking for right choices.

Because job seekers can’t find the right choice of companies as per their skills and experience. As well as the recruiters are getting misled by recruiting consultants and end up with the wrong candidates.

Never miss an update from us. Join 10,000+ marketers and leaders.

As a solution to above problem, iPhone developers at Andolasoft have designed a simple and secure iPhone app named “kurrentJobs”. It acts as a social media job portal for both recruiters and job seekers. It allows individuals, startups and established companies to post jobs as per their requirements.

Jobs are categorized on the basis of skills, experience and on type of jobs like Full-time, Part-time and Freelance.

With this app recruiters can post or manage their job posts from anywhere and anytime. The app is secure with the integration of social plug-ins like Facebook and Twitter.

The app has provided links to recruiter sites and also integrated LinkedIn to help job seekers to apply for jobs. This app can access network communications and storage content on your mobile devices for easier use.

The app is FREE to download and install on your iPhone, from the Apple App store.

iTune

Within a short span of time, Andolasoft has now become one of the major mobile app development companies in USA

We’ve achieved success in developing iPhone apps as we use agile methodologies, innovative work environment supported by creative iPhone developers. For more information about our iPhone and iPad apps please visit iPhone application development page.

How to use Amazon S3 Bucket with Paperclip to store images in Rails3

Amazon_S3_Online_Service-resized200-150x150

“S3 Bucket” is Amazon Simple Storage Service – a “highly durable and available store” and can be used to reliably store graphical and other applications contents such as media files, static assets and user uploads. It allows you to off-load your entire storage infrastructure. This feature facilitates better scalability, reliability, and speed than just storing files on the file-system.

It is an online storage web service offered by Amazon Web Services and provides storage through web services interfaces (REST, SOAP etc.)

Here is an example on how to use Amazon S3 with paperclip in Ruby on Rails applications.

Step#1

  • In rails 3.x

Install aws-s3 gem by adding in Gemfile

gem 'aws-s3'

And run

Run “bundle install”

Step#2

To get AWS S3 bucket ‘Access Key ID’ and ‘Secret Access Key’ go to the “http://aws.amazon.com/s3”

Create s3.yml file under config directory and enter your Amazon S3 credentials

development:
bucket: bucket-dev-name
access_key_id: xxxxx
secret_access_key: xxxxx
test:
bucket: bucket-test-name
access_key_id: xxxxx
secret_access_key: xxxxx
production:
bucket: bucket-prod-name
access_key_id: xxxxx
secret_access_key: xxxxx

Step#3

Open your model file that would hold the attachment and modify it as follows

###Paperclip
has_attached_file :photo,:styles =>{ :thumb => "100x100", :medium => "200x200", :large => "600x400" },:storage => :s3,
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",:path => ":attachment/:id/:style.:extension",:bucket => 'yourbucket'

Step#4

In view, to display the image

Web Site and Server Monitoring with Nagios

Nagios since it’s inception in 1999 has become one of the most popular and open source monitoring system (under the free license GNU General Public License) to monitor IT infrastructure problems.

It alerts you about any critical problem that might occur in your infrastructure through e-mail, SMS and pager.

Installation and configuration of Nagios is comparatively simpler than other infrastructure monitoring tools.

Although numerous plugins are available in the internet to monitor different services and for graphing of the data, plugin can also be customized as per your requirement by using tools like shell scripts, C++, Perl, Ruby, Python, PHP, C#, etc. DuringNagios configuration you have to keep the following in mind.

  • Lines starting with ‘#’ character are considered as comments and are ignored while processing.
  • Inconfiguration lines the characters that appear after a semicolon (;) arealso treated as comments hence are not processed.
  • Directive names are case-sensitive.

To get data from the monitoring host’s you will need aNagios agent. Below are some popular Nagios Agents:

  • NRPE
  • NRDP
  • NSClient++

Below are some protocols used for monitoring:

  • SMTP
  • POP3
  • HTTP
  • NNTP
  • ICMP
  • SNMP
  • FTP
  • SSH

Below are some Host resources which can be monitored:

  • Processor load
  • Disk usage
  • System logs

How to add AJAX Pagination using jQuery in Rails3

Ruby_on_railsAjax pagination will do the same functionality of pagination without refreshing the page. It calls the action through jQuery to display the results per page.

This example demonstrates the implementation of ajax pagination in Rails3. However the same can be used with Rails2.3.x.

Remember to add jQuery to your paths.

Step#1

Add the following gem to your Gemfile

gem 'will_paginate'
Run bundle install

Step#2

Include the following code in the controller you want to paginate, For example, I have used Posts controller.

class PostsController < ApplicationController
  def index
    @posts = Post.paginate(page: params[:page], per_page: 10)
  end
end

Step#3

Add this in the view “posts/index.html.erb” file

<div id=”post_id”>
<%=render partial:’posts’%>
</div>

Encapsulate the order list in the partial view “posts/_posts.html.erb”

<ul>
<% @posts.each do |post|%>
<li>
<!-- Show post data -->
</li>
<% end %>
</ul>
<% = will_paginate(@posts,:id=>”ajax_paginate”)%>
 
<script>
 
$(document).ready(function() {
$(“#ajax_paginate”).find(“a”).each(function(){
var linkElement = $(this);
var paginationURL = linkElement.attr(“href”);
linkElement.attr({“url”:paginationURL, “href”: ”#”});
linkElement.click(function(){
$(“#post_id”).html(‘<div align= “center”><br/>
<img src=”/images/loader.gif”/></div>’)
$(“#post_id”).load($(this).attr(‘url’));
Return false;
});
});
});
 
</script>

The last line “”ajax_paginate”) %>” will generate your pagination links

Voila, You are done!

Usage of PDFKit with Rails 3.2.8 and Ruby 1.9.3

PDFkit is a powerful library which generates PDF from HTML + CSS. It uses “wkhtmltopdf” on the back-end which renders HTML using Webkit. Here is a simple example which describes the installation of “wkhtmltopdf” and usages of pdfkit. I have used rails 3.2.8 and ruby 1.9.3 as my environment.

Step-1:

Install the “wkhtmltopdf” library

Download the “wkhtmltopdf” library from the link
http://code.google.com/p/wkhtmltopdf/

Windows

  • Download the exe file and install it.
  • Remember the installation path

Linux

  • Download the binary for your architecture at the http://code.google.com/p/wkhtmltopdf/downloads/list
  • Extract the file to a directory that is in your PATH, such as /opt or /usr/local/bin and run from there.

For Debian/Ubuntu use the following command:

apt-get install wkhtmltopdf

Step-2: Installing PDFKit

In your bundle file write

gem 'pdfkit'

Then install

bundle install

Step-3: Configuration of PDFKit

Create a new file “pdfkit.rb” in “config/initializers/” path and write the following

If you are in windows then you need to give the path to the exe file generated after installation. If you are in linux and the path is set as the default path then you don’t need to give the path.

PDFKit.configure do |config|
config.wkhtmltopdf = 'C:Program Fileswkhtmltopdfwkhtmltopdf .exe'
config.default_options = {
:page_size => 'Legal',
:print_media_type => true
}
# config.root_url = "http://localhost" # Use only if your external hostname is unavailable on the server.
end

Step-4: Middleware Setup

Write the following in the “config/application.rb

require 'pdfkit'
 
config.middleware.use PDFKit::Middleware
config.threadsafe!

Step-5: Usages

Creating PDF in a file path

Now to generate the pdf file by writing down the following codes on one of your controller actions

kit = PDFKit.new"<h1>Hello</h1><p>This is PDF!!!</p>"
file_path = your_file_path
pdf = kit.to_file file_path

Now you can find the PDF file being generated on the file path.

Displaying PDF on browser

<p id="pdf_link"><%= link_to "Download Invoice (PDF)", order_path(@order, :format => "pdf") %></p>

Your PDF will be displayed on the browser.

You can also add “.pdf” to any of our application’s URLs to get a PDF version of that page.