Andrew Beresford's Blog

Archive for June, 2010

Proof of Concept – accessing filestore from an iPad and other devices

without comments

ipad-image.jpgWe had an Apple iPad in the office the other day. I'm not great fan of Apple's mobile devices myself, but the hardware itself is quite elegant, even if I can't work out why I would want one. Anyway, we had a conversation about to how we could access some of the University's resources. One of the things we'd like to be able to do is access our University filestore (home and shared folders) from these types of devices, regardless of whether you are on or off-campus.

 

Someone recommended the "GoodReader" client for accessing files on the iPad so we downloaded a copy and tried it out. GoodReader supports a few different ways of accessing servers, including WebDAV. WebDAV is an extension to the well known HTTP protocol which allows access to upload and download files. Unfortunately our Novell filestores don't support WebDAV in a way which is supported by most devices (they use the "microsoft" way of doing things which no one else supports), so we can't talk directly to them. However, I discovered a piece of software called Davenport which allows us to translate between SMB (aka CIFS), which the filestores do support, and the WebDAV protocol.

 

Davenport took a little work to configure. There was a problem with the software that I managed to fix, relating to the way it handles file uploads. It requires the client to send a Content-Length header and not all do. Once that had been sorted, I managed to get it to work.

Enough blab... let me try it!

 

So, how to get it to work. Right now there are a number of caveats;

 

  • You can only access BAMFORD (I believe only CICS users are on BAMFORD, but I might be wrong!)
  • You can only access it on the University network or via VPN (this may be changed, it would be great if we can provide off-campus access to filestore for mobile devices).

 

I would also like to make it clear that this is a proof of concept I knocked together in very short time. It may delete all your files, crash your device, kill your dog or all of the above. It is not an official CICS service and it could disappear indefinitely at any time. Having said that, I'm happy to receive any feedback, so feel free to comment on this post.

 

The URL for the WebDAV service is https://webdave.shef.ac.uk/bamford/ (don't try other names... they won't work!). It uses your normal university username and password for authentication.

 

Also, if any Android users want to try it; there area a couple of Android WebDAV clients out there. I tried PadersyncDAV and it worked OK (although it's not a particularly pleasant piece of software).

Written by beezly

June 11th, 2010 at 1:57 pm

Installing the Perl DBD::Oracle on SPARC/Solaris 10

with 2 comments

Installing the Perl DBD::Oracle driver on Solaris is traditionally a complete ballache. I hate most things about Oracle software packaging and installation instructions, so I thought I’d get my own instructions going.

So here goes;

Compilers

Start by ensuring you have Solaris 10, patched up to date. First thing we need is a compiler, so take yourself off to http://developers.sun.com/sunstudio/ and get them installed. Once you have done that you should be able to run “versions” and get something like this;


[root@cisapplive /]# version
Machine hardware:   sun4u
OS version:         5.10
Processor type:     sparc
Hardware:           SUNW,SPARC-Enterprise

The following components are installed on your system:

Sun Studio 12 update 1
        Sun Studio 12 update 1 C Compiler
        Sun Studio 12 update 1 C++ Compiler
        Sun Studio 12 update 1 Tools.h++ 7.1
        Sun Studio 12 update 1 C++ Standard 64-bit Class Library
        Sun Studio 12 update 1 Garbage Collector
        Sun Studio 12 update 1 Fortran 95
        Sun Studio 12 update 1 Debugging Tools (including dbx)
        Sun Studio 12 update 1 IDE
        Sun Studio 12 update 1 Performance Analyzer (including collect, ...)
        Sun Studio 12 update 1 Performance Library
        Sun Studio 12 update 1 Scalapack
        Sun Studio 12 update 1 LockLint
        Sun Studio 12 update 1 Building Software (including dmake)
        Sun Studio 12 update 1 Documentation Set
        Sun Studio 12 update 1 /usr symbolic links and GNOME menu item

version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/cc": Sun C 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/CC": Sun C++ 5.10 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/f90": Sun Fortran 95 8.4 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dbx": Sun DBX Debugger 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/analyzer": Sun Analyzer 7.7 SunOS_sparc 2009/06/03
version of "/opt/sunstudio12.1/bin/../prod/bin/../../bin/dmake": Sun Distributed Make 7.9 SunOS_sparc 2009/06/03

Oracle Instant Client

Get the 32-bit SPARC Instant Client from http://www.oracle.com/technology/software/tech/oci/instantclient/index.html. Get the 32bit version even if you Solaris install is 64-bit (on SPARC, this doesn’t apply on x86-64). Your perl install is 32-bit (don’t believe me? Use file /usr/bin/perl to show you) and you need the 32 bit drivers.

You need the sqlplus, basic and sdk files from the Oracle site.

Extract the zip files into a directory. I put mine in /opt/instantclient. Then ensure your link loader knows where to find the libraries. You can use LD_LIBRARY_PATH although I generally don’t like that method and prefer to use crle instead.

crle -l /lib:/usr/lib:/opt/instantclient

Updating CPAN

The default install of CPAN on Solaris 10 has loads of out-dated modules. Fortunately, it is very easy to update them to current versions. You can start the CPAN shell by running (as root) perl -MCPAN -e shell.

The very first time you use CPAN it will ask you a lot of config questions. One thing I would strongly suggest doing is using gtar instead of the default Solaris tar. The default tar appears to have been written about the same time as Noah built the Ark and as such doesn’t support quite a few of the options modern tar files use (include the CPAN tar file which gets downloaded). Once you have finished answering the questions, you should be presented with a CPAN shell, where you can run;

install Bundle::CPAN

This will update CPAN and all the related modules. Answer “yes” to any questions it gives you and once it has completely finished use reload cpan to get it to refresh itself.

Installing DBD::Oracle

This is the last step. At the CPAN shell, use get DBD::Oracle to download the Oracle DBD interface and then make DBD::Oracle to build it. I do this as separate tests because it is very likely that the make test phase of the install will fail. Assuming that the compile is successful use force install DBD::Oracle to install the Oracle driver. The test-suite is very thorough and goes as far as checking for connectivity to a test database and the ability to perform operations on a test database (hence why I said it is likely to fail). Once the install phase is finished, you are done.

Written by beezly

June 4th, 2010 at 4:55 pm

Posted in Computing,work