<quote who='[EMAIL PROTECTED]' date='Friday 24 October 2008'> > Would you be willing to share the details?
Sure. Like many, I was looking for a means to get Perl/Php to connect to Unidata. After someone pointed me to the API documentation (Admin Supplement for Client APIs), I did some reading on the various APIs available. I chose to use Intercall as I had more experience with C/C++ than I did with Java. While I am comfortable in C/C++, I also knew that I did NOT want to place a lot of code that needed to be maintained in C/C++. I already have gobs of code in Unibasic that I want to leverage, and I also had plenty of code in Perl - I didn't want to have yet a third layer between them that also needed to be maintained as I added projects, etc. Hence, the C program was written once and I *never* touch it after it was debugged. To add functionality, I add to Unibasic code and Perl - that's it. In a nutshell, I wrote a small C program which leverages Intercall to make connections to the database. This is a lightweight program which requires little to no maintenance. In short, the C program is merely the connection between Perl and Unidata, passing commands from Perl to a single subroutine on the Unidata side. That subroutine, in turn, does all the work and then returns the data back to Perl. This isn't perfect. I don't deal with connection pooling so all requests from web forms make separate, direct connections to the database. With 1700+ end users (students, faculty, staff) I've never run into a license issue, but it's surely possible. Also, if I had more time and experience, I could've used perlxs to compile the Intercall code more tightly with Perl - but I don't. So currently the C program is stand alone which suffers from slight performance issues because each request from Perl is independently firing off the program, which requires some overhead. Again, with my usage here this hasn't proved to be a problem, but could be in larger implementations. But what I got in the end is exactly what I wanted: A realtime interface with Unidata that returns (possibly) multivalued data as that - no unnesting or flattening to ODBC-ify the data. If I'm using a MV database then I want raw MV data in my applications. I do all my web development with Perl. But I have shared this with another college who got it working under Php and even with my limited php skills, you can use the same mechanism as I'm using in Perl. For more info, Server: http://adsys.hampshire.edu Username: adsys_guest Password: foobar In the upper left corner perform a search under 'Documentation' for 'Intercall'. By the way, the site above is entirely driven using perl and my C program. -- Jeff Butera, Ph.D. Administrative Systems Hampshire College [EMAIL PROTECTED] 413-559-5556 "Where I'm from, we believe all sorts of things that aren't true. We call it "history." The Wizard, Wicked ------- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/