Thinking Without Thinking


Multiple IPs to Single Network Interface [LINUX]
[info]f1911
Multiple IPs can be assigned to single network Interface by one of the following methods:

1- Using the Aliases [The Old Techniques]
Create a file /etc/sysconfig/network-scripts/ifcfg-eth0 [eth0 is the name of the interface]

#File: ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=statis
IPADDR-192.168.0.1
NETMASK=225.225.225.0
BROADCAST=192.168.0.225
NETWORK=192.168.0.0
HWADDR=00.00.00.10.10.10

#File: ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=statis
IPADDR-192.168.0.2
NETMASK=225.225.225.0
BROADCAST=192.168.0.225
NETWORK=192.168.0.0
HWADDR=    00.00.00.10.10.10

Save the files and restart the service

>service network restart

2-Using the IP technique [New and the easyone]

>ip addr addr 192.168.0.1/24 brd + dev eth0
>ip addr addr 192.168.0.2/24 brd + dev eth0



More Cloud
[info]f1911
http://cloudcomputing.sys-con.com/

Cloud Tax
[info]f1911
http://alan.blog-city.com/cloud_tax.htm

Federated Clouds - A view with a review
[info]f1911
Clouds are now becoming a common phenomenon after their introduction from blue chips like Amazon , Google , Microsoft . Amzaon introduced EC2 which is based on a customized version of XEN with IaaS [Infrastrucutre as a Service], Google introduced App Engine which is moving in a different direction allowing to develop application and deploy them on app engine currently very limited language support available.
Google app engine provides vitalization as PaaS [Platfrom as a service]. Microsoft Azure is almost in the same direction as google app engine with deployment feature of .net web applications.They also provided the services as PaaS.Though all of them providing the services with following features

1- Processing vitalization
2- Storage vitalization

Though all of them are providing the support for the 2 features but in a very heterogeneous way.If a person is using Amazon for some of its linux capabilities and at the same time he needed support for some microsoft applications [ Though Amazon AWS provided support for windows using the latest XEN vitalization though needed VT enabled hardware :)] he will be in a delima which we can say is the "federated cloud". These federated clouds are so different in every aspect , in architecture , domain and even their business models.Here comes a need to have some middle-ware which provides transparency against the "Heterogeneous Clouds" and the optimum utilization of the clouds, which not only analyze the utilization of the clouds in terms of technical aspects but also in terms of financial aspects. For financial aspects we can use our own financial benchmarks , now after cloud computing there is a time coming where each processing will be rated and each additional useless processing cycle can be penalyzed not by the company but by the green house effects like the same way as [PAKISTAN SCENARIO :PEPCO advertising to use energy saver to save electricity in terms of kilo watts to avoid load shading].
So all this is some of my very very very sighted imagination may be helpful in future.


The device is not ready
[info]f1911
if this error comes on Amazon Webservice API


The device is not ready

Please check your EC2 home and other paths they may b
e incorrect.

Mirosoft Updates :)
[info]f1911
Microsoft learn from Linux to predict future

Microsoft planned for MinWin ,which is the windows core for every porduct in future of microsoft.It has a size of 25 MB which only require 40 MB memory to run..


http://www.istartedsomething.com/20071019/eric-talk-demo-windows-7-minwin/


Microsoft's  open source operating system available

Microsoft releases the operating system of the future completely written in C# and run on CLR.

SingularityArchitecture.jpg


It is nothing more than a neat academic exercise, not a glimpse of Windows 7. 

Microsoft Singularity Step by Step

http://www.ahmed-essam.com/2008/03/preparing-building-and-denuging.html

Adding Code to Singularity

http://www.ahmed-essam.com/2008/03/adding-code-to-singularity.html


Windows 7 new OS ,release due in 2010





JAVA GENERICS at Embracement
[info]f1911

Joshua used the following two quotes from the web about JAVA GENERICES:

“I am completely and totally humbled. Laid low. I realize now that I am simply not smart at all. I made the mistake of thinking that I could understand generics. I simply cannot. I just can't. This is really depressing. It is the first time that I've ever not been able to understand something related to computers, in any domain, anywhere, period.”
“I'm the lead architect here, have a PhD in physics, and have been working daily in Java for 10 years and know it pretty well. The other guy is a very senior enterprise developer (wrote an email system that sends 600 million emails/year with almost no maintenance). If we can't get [generics], it's highly unlikely that the ‘average’ developer will ever in our lifetimes be able to figure this stuff out.”


Reference : http://www.artima.com/forums/flat.jsp?forum=106&thread=222021

Amazon S3 didnt accept Pakistan's Day Light Saving System :)
[info]f1911

Last night Pakistan's Day Light Saving System took more hours then save through this system. I was working in S3 bucket explorer and it was continuously giving error that it can not connect to S3.In the end I found out that my computer clock was adjusted according to new timing in Pakistan "Day Light Saving System".S3 can only accept 15 min deviation from the Zone time,but I was deviating 1 hour (Saving the day light and wasting office light).When I adjusted to the old one it worked...


Amazon EC2 Problem [server refused our key]
[info]f1911
Problems: server refused key

Reasons:
One of the reason which I faced and that ate my two days among other reasons is :

If you change the permissions of the /root this problem occurs
By default root permissions are
    750
you can check it by ll.

You run an instance of the image at EC2 and change the rights of the /root folder from 750 to any other then try make connection from putty then
It will give this error

server refused key

The only solution to this problem is change back the permission of the root from any other to 750 or the one from which you created the key pair [Private key and Certificate Key].

How to deploy FoodMart dataware-house on Linux using Mondrian as OLAP Server and PostgreSQL as Datab
[info]f1911

How to deploy FoodMart dataware-house on Linux using Mondrian as OLAP Server and PostgreSQL as Database

 Legends:

1-         Commands are in Italic format.

 

Assumptions:

 

1-         Database                      foodmart

2-         Schema                        foodmart

3-         Database User Name   test

4-         Database Password      test

 

Requirements:               [In order of installations]

 

1-                                         JDK 1.5 [Mondrian XML/A can not run on version other then jdk 1.5]

2-                                         Tomcat 5.5

3-                                         Postgresql 8.1.*

4-                                         Mondrian-3.0.3.11016

 

 

Procedure:

 

1- Jdk 1.5 Deployment          [SKIP if already installed]

 

1- Download using

wget http://www.java.net/download/jdk6/6u2/promoted/b02/binaries/jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin

2-Change Persmissions using

                        chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin

 

3-Depploy using

                        ./jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin

                       

4-set Environment variable using

                        export JAVA_HOME=/usr/java/jdk1.6.0_02

 

2-Deploy Tomcat                   [SKIP if already installed]

                       

1-Download

wget http://apache.mirrors.hoobly.com/tomcat/tomcat-5/v5.5.26/bin/apache-tomcat-5.5.26.zip

 

2-Unzip

unzip apache-tomcat-5.5.26.zip -d /etc

           

3-Deploy PostgreSQL           [SKIP if already installed]

 

                       

            1-Download and install

            yum -y install postgresql postgresql-server php-pgsql 
[We can download and then install or download zip and then unzip but we have to create the postgres user for servicees]
   
            2-Configure them as service and set to start automatically
            /sbin/chkconfig postgresql on
            /sbin/service postgresql start
 
            3-To enter into the postgres account use
            su - postgres 
   
            4-create FoodMart Database on PostgreSQL
            createdb foodmart

createuser test CREATEUSER;

psql -d foodmart -U test -W;

 

5-Configuration for USER to access database

            for user “test ” to access the database  you have to configure following files

            vi /var/lib/pgsql/data/pg_hba.conf

 

 

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

 

# "local" is for Unix domain socket connections only

local   all         all                               trust

# IPv4 local connections:

host    all         all         127.0.0.1/32          trust

# IPv6 local connections:

host    all         all         ::1/128               trust

 

 

define trust in the column under METHOD

since default is “for sameuser” which is used for Linux users so if we remain the default configuration we have to make each linux user for each database user in postgresql.

 

create schemea ‘foodmart’;

set serarcg_path to foomart;            

 

 

 

                        6-To generate schema and data for foodmart

 

                                    1-Download the jdbc driver for postgres

                                    download postgresql-8.3-603.jdbc3.jar and copy it into the lib folder of the mondrian

 

                                    Pentaho Installation/mondrian-3.0.3.11016/mondrian-3.0.3.11016/mondrian-3.0.3.11016

 

java -cp "/mondrian/lib/mondrian.jar:/mondrian/lib/log4j-1.2.8.jar:/mondrian/lib/eigenbase-xom.jar:/mondrian/lib/eigenbase-resgen.jar:/mondrian/lib/eigenbase-properties.jar:/mondrian/postgresql-8.3-603.jdbc3.jar"     mondrian.test.loader.MondrianFoodMartLoader     -verbose -tables -data -indexes     -jdbcDrivers=org.postgresql.Driver     -inputFile="/mondrian/demo/FoodMartCreateData.sql"     -outputJdbcURL="jdbc:postgresql://localhost/foodmart"     -outputJdbcUser=test     -outputJdbcPassword=test

 

 

In the above command if some jar is missing or problem in version number then check or download and give the correct file name and path 

 

            So by run the command then the FoodMart schema will be generated. J

 

4-Deploy mondrian

 

Copy mondrian.war from mondrian-3.0.3.11016/mondrian-3.0.3.11016/mondrian-3.0.3.11016/lib into the web apps folder and unwar it into the tomcat webapps folder.

 

            1- Mondrian Configuration for the assumptions specified above

            In  /WEB-INF/datasources.xml makes changes specified in bold

 

<?xml version="1.0"?>

<!--

  == $Id: //open/mondrian/webapp/WEB-INF/datasources.xml#5 $

  == This software is subject to the terms of the Common Public License

  == Agreement, available at the following URL:

  == http://www.opensource.org/licenses/cpl.html.

  == (C) Copyright 2005-2006 Julian Hyde and others.

  == All Rights Reserved.

  == You must accept the terms of that agreement to use this software.

  -->

<DataSources>

    <!--

         A data source is a collection of logically related Mondrian

         catalogs.

 

         The XMLA specification allows an XMLA provider to have

         multiple data sources, but some clients, particularly ones

         based on ADOMD.NET such as Simba's O2X client and Pentaho

         Spreadsheet Services, can only connect to the first declared

         data source. Therefore, we recommend that you use a single

         data source, containing multiple catalogs if necessary.

     -->

    <DataSource>

        <!--

             Name of the data source.

        -->

        <DataSourceName>Provider=Mondrian;DataSource=MondrianFoodMart;

   </DataSourceName>

 

        <!--

             Description of the data source.

        -->

        <DataSourceDescription>Mondrian FoodMart Data Warehouse

</DataSourceDescription>

 

        <!--

             The URL of the servlet.

        -->

        <URL>http://localhost:8888/mondrian/xmla</URL>

 

        <!--

             Mondrian connect string for the data source. If this data

             source contains multiple catalogs, omit the 'Catalog'

             property, and specify the URI of the schema.xml file in

             the catalog's <Definition> element.

 

             Catalogs can override the connect string with their own

             <DataSourceInfo> element.

          -->

 

        <DataSourceInfo>Provider=mondrian;JdbcUrl=jdbc:postgresql://localhost/foodmart;

JdbcUser=test;JdbcPassword=test;JdbcDrivers=org.postgresql.Driver;</DataSourceInfo>

 

        <!--

             Provider name must be 'Mondrian'.

        -->

 

          <ProviderType>MDP</ProviderType>

 

        <!--

             Authentication mode. Allowable values are

             'Unauthenticated', 'Authenticated', 'Integrated'.

        -->

 

 

     <AuthenticationMode>Unauthenticated</AuthenticationMode>

 

        <!--

             A data source contains one or more catalogs.

        -->

        <Catalogs>

            <!--

                Catalog names must match the name inside the

                schema.xml file, and must be unique across all data

                sources defined in this datasources.xml file.

            -->

            <Catalog name="FoodMart">

                <!--

                     Mondrian connect string for the data source. This

                     element is optional; if specified, it overrides the

                     data source's <DataSourceInfo> element. Typically,

                     you would use this element if the catalogs have

                     different JDBC data sources.

                 -->

 

                <DataSourceInfo>Provider=mondrian;Jdbc=jdbc:postgresql://localhost/foodmart;

JdbcUser=test;JdbcPassword=test;JdbcDrivers=org.postgresql.Driver;</DataSourceInfo>

 

 

                <!--

                    URI of the schema definition file.

                -->

                <Definition>/WEB-INF/queries/FoodMart.xml</Definition>

            </Catalog>

        </Catalogs>

 

    </DataSource>

 

</DataSources>

 

 

 

 

            In WEB-INF/ mondrian.properties file makes changes specified in bold

 

 

# For XML/A JSPs

mondrian.test.connectString=Provider=mondiran;Jdbc=jdbc:postgresql://localhost/foodmart?user=test&password=test;JdbcDrivers=org.postgresql.Driver;Catalog=/WEB-INF/queries/FoodMart.xml;

 

            In the following files change <jp:mondrianQuery>  to

 

arrows.jsp  

colors.jsp  

testquery.jsp 

fourhier.jsp 

mondrian.jsp  

mondrianXMLA.jsp 

testrole.jsp  

xmla.jsp

 

<jp:mondrianQuery id="query01" jdbcDriver="org.postgresql.Driver" jdbcUrl="jdbc:postgresql://localhost/foodmart?user=test&password=test" catalogUri="/WEB-INF/queries/FoodMart.xml">

 Copy the following files:

·                     If needed, copy your JDBC driver JAR to TOMCAT_HOME/common/endorsed

·                     Copy xalan.jar to TOMCAT_HOME/common/endorsed

Note: in case any problem first check and restart postgres and tomcat

Reference:

 1-http://mondrian.pentaho.org/documentation/installation.php

2- Searched a lot on www.google.com so can not specify all the names of the websites.

 

 

 

 

 

 


Lnux Issues One Solution
[info]f1911
In any case first Change try to  change permission of the files

(no subject)
[info]f1911
Singleton is a deign pattern used to minimize the memory foot prints , mostly used in stateless and service providing objects, but does following the rules to make singleton objects make it singleton.These rules usually are,

1- Making the constructor private
2- Providing  a Factory Method for the object
3- Providing a Factory Method Synchronized
4- In some cases making the class  un-override-able
                 in java Making Class  final
                 in .net Making  Class  sealed [C#]
5- Defining Class level securities

But just following the above rule ca we make it singleton or multiton.

No, there are ways which stop them from from being single or multiton.

1- Serialization
            If we make them transient


Through Serialization
Through Reflection

Web as an Operating System,is it really next big thing and a red sign for developing countries.
[info]f1911
Web as Operating System, work started by Tim Berners-Lee is now getting its pinnacle, but is it really next big thing or red sign for the developing and under developed countries enjoying the benefits of PIRATED COPIES and loose policies against Intellectual properties, so as a justification trying to overcome the digital divide and minimizing the divide. Before criticizing we have to see web as OS working so can see is it really a Digital Divide widener.

Web as an OS is basically the revival of the old mainframe era when we were having one mainframe and lots of dumb terminals with no application at all in the terminals. The Web will replace the mainframe and our machines will become the dumb terminal and all the applications will be hosted on the web and in the form of mashups, SOA, SaaS, PaaS will be getting the benefits. We just login to office web application and create document and save it on the web, BUT will all these be free and Secure, a big NO every one have to pay the price and here the point comes which causes the widening of the digital divide.

People in Third world countries get the benefits of pirated copies and develop expertise in the applications will get stuck and may be cant get that expertise due to limited resource, though they can benefit from there desktop but until when the big giant will start deprecate the old methodologies of desktop and move to web as an OS so the hardware and the software will become out of the third world nations and here the digital divide begin to widen between developed and undeveloped countries.

To cop up these problems third world nations will need to have a better infrastructure but now the technology start to monopolize to some countries and they can charge more then handsome bucks against them.

To cop up these problem first need to develop infrastructure and technology so can face the challenge as well as 
the big giant can also help by providing free for personal use and place cost for commercial use

Govt can also help but [Govt can also place tax on it a new way of revenue generation for govt].

If we strive jointly then convert this threat of digital divide expansion to opportunity of contraction the digital divide.

Home