Showing posts with label JSP. Show all posts
Showing posts with label JSP. Show all posts

Tuesday, December 9, 2008

Thank goodness for other coders

So, I have this nasty tendency to get into ruts... and sort of formulate something in my mind and consider it the only really good way to do something because it's formed.

Luckily, I also have this tendency to occasionally ask other people which parts seem like good ideas, and which parts would annoy the snot out of them if they ever came across my code or had to use it.

After getting a prototype of the polygon generator and drawer setup working, I asked Felicia to help me with a bit of a 'does the way I'm doing this seem painful to you' type review, and in discussion both she and Brian helped me piece everything together... including a few extra concepts:

1. Forcing people to write a class all the time rather than just be able to set a few fields with the values they want really sucks. It's kind of a lazy way of implementing something flexible. One can always just make an interface to keep things flexible. If someone wants to do something so radical and complicated they just have to write their own class, then it makes it easy, but it sucks to not just build a default with an easy way to change the most obvious option.

2. JSPs shouldn't have much java code in them. At all. They should invoke the class up top, and then call the method in the right spot where the variable comes in. JSPs should be more about the layout and less about the code. The code should go *ding* up in that class you substantiated up top.

Thus, for tomorrow, I am hoping to complete the color handler (with easily settable shading colors), write and create the popup handler (with easily handle-able sort of string placement options) and then write an example JSP that makes it easy to show how to invoke the class and use a minimum of java in a simple init function.

I'm sure this isn't the first iteration, and a lot of stuff might change later.

But, I think it will be better than it was.

Wednesday, July 9, 2008

New repository, building test code, and RODSAdai webapp is lining up

So... Dr. Jeremy Espino helped me get a LOT of stuff done today with RODSAdai.

First off, he had some shell scripts and a repository that is more amenable to deployment... so he just took all the suggested associated jars for ogsadai and put them in that repository... adjusted the pom to point to them, and committed the change.

This basically saved me from having to do a jar hunt, and saved Anurag from having to update our persnickety sourceforge repository.

That being done... I tried to do an mvn package... and it worked this time! So the new jars during packaging are now curing the "but it works fine in the ogsadai directory" problem. I can run secure queries in tests, and have them pass. Thus, I have written some more unit tests and have committed them.

The next thing Jeremy did is build a web project for RODSAdai called RODSAdai-web. I have written (but haven't had a chance to test yet, that will be tomorrow) a little JSP that will essentially call rodsadai, run a method that runs a query, and return the resulting spatial/time series.

Jeremy also set up the dependency to the jar that is built by the RODSAdai project... which includes all the libraries that RODSAdai needs. Hopefully, the inclusion of the jars that made the secure query operate from the junit test framework will also allow the test to operate within tomcat. If it does, then we will basically have a footprint for any jsp-container based ogsa-dai client.

So yeah, tomorrow are the tests... and since we have reached a bunch of milestones in a short time, I am going to start the haltingly-updated, rarely revised "If I get hit by a bus" guide document that should help anyone else who needs to set up RODSAdai do so within a day

Wednesday, June 4, 2008

Maven and it's lovely repository

So, I spent a good part of the day paring down how many libraries my example client code actually needed from globus and ogsadai respectively. The list dropped from 40 to about 8.

Then I spent a lot of time putting one of those 8 into the local maven repository in a way that maven seems to recognize... and adjusting the pom file to point to it as a dependency. I hit "mvn package" (ie. compile) and I got a long, thoughtful message about how the dependency wasn't found and how I can add a file with the helpful "mvn install:install-file" command. They also had a "mvn deploy" command for deploying code to a commonly owned repository... showing that deploying to a central and accessible location is

Then proceeded to add all 8 files in about 30 minutes, along with dependencies to the pom file, and then ran mvn compile successfully.

I am really beginning to like maven!

Tomorrow, I am going to put some of the interface and repository plans for the RODS<->OD interface to paper... perhaps start some of the code for simple things like resource discovery. Then, I will test to see whether the jar produced runs properly when put into the proper environment... then I will start reading up on where to put the JSP files. I will also make an eclipse project file and import it into eclipse.

There is also a meeting to discuss package layouts and plans and the like. I am looking forward to it.

Thursday, May 8, 2008

Progress

I have finished adjusting the ServerClient example code so that it will be able to be used by the simple Query JSP I am building to populate a drop down of available resources. The next step after this would be to use Globus MDS to figure out which nodes have OGSA-DAI installed, and then you basically can pick a node, pick a resource, and run a query... which is very well along the lines of then picking multiple nodes/resources and running a query on them...

Otherwise, after reading through the Ogsa-Dai documentaion more, there are files you can make that simplify the resource creation process, and it would be easy to write scripts and UI's that create/modify such files... so it appears that frustration has created some ideas for more useful applications.

Dan also helped point out that it was very likely a MySQL JDBC issue.

Thursday, May 1, 2008

That's one JSP down

This morning was wonderful, Alastair of the OGSA-DAI project helped me get the log4j configured properly in tomcat, and then I was able to view logs and discover the nature of the errors. With that, I got the first JSP running (a simple extension of the existing SQLClient example class). The rest of today was spent modifying the JSP and the attached classes to be more HTML friendly, and now I am trying to make the inputs dynamic (so you can type in the query you want to try and select the resource you are polling and select the URL of the box you wish to query)

After dynamic inputs, I will want to start the dynamic population of inputs... so that the client queries the grid to figure out the OD resources at a given node... and on a separate front, I will start looking at trying to dynamically select from multiple sources at once.

Another thing that was discussed today was how to implement distributed Natural Language Processing using Globus and it's tools. There was lots of discussions of Apache AXIS and OPAL and which might be a better "wrap this interface and make a set of WS code ready to deploy to a container" tool... One of the notable quotes brought up during this was that "Web services are pretty much the Rube Goldberg devices of the Internet."

Monday, April 28, 2008

Tomcat in code alley

I have started to actually write some JSP code. The first one is going to be a simple query that can be run through a webpage... then I am going to start trying more dynamic pieces where different resources are selected and polled.

I am also discussing the best way to discover OGSA-DAI resources on the grid. We were thinking of perhaps building a MonALISA extension to poll the OD on a given box and then sending that back to a repository, which would reduce the hits on a network since it would be passive polling.

Tomorrow, I hope to get to complete a query through a webpage... but I am anticipating a lot of classpath resolution errors will hold me up (as I have very rarely worked on JSP and Servlet projects where this didn't occur)