Social Icons

twitterfacebookgoogle pluslinkedinrss feedemail

Pages

Thursday, October 11, 2012

TEIID 8.1 tutorial - Part 2

Here the second part: very fast, just importing the XSD that we'll be using to create the view model.

Just remember to place the XSD in the schema folder; sometimes it gets quirky and do conflicts with the preview files it generate in the root during the import.




Go to the third part of the TEIID tutorial.

TEIID 8.1 tutorial - Part 1

This is the first of a series of tutorial on the use of TEIID.

TEIID is a piece of software from JBoss that allows you to do very sophisticated EII creating a new virtual DB getting data from many different sources, transforming them and publishing in different ways.

In these tutorials I'll explain how to get a relational DB (from MySQL), and exposing its content as an XML document conforming to a given schema through either a JDBC connection or a SOAP service.

The video is without audio since I do not like to talk too much during registration and I'm too lazy to record it later.

Also the installation is in italian, but hope that is clear enough for all to understand in any case leave a message is something is not clear.

This new tutorial uses TEIID version 8.1 on application server JBoss 7.1.1 and TEIID designer 7.8

I'm starting from a mostly clean and fresh installation of Designer (did not record the creation fo the MySQL driver, but should not be a problem).

This first part explain how to get the physical model from the DB, very quick and easy.

For sake of easyness I'm using the book DB you find around in the examples from JBoss so you'll find youself at home.



Go to the next part of the TEIID tutorial.

Yii framework and CloudStack and Flex and ...

For the Open-DAI project I need to create a quick and dirty consolle (I hope it will become something more sophisticated, but for now I need something functional).

The target is to manage to pilot CloudStack to create VMs. I cannot use the CloudStack interface since it does not allow for adding "user data" so I need to use API calls to di the job

The problem is that I need to do this job cross CloudStack domains.

So have to get the list of API key and secret key and other CloudStack related data and write down a small program to issue the calls.

Obviously since you need to manage creation you need to be able to see what is going on in time so a small DB will be needed and also since the architecture of Open-DAI require to create management VMs in a precise order There will be the need to manage a simple workflow.

I also like to present the user with a view of the architectural deploy model describing the state of the deployed VMs.

Since I want to do things in a fast way without having to install too many things I decided to use PHP, a SQLite DB, Flex for the "toppings".

Since I believe that reinventing the wheel is not advisable I looked over to some of the PHP frameworks around ... at firts looked at Zend 2.0 ... really nice but ... damn complicated, you surely manage to do a lot but have to overcome a steep learning curve, so after few hours of hacking I looked somewhere else and ... landed on Yii.

Well I can say I'm surprised. It took more or less three hours (following the tutorial) to have a first scratch of application, integrated with the CloudStack library and ready to receive some of the code I already prepared in the last days (tomorrow will be a day of cut and paste and fix).

I can advice to look at it.

Sunday, September 09, 2012

Puppet and modules

I've been working with puppet and the good impression of the product balances with the few really good modules around.
There are lots of modules, some are good, but most are build to statisfy the specific needs of the author and not a generic management of the software also there is little integration or common approach: one uses wget another curl, one manage different ps, one require dependecy to a module from the same author and not to more official ones ( comprehensible but can be problematic when the dependancy is with things like apache or Java ).
Obviously this is the normal characteristic of oss project but I think that this calls for more control from project' developers.
The project is a good one and with version 3 has lots of good features: we need a bunch of basic modules designed with the state of the art so that there can be a common solution over which people can develop new more complex or dedicated mods.
This could help the grown of the contributing community.

Thursday, September 06, 2012

Puppet and exported resources

I've recently started using puppet for the european project Open-DAI I'm working on and I can say that after a steep learning period the tool is really nice.

I expecially like the exported resources that allow for "piloting" the creation of resources on a remote node from a first node.

The use case is installing stuff like a DB on a remote DB host for the application we are installing.
My example case is Zabbix.
I want to install zabbix in a distributed configuration using an existing MySQL server I have on the cloud and placing the application on a new cloud host.

Usually all the example and modules I find around imply to have all the stuff on the same host.

The idea id to declare on the application node the fact that you need a DB and to transform this declaration to a command execution on the Db to provision the required DB.

I'm using puppet 3.0.rc4 and opting to use puppet-mysql from puppetlabs (I must say that there is a bit of jungle on the puppet modules around and prefer to stick and possibly contribute to the puppetlabs collection)

The solution I found is to use exported resources on the application node and collecting them on the DB node in this way


In the zabbix host

...
@@mysql::db { zabbix1:
user => 'zabbix1',
password => 'mypass',
host => $::fqdn,
grant => ['all'],
tag => 'new_db_nodeDBname'
}
...

On the MySQL node

...
class { 'mysql::server':
config_hash => {root_password => 'changeme',}
}
Mysql::Db <<| tag == 'new_db_nodeDBname' |>>
...

Now I'll have to solve the orchestration and piloting of the whole process that is after created the DB I'll have to issue a sql creation and to do so I'll need to be sure to have the DB installed so this will require to:
force a puppet agent execution on the MySQL node (possibly using mcollective)
a second run of the puppect agent on the zabbix node to check the availability of the DB and proceed with the installation.

In any case a nice start.

Thursday, April 19, 2012

Mobile app with phonegap

I've managed to implement my first application using phonegap.
I'm very happy with the results.
Operative in no time with no problems.
Made a simple dumb application in half an hour.
Next step is to add a bit of business logic behind to test all the steps that will be needed for the EU project I'm following.

Monday, July 04, 2011

Layar vs. Junaio

I'm trying Augmented Reality services and I really think that these are good stuff tools.
This is the new approach to web and content usage.
Two that I'm looking at are Layar and Junaio.
They almost do the same things, with some peculiar differences around.

Both have 3D object placement, but Layar offers better tools to do the job, with the java application offered you can place the object precisely on the map.
Junaio helps more on getting a precise GPS reading using LLA markers a feature much needed indoor.
Junaio also has a image tracker functionality that is incredible: you can process an image and using it as a placeholder to anchor to it content (video, audio, 3D) this goes well beyond simple GPS and opens up to many more use cases.
Unfortunately the amount of images usable is restricted to 7 (more if you are part of the certified developer program) mainly because (I believe) the tracking stuff can be a bit taxying on the device.
I believe that with the smart phone and tablet market rise these sort of applications will be the most used.

I think that both are good options: I think I'll use Layar for outdoor and Junaio for indoor.

Junaio Tutorial - description

I'm working on Augmented Reality in these days and I'm trying a new channel using Junaio.

The goal is to create a couple of channels to help people inside my company to understand AR potential and demo it within the company walls.

Since Junaio has two way of working I used the second option:
  1. using GPS points and locations
  2. using image detection

I made few explorations and I think that a good way is to create the channel without the online tool: at least for the first time I prefer to control everithing, there are really good examples in the tutorials in Junaio site so ...

Goal: creating some "painting" to distribute around the company with content tied on: some 3D, a video, a changing image graph, audio.
My choice was to create a GLUE Channel, setting it to refresh 30 seconds (but it doesn't still work the way I like) and than linking to it some color images to create the "paintings" that will become the anchor for content.
In following post I'll describe how I've done.