Thursday, July 12, 2012

Social Media


The last blog of this course is about social media and social networking. The first thing that comes to mind when we listen to the word social media or social networking is Facebook. At the moment, Facebook seems to be the reason for living for most of the people. People post everything they do on Facebook as if it was a diary. However, there are many more social networks around, including Twitter, Linked In, Bebo, and more…

Social Media

So, what is social media and social networking?? Social media is all about web-based (and mobile-based) technologies which are used to turn communication into interactive dialogue among organizations, communities, and individuals. These build on the ideological principles that the web is platform for information sharing, interoperability and collaboration, and allow the creation and exchange of user-generated content. This is enabled by scalable communication techniques, such as cloud computing.


Figure 1: Popular Social Networking Brands

Social Network

A social network is a social structure made up of a set of individuals or organizations and the social relation between these individuals or organizations. The social network perspective provides a clear way of analyzing the structure of whole social entities.

Figure 2: Popular Social Networking Activity

Smart Phones

Smartphones have helped a lot in this world of social media. People now have constant access to the web. Also, the operating systems of such devices enable their users to constantly receive updates from their favorite social networks. Also, it is much easier to upload pictures and stuff to your profile. Friends from your social network are also contacts in your mobile phone, which enable you to send a message instantly to your friends Facebook account.


Figure 3: Facebook on an Android Device

Social Game – Shake with Me

My colleagues at Webit Design Studios Ltd produced a social game with very tight integration with Facebook, one of the most popular social networks. While the game play is fairly simple, the server side development is done with a huge insight. The game play is all about shaking the device (IOS or Android) and with each shake the screen is filled with water. The social aspect of the game is when the game integrates with other friends from Facebook. You can invite other people to join you in a game and who fills the screen first wins. It also includes suggesting friends to play with you and other people whom you may not know but who are in your area to play with you.



Figure 4: Shake with Me

Statistics

Social networking is all about numbers. People talk about how many statuses are posted, images shared, time spent and more. These are some statistics for 2012:

Facebook Statistics 2012:

  • An average Facebook user has 130 friends and likes 80 pages
  • 56% of consumer say that they are more likely recommend a brand after becoming a fan
  • Each week on Facebook more than 3.5 billion pieces of content are shared


Twitter Statistics 2012:

  • 34% of marketers have generated leads using Twitter
  • 55% of Twitter users access the platform via their mobile


General Social Media Statistics 2012:

  • 30% of B2B marketers are spending millions of dollars each year on social media marketing
  • Nearly 30% of these users are not tracking the impact of this marketing
  • 20% of Google searches each day have never been searched for before
  • Out of the 6 billion people on the planet 4.8 billion have a mobile and only 4.2 billion own a toothbrush

Wednesday, July 4, 2012

Cloud Computing


Is this the next big thing?? Or is it already a thing of the past?? Cloud computing refers to delivering computing and storage capacity as a service. That is, no upfront cost and pay per use for the services you really require. With cloud computing we generally speak of three categories:



  • Infrastructure as a Service (IaaS)
  • Platform as a Service (PaaS)
  • Software as a Service (SaaS)




Figure 1: Major players in Cloud Computing

Infrastructure as a Service (IaaS)

Infrastructure as a Service is when users rent use of servers based on the computational power needed and storage required. Most of the time users buy virtual machines in pay per use, but other devices are available such as physical servers, GPU clusters, firewalls, load balancers and networks. Examples include the massive Amazon EC2 and the Rackspace Cloud.

Platform as a Service (PaaS)

Cloud providers offer a computing platform including an operating system, database, web server and programming language execution environment. This means that the platform will be ready to deploy very quickly. Such platforms are specific for programming languages and databases used. For example Heroku is one of these with a platform specific for Ruby, Java, Python and Node.js. Such platforms typically scale according to load and use.

Software as a Service (SaaS)

This means that an application is readily supplied with all the configuration and the all the user needs to do is to configure the last few settings and tweaks. Examples of these are Google Apps and Office 365 which is a cloud based exchange server.


Figure 2: IBM Data Center

Private Cloud, Public Cloud or both?

Public Cloud are cloud services offered by a cloud service provider with pay per use models. Community cloud shares infrastructure between more than one organization with common concerns such as security and compliance. Private cloud is a cloud infrastructure operated solely for a single organization and can be either internally managed or externally managed and may also either be hosted internally or externally. Private cloud still has the upfront cost and the maintenance which means losing most of the advantages of cloud computing in the first place. Hybrid computing is a mix of one of the previously mentioned types of cloud. An organization might host most of the services in public cloud and may have some more sensitive applications and storage running in a private cloud environment.

Concerns

Of course people have a lot of concerns with cloud computing. There is a lack of control over what happens with the critical stuff of the company or the individual. The fact that the data is not stored within the facilities of the company or the individual is a huge concern. Privacy and security are also concerns. Compliance with standard is also something that you cannot do much about. Hidden costs are also an issue. Most providers request automatic payment at the end of the month, which can cause surprises. Outages in the data centers, although rare, can cause disruption to your services. Also, there will be a reliance on an internet connection to access the services. No internet and all your employees can go home as they can do nothing.


Figure 3: Location of Google Data Centers around the world

Major Benefits

Cloud Computing brings with it many benefits to the end user. These include access to a huge range of applications without having to download or install anything, applications can be accessed from any computer, anywhere in the world, users can avoid expenditure on hardware and software; only using what they need, companies can share resources in one place, consumption is billed as a utility with minimal upfront costs and scalability via on-demand resources.
There are several differences from traditional hosting to cloud hosting. The main differences are that cloud computing is sold on demand, the service is managed by the provider, users can determine the amount of service they take and users can log on to the network from any computer in the world

Infrastructure Required

Without doubt, large datacenters are required for all this to be offered. The video below shows a new data center being built by Soft Layer, a cloud computing provider. This shows the massive planning, space and hardware required for such a data center. Of course, this is only a small part as a large number of human resources and so on are required.





Figure 4: Video showing Soft Layer New Data Center

Cloud Training

Like always, with new technologies arise the need to become trained and certified. While cloud services are mostly identical to normal hosted or co-located servers, special certifications still exist and are very important. Some of the certifications available are mentioned in the video below.


Figure 5: Video showing Top 5 cloud certifications

Personal Experience

I have worked with Amazon AWS and Rackspace Cloud Servers. Both products are very good. Their internet speed is very fast and it is very easy to use the service and integrate with their APIs. Setting up is also very easy and it is much easier to create a new cloud server than purchasing a server, racking it up and starting from scratch every time you need to change something for testing. At the moment I would not know what to do without cloud computing!!

Monday, July 2, 2012

More Second Life


Following my last post about programming in Second Life, today I will create a Note Card Giver, a Post Box System and an Object which interacts with a web page.

Note Card Giver

I chose to build a note card giver which gives note cards to avatars who pass by the object. Another option for this is to give a note card to who touches the note card giver. First I created an object to be able to give note cards. I did not create an elaborate object as this was not the purpose of the task. Then I created a note card in the inventory which will be given by the note card giver. The note card was also added to the contents of the note card giver. I added a script to the note card giver to start handing note cards. In the first part of the script I created a number of variables


string notecard = "Note1";
integer freq = 1;

integer maxList = 100;

list given;


The string holds the name of the note card which will be given to the passing avatar. freq is the number which the sensor uses as a frequency. It is the number of seconds which the sensor waits until he checks again for an avatar. The max list is the number of avatars which can be stored in the list of already contacted avatars. Then, I modified the code of the object of the state_entry().


state_entry()
    {

        llSensorRepeat("", "",AGENT, 5, PI, freq);

        llSetText("", <1.0, 1.0, 1.0>, 1.0);
    }


The code above is to create a sensor to check for avatar movement in the area. The number 5 is the radius in metres to check around. PI is used to make the sensor work in 360 degrees.




       sensor(integer num_detected)
    {

        integer i;

        key detected;
      
        for(i=0;i<num_detected;i++)
        {
            detected = llDetectedKey(i);
          
            if( llListFindList(given, [detected]) < 0 )
            {
                given += llDetectedKey(i);
              
                llGiveInventory(detected, notecard);
                if (llGetListLength(given) >= maxList)
                {
                    given = llDeleteSubList(given,0,10);
                }                               
            }
        }               
    }


Figure 1: Note Card given to me by Object

The code above is the part which sends the note cards. When the sensor detects an avatar, the function sensor(integer num_detected) is called. This function contains a for loop to go through all the detections. When an avatar is detected, the list is checked to see if the avatar is in the list already. An avatar might have already passed near this note card giver. If the avatar is not in the list, his name will be added to the list and a note card will be given to him. llGiveInventory() is the function used by Second Life to give the note card to the avatar. llGetListLength() checks the length of the list and if the list reaches the maximum, the function llDeleteSubList(given,0,10) deletes the first 10 avatar names of the list.


Figure 2: The Contents of the Note card

Post Box System

This was quite not difficult to create, but to test it, I had some problems. I created a very simple object to test the post box system. I did not create an elaborate post box because it was not the scope of the task. The code for this post box system is shown below:


default
{

    state_entry() {

        llAllowInventoryDrop(TRUE);
    }
    touch_start(integer total_number) {
        llSay(0,"Create a notecard and drop it into the mailbox");
    }
  
    changed(integer mask) {
        if (mask & (CHANGED_INVENTORY | CHANGED_ALLOWED_DROP)){



            integer i;

            for (i=0; i<llGetInventoryNumber(INVENTORY_ALL); i++) {
                string name = llGetInventoryName(INVENTORY_ALL, i);
                integer type = llGetInventoryType(name);
                if (type != INVENTORY_SCRIPT) {
                    integer perms = llGetInventoryPermMask(name, MASK_OWNER);
                    if ((perms & PERM_TRANSFER) == PERM_TRANSFER &&
                        (perms & PERM_COPY) == 0) {
          
                              llSay(0, "Thanks for the "+name);
                              llGiveInventory(llGetOwner(), name);
                        llRemoveInventory(name);
                    } else {
                              llSay(0, "Sorry, "+name+" isn't nocopy, trans");
                              llRemoveInventory(name);
                    }
                }
            }
        }
    }



Figure 3: Another avatar put a test note card in my post box system

The state entry part allows people to drop items into the post box object. The touch_start part displays a message when the object is touched. It displays a message to Create a notecard and drop it into the mailbox. The first part of the changed function checks for changes in the inventory and the changed allowed drop state. Then the function loops inside the inventory items and checks if an object is not a script in the inventory mask of the owner of the object with respect to the item. If the object dragged is not a copy, it is moved from the post box to the inventory. If it is a copy, it is not copied to the inventory and it is then removed from the post box. The avatar did not want to give me full permission because he was afraid of something. But he still was kind enough to test the system for me.


Figure 4: The note card given by the post box system

Object Interacting with a Website

For this part, I wanted to show how easy it is to display the content of a website in Second Life, without knowledge of the LSL scripting language. I created a kind of screen using a large object of about 10m by 10m. Then I used a texture to load the website. I selected one face of the screen and clicked on the plus sign at the bottom of the object window. In the URL, I added a URL of a youtube video. I removed the Auto Scale and entered the size of the video, 640x360. Then, I played a bit with the texture offset to center the video across the object. Below you can see the avatar in front of the BIG Screen. However the flash player is not installed within second life and the video cannot be seen. Another screen was thus created to show the content of another website. www.google.com is shown on the other screen.


Figure 5: Both screens showing two web pages in Second Life

After all, it was not that difficult to program objects in Second Life, you just need some time and patience :D