Christopher Steiner

Chief Technology Officer

Ruby 1.9 libopenssl error

When trying to communicate with Heroku was constantly getting the following message

ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.1/lib/restclient.rb:9:in `rescue in <top (required)>’: no such file to load — net/https. Try running apt-get install libopenssl-ruby (LoadError)

The issue was running

apt-get install libopenssl-ruby (LoadError)

did nothing (and yes I tried sudo) it was just the fact the that the ruby interpreter could not find openssl package.  Turns out building ruby from source had seemed to have created the issue (rather than the straight Synaptic Package Manager) process. 

Going into the ruby-1.9.2-p180/ext/openssl directly running ruby extconf.rb followed by make then make install, solved the issue.

Why FaceBook Should have lost

Interesting video from Sean Parker mentioning that FaceBook should never have won (in terms of been the dominant social network provider) given the prominence of MySpace and Friendster.  He essentially points to the fact that Friendster failed due to bad management of infrastructure, other articles on the Net seems to suggest that is was a poorly designed architecture which was unable to scale.  MySpace as Sean Parker indicates below failed due to poor management around strategy other articles point to a poor implementation of the user experience.  Either way whatever the cause it created the opening required for FaceBook to become the dominant “Social Network”.

SQL Injection (LizaMoon redirection) infects 1.5 million sites

Read this week about the infection of 1.5 million websites from a mass SQL Injection attack (also known as the LizaMoon redirection).  I came across this particular attack last week however immediately dismissed it and never attempted to download the free virus detection software.   Going through the attack was surprised to see the level of sophistication that the hackers went to to build the scareware software.  You can watch how the attack works here:

http://www.youtube.com/watch?v=wKI5dg1cs74

Good intro video on YouTube on basic SQL Injection into Software also below.

http://www.youtube.com/watch?v=h-9rHTLHJTY

Table Size of Every Database Table

Was gathering some non functional requirements around database tables sizes for SQL Server and came across the following script by Michael Sellers which calculates the size of every tables in the database.  Very Helpful

 

CREATE PROCEDURE GetAllTableSizes
AS
/*
    Obtains spaced used data for ALL user tables in the database
*/
DECLARE @TableName VARCHAR(100)    –For storing values in the cursor
–Cursor to get the name of all user tables from the sysobjects listing
DECLARE tableCursor CURSOR
FOR 
select [name]
from dbo.sysobjects 
where  OBJECTPROPERTY(id, N’IsUserTable’) = 1
FOR READ ONLY
–A procedure level temp table to store the results
CREATE TABLE #TempTable
(
    tableName varchar(100),
    numberofRows varchar(100),
    reservedSize varchar(50),
    dataSize varchar(50),
    indexSize varchar(50),
    unusedSize varchar(50)
)
–Open the cursor
OPEN tableCursor
–Get the first table name from the cursor
FETCH NEXT FROM tableCursor INTO @TableName
–Loop until the cursor was not able to fetch
WHILE (@@Fetch_Status >= 0)
BEGIN
–Dump the results of the sp_spaceused query to the temp table
INSERT  #TempTable
EXEC sp_spaceused @TableName
–Get the next table name
FETCH NEXT FROM tableCursor INTO @TableName
END
–Get rid of the cursor
CLOSE tableCursor
DEALLOCATE tableCursor
–Select all records so we can use the reults
SELECT * 
FROM #TempTable
–Final cleanup!
DROP TABLE #TempTable
GO

Felix, Karaf and FUSE for the Simple

It is interesting to see the number of new descriptions and definitions that come up to describe a new technology framework.  For the last couple of months I have been embarking on a journey on OSGi and its impacts and implications for the company I work for.  I got into a conversation at work between the differences between each of the following OSGi implementations, components and runtimes.  After spending considerable time getting it clear in my head I decided to write a blog entry on it (mainly for myself).

What is OSGi?

OSGi in and of itself is a specification using the java language, it outlines a framework to which software and equipment vendors can develop and manage services in a coordinated fashion.  The OSGi specification targets a range of devices, equipment & software from phones, automobiles and service gateways.   Implementers of the specification are able to build applications or devices which can provide services in a dynamic way with the ability to stop, start, update and add new services without bringing any downtime or interruption to the application or device.    

Implementation of the OSGi Specification

Felix and Equinox are 2 OSGi runtimes, Apache (Felix) and Eclipse (Equinox) have taken the specification defining the interfaces and api’s of the OSGi specification and have provided an implementation.  Given both a valid implementations of the OSGi specification they are interchangeable within an OSGi container.

OSGi Containers

Apache Karaf is a container for an OSGi runtime it provides a richness to the OSGi platform by offering a console, logging, hot deployment, provisioning, dynamic configuration and security.

Technology Layer

Sitting above the OSGi container is technology layer provisioning for a number of component technologies which can be deployed as part of a bundle.  The following outlines the list of component technologies supported by the technology layer:

  • BPEL
  • JBI
  • JMS
  • JAX-WS
  • JAX-RS
  • Camel
  • Spring

Ok but what is FUSE?

Fuse is a company which offers support and consultancy around 4 key Apache Open Source projects (been Camel, ESB, Active MQ & CXF) FUSE ESB (or ServiceMix) is the current ESB implementation which made up of the OSGi Implementation, container and technology layer outlined above and illustrated by the diagram below:

 

image