RE: [U2] [UV] PHP/Perl
[ad] We have a product called U2Weblink(tm) that uses UOJ that has its own API that can be called from any Web language that supports JavaScript. We do connection resource allocation in our Java code to handle the calls to Unidata/Universe database. [/ad] Contact me off line for more information. (303-768-9601) Doug > From: [EMAIL PROTECTED]> To: u2-users@listserver.u2ug.org> Subject: Re: [U2] [UV] PHP/Perl> Date: Fri, 24 Oct 2008 14:44:46 -0400> > I'll also add that I know Chaman University (CA) has a java based socket > server that does implement connection pooling. If anyone wants a contact > there, let me know.> > -- > 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/ _ Stay organized with simple drag and drop from Windows Live Hotmail. http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_102008 --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] [UV] PHP/Perl
Thanks Jeff. Charles Shaffer Senior Analyst NTN-Bower Corporation --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] [UV] PHP/Perl
> From: Jeff Butera > I'll also add that I know Chaman University (CA) has a > java based socket server that does implement > connection pooling. If anyone wants a contact there, > let me know. And Ian Renfrew wrote "JScript for U2" which I think was ahead of its time. I don't believe it's maintained any longer but you can find some info here: http://www3.sympatico.ca/ian_renfrew/JS4U2/docframe.html This discussion prompted me to edit and post a blog entry I've been sitting on for a while: removeNebula-RnD.com/blog/tech/mv/2008/10/mvbindings1.html (please remove the text 'remove') Tony Gravagno Nebula Research and Development TG@ remove.pleaseNebula-RnD.com --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
RE: [U2] [UV] PHP/Perl
I was playing with a perl program that would use named pipes to talk to a phantom, which would do the read/writing/selecting etc and pass it back to the perl program again through a name pipe. There would be a perl subroutines that would send/receive command to the local perl listener, and convert the data into hased arrays and varibles depending on what was used. I stopped working with UV at the time, but now I'm back,so I'll most likely finish that up. Basically, the phantom program would track the files and records in use and lock if needed (and of course unlock after a set amount of time went by and not unlocked). It would have been kludgy, but it would have gotten the job done. I was creating it so a website could access data directly from UV via a .cgi George > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Rex Gozar > Sent: Friday, October 24, 2008 2:01 PM > To: u2-users@listserver.u2ug.org > Subject: Re: [U2] [UV] PHP/Perl > > > Jeff, Charles, > > I basically used the same strategy when I wrote u2pipe, which is a C > program that uses InterCall to connect with the U2 database. To add > functionality, I add a Unibasic subroutine and a method in > whatever web > language -- right now ColdFusion and PHP, and looking to add > ASP.NET soon. > > U2pipe relies on an external socket listener: xinetd for linux, inetd > for AIX, and wininetd for Windows. The socket listener does > not have to > be on the same machine as U2 as long as it's "reachable" via the > network. Using config files, multiple connections can be made (one > socket port mapped to one U2 connection). I'm working on a > connection > pooling version, but it's not ready for prime time. > > The web server doesn't need to be on the same network. All of our > deployments use a remote web hosting solution. So the web server is > hosted in one state, while the actual U2 database is in another. > > The code and documentation is on www.PickWiki.com. > > Jeff Butera wrote: > > 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. > --- > u2-users mailing list > u2-users@listserver.u2ug.org > To unsubscribe please visit http://listserver.u2ug.org/ --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] [UV] PHP/Perl
I'll also add that I know Chaman University (CA) has a java based socket server that does implement connection pooling. If anyone wants a contact there, let me know. -- 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/
Re: [U2] [UV] PHP/Perl
Jeff, Charles, I basically used the same strategy when I wrote u2pipe, which is a C program that uses InterCall to connect with the U2 database. To add functionality, I add a Unibasic subroutine and a method in whatever web language -- right now ColdFusion and PHP, and looking to add ASP.NET soon. U2pipe relies on an external socket listener: xinetd for linux, inetd for AIX, and wininetd for Windows. The socket listener does not have to be on the same machine as U2 as long as it's "reachable" via the network. Using config files, multiple connections can be made (one socket port mapped to one U2 connection). I'm working on a connection pooling version, but it's not ready for prime time. The web server doesn't need to be on the same network. All of our deployments use a remote web hosting solution. So the web server is hosted in one state, while the actual U2 database is in another. The code and documentation is on www.PickWiki.com. Jeff Butera wrote: 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. --- u2-users mailing list u2-users@listserver.u2ug.org To unsubscribe please visit http://listserver.u2ug.org/
Re: [U2] [UV] PHP/Perl
> 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/