Vote for my session proposal at Oracle OpenWorld


oow.pngIf you still have not voted for my session proposal “Using Ruby on Rails with Oracle E-Business Suite” then please do so :) Voting deadline is near - July 13th.

In any case I am going to be at Oracle OpenWorld conference in San Francisco in September. So if some of my blog readers will also be there and would like to have some chat with me about Oracle and Ruby then please let me know.

The Linux Tools and Languages Team at Oracle: An Introduction

After a few months at Oracle, it's time to talk a bit about what our team has been working on.

Kris Van Hees has started an open source (licensed under the GPL) automated and loosely distributed build-and-test reporting tool, called Labrat. It collects and displays test results for various projects. Right now Labrat is used for daily testing of Systemtap and Frysk. Alongside with running the testsuite for the projects and collecting the results, the build logs and the test logs, it also collects coverage information from each of the test runs. The project will be hosted here: OSS.oracle.com. At the moment it is temporarily fully accessible here: Automated Build-and-Test Tool Page.


Another area we are working on is Scripting Languages, mostly with PHP and Ruby. Christopher Jones and Alison Holloway are in the team, and their work is highlighted in their blogs:
Chris's Blog
Alison's Blog
Chris has put together the PHP RPMs for OEL, they are downloadable from Oracle's PHP project site.

Another project we are contributing to is Systemtap. I used to manage the project from the Red Hat side, and it has been refreshing to get to work again with the old crew, made of folks from IBM, Hitachi, Red Hat, Intel, and now Oracle. Oracle is starting by contributing to various scripts/tapsets, and fixing a few bugs, Wenji is the engineer working on this. In addition, Kris has been working with IBM to integrate the IBM test results for Systemap in the Labrat framework. Various new features for Labrat will fallout from this work.

And last but not least is Frsyk.I used to also manage this project when I was at Red Hat. The developers group for Frysk is still formed mostly of Red Hat people. IBM is contributing the PPC porting work, and they have recently incorporated upstream the brand new PPC port of libunwind. I have two engineers working on the project, Kris and Pearly. Kris has been looking at the testing of Frysk, and while working on that task, Labrat (see above) was created. Labrat mails daily test reports to the frysk-testresults mailing list. Beyond that, Kris has so far been looking at Frysk testsuite failures and hangs, and low level implementation cleanups. Pearly has been looking at the Frysk GUI, while getting more familiar with the code base, and has been fixing the memory and the disassembly windows.

I'll post more details on each project later.

OLS 2007 Conference Impressions

This is a bit late, as OLS took place at the end of June, but I think it may be useful for people interested in knowing what's happening around debugging and low level OS kernel interaction. 

The reprints can be found here

Many meetings, Many presentations.

Kris and I met with the systemtap people. IBM, Hitachi, Intel and RedHat.  Had all hands meeting, to discuss roadmaps, and the like. Had also group dinner, as tradition.

For Systemtap we also had a meeting with IBM to discuss testing, and how to add the IBM test results for Systemtap for s390 and ppc to the Labrat system.  Main outcome of that is that for now Kris will receive tarballs of the current test runs, and will parse them into the labrat webpage. Eventually we hope to solve the possible crash-the-system problems, by using Xen for Labrat. At that point we can run all the tests (make install-check) instead of just the "smoke" tests (makecheck).Will Cohen of Red Hat is also working on more testing, specifically adding test coverage information for the tapsets themselves (as opposed to coverage for the translator/systemtap itself).

Systemtap BOF

Vara Prasad of IBM, presented. General status of Systemtap, and discussions with audience. Main problem remain around the debugging information.  Problems are twofolds and almost orthogonal:
  • size of the debuginfo. Files are big, we really only read part of   the info in anyway. Is there a way to shrink the size or a way to   split in smaller chunks, that are related to all that a tapset   needs.  (I personally would not split things up too much, because   then one needs to carry around the whole thing anyway for debugger   usage).
  • availability of the debuginfo. Customers using stap right now are   running into this issue. Where is the kernel debuginfo, where to   get it, it's cumbersome. Should there be a debuginfo server from   which to get it. Problem with become much worse with the userspace   probing. You need debugging info for all sorts of apps. 
  • Most apps that big enterprise customers might be using are closed   source, and there is no debugging info around. for Instance Oracle   is one of these apps). Is there any way to provide debug info?

Utrace/Uprobes talk

Jim Keniston of IBM. Very good overview talk (slides already sent to list).  Nothing new here for me, but it was good to see most of the ptrace related stuff all in one place. There isn't such an overview around.

7 Dwarves talk: Arnaldo Carvalho de Melo

This was a bit misguided. The abstract was giving the impression that the talk was going to be about how to reingeneer Dwarf2 to make it better and smaller, but that wasn't the topic. Arnaldo wrote a bunch of utilities to gather information about the layout of structures and to rearrange the structures so that they are packed better with less space wasted. He has the utilities available for download onkernel.org:The set of tools is called Pahole.

Kernel development overview: Greg Kroah-Hartman

I got there a bit late. This talk was a summary of who is doing what in the kernel community. Quite interesting, Greg charted all the patches that went into the 2.6.22 kernel into a giant graph, with an arch going from the patch author to each of the persons that signed off on the patch. Pretty big graph. He had that printed out and it was hung from the wall of the confroom, so people coud sign their name next to their node.
Anyway, he also ranked the top contributors by number of patches: Oracle is at 20th place with 365 patches for the current release. Top contributors are "unknown developers" (i.e: not clear who they work for), Red Hat # 2, Novell #3. Google, excluding Andrew Morton, hasonly 48 patches.  Red Hat is the top $$ funding company (better said as employer) and the "consultants" group is at about 15th or so. Bottom tier are companies that we all know are modifying/using/selling Linux but are not contributing back.

Linux on Cell: Arnd Bergmann

This was a fun talk. It seems that the cell processor is improving, but it's still a huge beast, with many moving parts. To compile for it with gcc, you have to generate 2 types of .o files for the 2 types of cores and then the linker will put them together, for instance. Applications are limited to supercomputing and of course the gaming area with the PS3. This was interesting to me because of my previous work with gdb in embedded space.

Frysk: Andrew Cagney

This talk concentrated on the testing of Frysk. I.e. how frysk has been able to find kernel bugs (or better how kernel bugs manifest in debugging applications). Of course frysk pushes the boundaries set by gdb a bit harder, and the ptrace/utrace infrastructure runs into its own limitations. The Frysk tests include a set of kernel tests.
Talk was a bit disappointing because it concentrated on the Frysk command line and the GUI demo consistently didn't work.
Kris's Labrat system got mentioned in the "more info" slide at the end.

Asynch System Calls: Zach Brown

This was good and jaw dropping. In the sense that the new Syslets stuff is going to impact utrace/ptrace quite a lot. We need to synch up with Roland and talk. Read the paper.

DJProbes: Masami Hiramatsu and Satoshi Oshima of Hitachi

Description of DJprobes. DJprobes are now used to improve kprobes performance by 50% in certain cases on x86. Detailed description of the limitations of the mechanism in various cases was discussed.  It seems to me that the limitations and the workarounds are getting a bit Byzantine, and that with all the workarounds implemented, the worst case scenarios cannot possibly be any faster than just using kprobes. One limitation is due to the instructions replaced by Jump being the target of other jumps, and how the boundaries of the instructions can be misaligned. Another limitation is due to concurrent execution of the same area by multiple threads. Some more problems occurred with self-modifying instructions. I kind of lost track of things after awhile, because the talk was a bit too detailed.

LSB BOF: Mats Winchmann

Just attended this one to catch up on what LSB was doing, having worked with them at previous employer. Not many big news, LSB 3.2 will contain some bugfixes and more tests.
  • Missing interfaces will be added (about 45 of them)
  • freetype, pft, xrender
  • application testkit manager
  • printing support
LSB 4.0 is still way out in the future, and include some but not necessarily all of the following items:
  • runtime languages
  • LSB for mobile devices (smaller footprint LSB version)
  • library uplift (new versions of glibc, opengl, etc)
  • cairo, dbus
  • audio
  • much increased test coverage (contracted out, so this will actually make it)
They have revamped the website and now it includes a database of all the interfaces and it's easily queryable. LSB is now and ISO standard, freely available for download.

Perfmon2 BOF: Stephane Eranian of HP

Ah this was interesting. It ended up lasting 2 hours, and we got kicked out of the room because they wanted to shut the place down for the night. Stephane is writing this unified framework for accessing performance monitors in the kernel for a variety of processors.  HP, Intel, IBM, AMD are contributing their architecture dependent part. This Perfmon2 effort started in 2005 from and impromptu OLS bof, where it was decided that less fragmentation was needed, because there were 2 such mechanisms already and none of them was covering all the needs (perfmon and perfcounter). So 2 years later what has happened?  The interface looks nice, and it's getting polished. Stephane hopes to have it for inclusion in the 2.6.24 kernel. He discussed also some of the problems he is facing, (now I don't remember all of them) one of which is getting access to the real counters from a virtualized environment. So he is facing real challenges. Unfortunately he is the main/only person working on this. He is going to set up a git repo onkernel.org, though and that hopefully will speed up the testing and encourage more participation (as opposed to publishing a patch once in a while). However there is still no sign of an in-kernel API. There is one for Userspace use. Justification is that there are no"customers" ready yet for an in kernel API. This may be bit debatable, since Mathieu (LTTng) is crying for one, and so are others. Maybe the first client of such interface could be the NMI watchdog on i386.

Branch tracing and test framework: Niro Yoshioka

This guy is from Miracle Linux, and the stuff he works on is on sourceforge:Quite interesting. Maybe useful to look at it for our Labrat.

Another tracing BOF: Alan Stern and Jim Keniston

This was supposed to be a talk by Prasanna of IBM, but he wasn't able to come to Ottawa, so Alan Stern talked about the Hardware Breakpoint support he is working on. Basically another interface will be in place in the kernel to deal with all the architecture dependencies details of the hardware assisted breakpoints and watchpoints. Number of registers varies per processor, per architecture. Triggering also varies, and position of the IP varies also after the trap is taken from procesor to processr (ie sometimes it points after the trap instruction, sometimes it points at the trap instruction). But the same event will be presented to the user (gdb/frysk, etc) and all the details will be transparent and hidden within ptrace/utrace. Alan is actually working with Roland on this, to integrate it as part of utrace. Jim Keniston did the rest of the BOF, talking some more about utraceand uprobes. Nothing new there.

Oracle Open World 2007 and Systemtap talk

Let's talk a bit about Oracle Open World. This took place November 11 through November 15 2007, in San Francisco. It is a giant expo, taking place in all the buildings of the Moscone Center with overspill in adjacent areas and hotels. I was staffing the Unbreakable Linux and the Oracle VM booths. It was incredibly busy, every day. The announcements about OVM and the demos of the OVM with live migration given in the various keynotes contributed noticeably to increase booth traffic as well. You can see the daily news from the conference here

I also gave an introductory talk about Systemtap within the developer track. There was very good turnout, and lots of questions. I have posted the slides in PDF format here.

Tracing Workshop in Montreal

January 29 2008

I am currently at a two day tracing workshop in Montreal Canada. It is
mainly an industry workshop hosted by Ericsson. There are a few Open
Source folks, like Mathieu, Andrew, Nathan and me. Too bad Frank
couldn't make it.  I decided to drive from Boston, it seemed like a
good idea at the time, but now I am not so sure anymore, it was a
fairly long drive. Fortunately the rental car has a 6 CDs changer.
There was an opening reception Monday evening, with nice French and
Canadian food. I tried the caribou steak, not bad at all.

The presentations so far have been of good quality, even though some
were a bit too detail oriented. There are representatives from IBM,
Red Hat, University of Montreal and Ecole Polytechnique, Canadian
DoD, Freescale, Oracle, MontaVista, WindRiver and others.  There is
a wiki for the workshop which includes the slides. The wiki will be
publicly accessible in a week or so. I'll post the link then.

The first day talks provided an overview of the current tracing
platforms including the challenges that they face. Systemtap, Frysk,
Eclipse/TPTP, QNX. There was a presentation about old IBM projects,
and the experience gathered about tracing as part of them.  I gave a
short presentation about the use of Systemtap within Oracle, and the
problems that deploying the tool in a commercial/enterprise
environment entails. I don't think these problems are specific to
Oracle, on the contrary they are a good representative set of what
Systemtap needs to address as a project in order to step up to the
next level, and move beyond the hacker community. Let's hope we can
figure out what to do about them, as they are general challenges that
would impact gdb and frysk too. I also talked a bit about some other
usage of systemtap that we tried in my team, specifically to generate
kernel modules to force the kernel into a resource starvation
state. These scripts were based on some previous work that Bryce did,
and the source code for those fragments is available here.  Here are
my slides.  Mathieu presented about LTTng and tracing at
Google. Interesting talk, especially now that the markers
infrastructure has been released in the 2.6.24 kernel. Speaking of
which, there is still a lot to do there, because now there will need
to be negotiations about where to insert the actual markers in the
various kernel subsystems. Once those are in, we need to write the
systemtap scripts that use them.

The evening had a couple of BOFs, one about Eclipse and modeling, and
the other about tracing events. I attended the latter. Discussion was
a bit all over the place, but there was some interesting brainstorming
about tracing and time counters in virtualized environments. The notes
should be up in the wiki soon.

In the evening I met again with a bunch of folks from the workshop,
and a colleague, Martin, kernel person from Oracle who lives in Montreal.


January 30 2008

On the second day, somebody from Enea presented a tracing framework
that is based on evenpoints and actions which is very similar in
spirit to Systemtap.

The next talk was from ZealCore. They talked about replay debugging,
and tracing. They do flight recorder type tracing, with very small
overhead.

Next was Eclipse PTP. Nice CDT extensions for parallel programming,
supporting all sort of interactive static analysis for OpenMP and MPI.
This effort was mentioned, called "Scalable Tools Communication
Infrastructure" at http://www.scalabletools.org. Interesting, worth
keeping an eye on them.  The PTP project uses SDM: Scalable Debug
Manager that is based on gdb. There are multiple instances of gdb one
for each process and a manager program that controls the various gdbs.
Also these projects were mentioned. TAU (from University of Oregon)
and PAPI.

Windriver presented about OS agnostic visualization tools, they used
LTTng, and plugged their graphical interface and visualizer on top of
it.

Unfortunately at this point I had to leave, and I skipped the last
presentation, also from WindRiver, where a tool was presented that had
similar functionality to Systemtap.

UTF-16 and UTF-32 support in GCC added

Our team has made the first contribution to GCC last week.  This is
quite exciting news for us, and hopefully it will be the first of many
contributions to come.  Kris Van Hees has implemented UTF-16 and
UTF-32 char data types support for the C and C++ languages in gcc.

His work is based on the ISO/IEC draft technical report for C (ISO/IEC
JTC1 SC22 WG14 N1040) and the proposal for C++ (ISO/IEC JTC1 SC22 WG21N2249)  here
Neither proposal defines a specific encoding for UTF-16. This
implementation uses the target endianness to determine whether
UTF-16BE or UTF-16LE will be used.

Support was added for the following wide character datatypes (internal
for C, Fundamental types for C++) with the given underlying data
types:

    * char16_t: short unsigned int
    * char32_t: unsigned int

Support was added to the tokenizer to accept the following new
character and string literal notations:

    * u'c-char-sequence' char16_t character literal (UTF-16)
    * U'c-char-sequence' char32_t character literal (UTF-32)
    * u"s-char-sequence" array of char16_t (UTF-16)
    * U"s-char-sequence" array of char32_t (UTF-32)

Support was also added to the C parser and the C++ parser to handle the
following concatenations of string literals:

    * "a" u"a" -> u"ab"
    * u"a" "b" -> u"ab"
    * u"a" u"b" -> u"ab"
    * "a" U"b" -> U"ab"
    * U"a" "b" -> U"ab"
    * U"a" U"b" -> U"ab"

This behaviour is only available in the gnu99, c++0x, and gnu++0x
compiler modes.

See the initial patch submitted upstream:
http://gcc.gnu.org/ml/gcc/2007-11/msg00021.html
And the revisions:
    * http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00827.html
    * http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01474.html
    * http://gcc.gnu.org/ml/gcc-patches/2008-03/msg02025.html
    * http://gcc.gnu.org/ml/gcc-patches/2008-04/msg01235.html

The patch was commited to the GCC trunk on Apr 18th, 2008.
Thanks to Jason Merrill, Joseph Myers, Andrew Pinski and Tom Tromey for the reviews.

Tracing Workshop Wiki is Public

The Montreal Tracing Workshop wiki is now publicly accessible.
This is the link:
https://ltt.polymtl.ca/tracingwiki/index.php/TracingSummit2008



Oracle VM Information

One other member of our team, Alison Holloway, has been writing interesting blog entries about Oracle VM. They have useful instructions about how to install OVM, and more to come in the near future. Do take a look at Alison's Blog.
 

OpenID - the missing spice in Enterprise 2.0?

Paul | Jul 8, 2008 00:00 -0600
I have been playing around with OpenID recently and considering its significance. OpenID offers a "single digital identity .. you can login to all your favourite websites", and its adoption is rapidly accelerating especially since services like Yahoo and Blogger have added OpenID support to the many millions of existing user accounts.

Maybe I'm missing something here, but I am surprised by the lack of attention OpenID is getting in the enterprise context.

And when it is considered, it is often as an either/or proposition. As Nishant Kaushik writes in his excellent identity blog:
.. simple web applications with minimal needs could get away with simply supporting OpenID. But that should not be confused with not requiring a full-fledged identity services infrastructure where appropriate.
I think this is somewhat misdirected; certainly not the whole story. OpenID-enabling existing applications for an external audience is already a trivial exercise. It's a simple API, and plugins or toolkits are available for most programming environments. I think the much bigger deal is looking at OpenID from the opposite perspective - using enterprise security infrastructure to support OpenID authentication.

In my view, OpenID is key to unlocking the true potential of "Enterprise 2.0", which is what I wanted to discuss here to try and explain my thoughts and get some feedback.

It may also lead us to think more clearly about what Enterprise 2.0 really is. This is the current definition up on wikipedia:
Enterprise social software, also known as Enterprise 2.0, is a term describing social software used in "enterprise" (business) contexts..
The "social" nature of Web 2.0 tends to get the headlines, and hence by simple transference must be to basis of Enterprise 2.0. Right?

However, I'm not convinced that adopting social networking features of Web 2.0 will be the main path to success. In the short term at least. For a start, it implies and requires phenomenal change in the social and organisational fabric of a company to get off the ground, and there is no guarantee the benefits will be worth the pain of change. In many organisations it may just be too much, too soon, and fail to launch.

Much as I love them, I don't even think "mashups" will be the killer app for Enterprise 2.0.

I think the key is a much more mundane aspect of Web 2.0 that gets lost in the facebook frenzy: the simple fact that users are being provided with an ever increasing range of web applications (or Rich Internet Applications aka RIA). We see unprecedented utility in the applications on offer, on par with what we expect from desktop or dedicated applications. There is great choice, with more launching by the day. And there is an incredibly low barrier to participation - you can sign-up within a minute and with usually no immediate associated cost.

So my main proposition is that the quick win for Enterprise 2.0 is for companies to figure out how to systematically exploit the burgeoning Web Application offerings. The real and immediate benefits include reduced IT spend, better utility and happier users .. and set the stage for moving to the world of "Advanced Enterprise 2.0" with mashups and social networking for example. The caveat of course is that the enterprise must ensure that matters of availability, data protection, confidentiality and privacy are not compromised in making such a move.

But this presents a dilemma for the enterprise. A tough choice between undesirable outcomes: (a) ban and fore-go the benefits of adopting external Web Applications for enterprise use; (b) allow their use but lose control of the data, identities and secondary use derived from using such applications; or (c), be faced with re-implementing said cool features within the firewall (but risk becoming disconnected from the external audience).


This leads us to the present state of the art in Enterprise 2.0, which must work around the constraints of the corporate boundary.

  • External Web Applications may be used where they address a largely external audience (a good example is the Oracle Wiki which runs on wetpaint). But here they remain disconnected from internal systems.

  • For internal adoption of Web 2.0 technology, IT departments are faced with re-implementing within the firewall, whatever is cool without.

    The CEO wants a blog? Customer support want to setup a wiki? Sure, we can install it. Where install means friggin' around for a few months to select and acquire the software, integrate it with the standard enterprise security/monitoring/hosting/blah environment, customise it to the corporate branding etc etc.
Toto, I've a feeling we're not in Kansas any more.. suddenly Enterprise 2.0 doesn't seem so exciting.

And I think it denies the dirty little secret that I bet exists in most organisation: your employees are already using these services for business purposes!

Using a personal credential for an external service (whether OpenID or not) presents a whole range of challenges:

  • It is a provisioning nightmare. What happens when the employee leaves? The company doesn't control the account, so it can't be disabled. Whether you can remove access from any corporate data held in the external service depends totally on the application itself and how it was setup.

  • For the individual, there is a concern about keeping their professional and private lives appropriately separated. Too easy for your tweets to end up in the wrong hands in the wrong context.

So what's a girl to do? I'd suggest the answer is pretty obvious - we need corporate identities that can extend beyond the boundaries of the the organisation in a safe and controlled manner. This was the intention with SAML, but adoption has been slow - I suspect by the complexity of its WS-Deathstar burden - and now OpenID streets ahead in terms of acceptance (in an interesting parallel to the adoption of Web Service-based SOA and REST).

So imagine for a moment the ideal world. I would have a corporate identity that works transparently within the enterprise and also for useful external services. And I could keep this quite separate from my personal identity (even though I may use some of the same external services).


The question now is whether we are far from being able to achieve this? I think not...

The call to Enterprise Identity Management Stack providers..

That means Microsoft, Oracle, IBM, Sun and so on.. the companies that produce the security software that is managing your enterprise identity every time you sign in to an enterprise application.

Many of these guys are members of the OpenID Foundation, but on the whole it is hard to find clear statements of direction at the moment, and the initial focus has been around demonstrations of how they can use credentials from other OpenID providers.

We need to see two things in particular:
  • OpenID provider support in their core identity management stacks, so that enterprise credentials can be used as OpenID credentials under the control of the company (e.g. they can be disabled when the employee leaves). Call that part of a "Service Oriented Security" strategy if you like, just make the option available;-)

  • Include that ability to blacklist/whitelist sites that the credentials can be used for.

    There will always be good reasons why certain Web Applications may be off limits for corporate use. For example, a law firm may not be able to use Google Documents because of jurisdictional concerns.


Dion Hinchcliffe presented the case well in the recent article "openid: The once and future enterprise Single Sign-On?", along with a great visualisation:


The call to Web Application providers..

Firstly, the big guys like Yahoo! need to support third party OpenID credentials. This seemed to be the main thrust of Hinchcliffe's article. I hope this is just a matter of maturity and not business model pig-headedness, but to offer OpenID sign-in only if your OpenID provider is the same company is not really in the right spirit of things!

More generally applicable however is a major consideration for any Web Application provider that wants to target the enterprise market: addressing the security issue with OpenID support only opens the door. To step through, you must be ready to meet the specific demands of an enterprise customer.

First of these must be data ownership. I didn't want to focus on it in this post because I think it is an orthogonal concern to security. But if you want enterprise customers, be prepared to to consider requirements such as:
  • Access to all data owned by the company's users on the service. For backup, export, and analytics.

  • Audit and compliance

  • Service levels

The call to Enterprise Software vendors..

The idea of a "Web 2.0 appliance" is I think very attractive to many organisations: an easy on-ramp to the space without the need to build up a whole range of specialist skills within the company. In this category I would include Oracle WebCenter and the new IBM Mashup Center. OpenID support in these products is of course a no-brainer in order for them to have appeal in cases where you wish to mix internal and external user audiences.

Given the state of consolidation in the industry however, OpenID presents a dilemma for many vendors who are faced with the prospect of OpenID support in their Identity Management stack cannibalizing sales of their application suites as users start to exploit external Web Applications.

But to be recalcitrant and stand against the move to OpenID will only accelerate the onset of a winner-takes-all showdown in the enterprise applications market.

Personally, I believe the showdown is inevitable: with the combined pressures of RIAs, cloud computing, oligopolistic pricing and increasingly sophisticated open source alternatives, I think it is quite likely we will see the enterprise software market go supernova within the next 5 years i.e. blow itself to pieces after a few more years of consolidation ... but that's a topic for another post perhaps;-)


The enteprise software vendors that survive will be the ones who truly embrace being open, and that includes OpenID.

Conclusions?

Well, I wonder if I've convinced anyone? To me it seems that the ability for enterprises to add OpenID provider support to their security infrastructure will be the key to unlocking the full potential of Enterprise 2.0. Until such a facility is available from the mainstream Identity Management vendors, we will just be messing around on the fringe.

Ruby-OCI8 1.0.2 gem is available

Liming Lian | Jul 3, 2008 01:50 -0600
As Kubo announced in Ruby mailing list, with the release of version 1.0.2, the gem of Ruby-OCI8 is available.  Now you can easily install ruby-oci8 by simple commd "gem install ruby-oci8".

Though the installation of Ruby-OCI8 has been eased a lot with gem, you still have to pay attention to:

1) The same as installation from source code,  Oracle client is still required to be installed before the gem installation. Check help page "Oracle Full Client" and "Oracle Instant Client" on ruby-oci8 website for details, please be specially careful to the setting of environment variable "LD_LIBRARY_PATH".

2) If you don't tell the ruby to load RubyGems every time it starts up by setting the environment variable "RUBYOPT" to "rubygems", you should add "require 'rubygems'" before "require 'oci8'", or you will get error "no such file to load -- oci8".

Now the Ruby-OCI8 gem is only available for version 1.0.2,  no support for 2.0 yet.

A New Blog Server

If you've received all my blogs again in your blog reader, apologies, but we've just gone through a migration of our underlying blog server. I think all my blog entries are now hunky-dory, so no further interruption to the scheduled programming should occur. You shouldn't need to do anything at your end, but if you do, please leave me a comment so I can let others know.

As we've now completed the blog server migration, I can get back to writing my Oracle VM blogs, so stay tuned.

Alison

Working with PHP and Oracle Presentation

I've just got back from delivering my Working with PHP and Oracle presentation at the Melbourne Opensource Developers' Conference. I don't think the organisers are going to post the presentations, so I wanted to make it available here. This talk covers:

  • Free Oracle tools
  • OCI8 extension
  • Connection management (including the new connection pooling feature)
  • Improving performance
  • XML
  • Oracle resources
Enjoy.

Removing Oracle Database XE from Linux

I haven't blogged for a while as I've been holidaying in Thailand, but I thought it's time to get back into nerding instead of laying on beaches. (Did I just say that?!)

So, first thing I try to do is deinstall one of my Oracle Database XE installs, but I'd done a few things to the file system that made it impossible to remove using the standard deinstall procedure. After searching through the Oracle XE doc, I found this little gem to manually remove XE. I wanted to share it as I've had to do this a couple of times now. The first time I didn't know this trick and had to reinstall the o/s, just before a demo at a conference. It was a tiny bit stressful.

First off, check to see what Oracle RPMs are installed, and try removing them.

rpm -qa | grep oracle

rpm -e oracle-xe-univ

If you get an error here, move on to the next steps to manually remove XE. Remove the XE directories.

rm -Rf /usr/lib/oracle/xe
rm -Rf /etc/oratab
rm -Rf /etc/init.d/oracle-xe
rm -Rf /etc/sysconfig/oracle-xe

Hey presto! Your system no longer has any XE files and you can start again. Like I'm doing right now.

A new version of the Underground PHP and Oracle Manual coming soon

I know this is nothing to do with PHP or Oracle, but something that's been bugging me for a while and I've just found the answer to it.

I'm working on the 1.3 version of the Underground PHP and Oracle Manual that Chris Jones and myself have been writing over the last year. I'm writing it in MS Word. I used to be a technical writer many years ago and I'm used to working with long, complex documents, using the appropriate tools. This time I'm using MS Word. It is just awful for this type of job.

One thing that was driving me mad is that I couldn't figure out how to remove paragraph or character styles. Most of the time I could just change them to another style, but sometimes they wouldn't budge. After some research, I found out that to totally remove a paragraph style, change it to Normal, then to the new style you need. Who'd'a thunk?

A similarly strange method is required for character styles. You need to select it and then hit Ctr + Spacebar. That removes it and you can apply another one.

This has been a thorn in my side for the last two releases of this book. Hopefully I can spend some time reformatting it so each chapter looks a little more consistent now I've worked out how to do it.

Moral of the story ... don't use Word for anything other than a fax!

Now if anyone can tell me how to get the bookmarks and links working from a Word master document to Acrobat, I'll send you a special present.

If you hadn't worked it out from this blog, I'm working on version 1.3 of The Underground PHP and Oracle Manual. So in a long and roundabout way what I'm really saying is stay tuned for more news on the upcoming release of the new and improved version of this book.

Article in International PHP Magazine

Richard Rendell, my manager, and leader of all things PHP at Oracle, has an article in this month's International PHP Magazine. Here's a reprint of the original article.

It has info on connection options with Oracle databases, and the new connection pooling feature. Nice work Richard.

Underground PHP and Oracle Manual 1.4 Available

After a few weeks of furious writing, Chris Jones and I have released the latest version of The Underground PHP and Oracle Manual. This is version 1.4, and includes updates on:

  • PHP PDO_OCI extension
  • Testing the OCI8 extension
  • Tracing OCI8 internals
  • Comaprison of old and new OCI8 function names
  • and lots more to keep you busy
So go get it now. Did I mention it's free?

PHP 5.2.2 Setup on Windows

I've just been setting up PHP 5.2.2 on Windows XP Pro, with Apache 2.0.59. I couldn't get Apache to find the correct php.ini file. It was looking in C:\Windows, instead of where I installed PHP. The httpd.conf file told Apache to look in C:\Program Files\PHP, but it wasn't. So none of the extensions were loading.

I figured out that changing the back slashes to forward slashes fixes the problem. I wanted to blog about this as The Underground PHP and Oracle Manual that we've just released doesn't mention this problem, and you may encounter it yourselves. So if you do, you know the fix. And yes, I've logged a bug with PHP for this. :-)

Zend Core for Oracle 2.0 Released

Zend have just released a new version of Zend Core for Oracle. This is a prebuilt and tested stack of Apache, PHP and Oracle Instant Client. If you haven't used it before, you will like the easy setup. I promise.

Try this with an existing Oracle database install, or download and install Oracle Database XE, our free database.

Zend Core for Oracle is also supported with Oracle Enterprise Linux.

Zend Core for Oracle release 2.0 includes PHP 5.2.1, the refactored OCI8 driver, Oracle Instant Client, and an optional Apache HTTP Server 2.2.2.

Zend Core for Oracle is supported by Zend on the following operating systems: 

* Oracle Enterprise Linux 
* X86 running SLES9 or RHEL3 or RHEL4 
* X86 running Windows XP/2003/Vista 
* X86-64 running Windows Vista in 32bit mode 
* X86-64 running SLES9 or RHEL3 or RHEL4 
* pSeries running AIX 5.2 or 5.3 
* Sun Solaris Sparc 8, 9 10

The web servers that are supported are: 

* Apache 1.3.x (except on Windows Vista), Apache 2.x 
* Oracle HTTP Server 10.1.2.0.0 (on Linux and Windows x86) 
* Microsoft IIS 5, 6, 7

Zend Core for Oracle is supported (by Zend) against Oracle Database 10g and 9i. That means that you can have a fully supported stack of database, web server and PHP.

If you aren't sure how to use it, or want more information on install, configuration, and use, go and have a read of the Underground PHP and Oracle Manual. Yet another handy resource for all things PHP and Oracle. And another shameless plug from me.

Don't forget there are lots of articles, FAQs, downloads and links at the OTN PHP Developer Center.

phpinfo() Not Displayed Correctly

Since I've started blogging about little idiosyncracies I've been experiencing in PHP, I've been getting feedback that you want more. Okay. I'll start adding little tid-bits that might help out someone out there. So here's one I found (again) today.

While testing the bug fix I mentioned in an blog entry last week, I found that trying to load the phpinfo() script caused my browser to try loading the file as an application. That is, it tried to download the file, rather than execute the script. This happened in Firefox and IE. For those not familiar with phpinfo(), it's a function that displays the setup of PHP, including loaded extensions, environment variables, PHP variables, and so on. Here's what you would use:

phpinfo.php

<?php
phpinfo();
?>
I'm getting side-tracked. You'll likely all know how to use this function, but that was for newbies.

So, if you try to load this script using localhost in the URL, your browser will not know how to deal with it, nor will PHP, so it strangely asks you what to do with it. This doesn't happen to my other PHP scripts. So, don't use:

http://localhost/phpinfo.php

Use

http://127.0.0.1/phpinfo.php

If this is far too simple a blog, let me know. I'll get back into the more unusual stuff.

PHP RPMs for Oracle

Good news everyone. We've just released a set of RPMs for PHP which include OCI8 and the Oracle PDO driver, as well as many other PHP extensions. These are for development testing only, as Oracle doesn't support them. The RPMs are based on PHP 5.2.3.

You can download the PHP RPMs from the oss.oracle.com site.

To install them:

  1. As root, run:

    rpm -ivh php-common-5.2.3-1.i386.rpm 
    php-cli-5.2.3-1.i386.rpm php-5.2.3-1.i386.rpm

  2. To verify the PHP RPMs have been installed, run rpm -qa |grep php. You should see:


    php-common-5.2.3-1
    php-5.2.3-1
    php-cli-5.2.3-1

The php-oci8 package depends on Oracle's free Instant Client Basic package and on PHP's php-pdo package. To install the Oracle components:
  1. Download oracle-instantclient-basic-10.2.0.3-1.i386.rpm and install it with:


    rpm -ivh oracle-instantclient-basic-10.2.0.3-1.i386.rpm
  2. Install PHP's PDO extension with:


    rpm -ivh php-pdo-5.2.3-1.i386.rpm

  3. Install PHP's Oracle OCI8 and PDO_OCI extensions with:


    rpm -ivh php-oci8-5.2.3-1.i386.rpm 

You're done.

Alison