Forum OpenACS Development: Brief update on CVS status ...

Collapse
Posted by Don Baccus on
OK, I've got most of the packages from arsdigita.com/acs-repository
loaded into the CVS tree.  I'm missing one furfly-ported module that
I'll pick up later, perhaps one or two others.

After reading the CVS docs I learned that moving files in the tree
really is a PITA - I'd thought it was just me being dense.  To make
life a lot simpler for porters, I moved all the sql files to
sql/oracle before importing the packages into the tree.

I'll be updating the status file and get the SDM set up later, most
likely tomorrow or Sunday.

I've defined "acs-core" as an alias for the core packages.  You can
use it during checkout, i.e. "cvs -d [your login or anon
pserver]:/cvsroot checkout acs-core".  This will create the directory
openacs-4 with all core files.

To grab a non-core package, for instance "bboard", cd to your
openacs-4/packages directory and simply do "cvs checkout bboard".

Let me know if you have any problems.

Ben's ported more queries and has fixed a couple of query dispatcher
bugs.  He's got one more to fix that we know about that he'll fix over
the weekend.  However, you can now fully install the core under PG7.1,
restart the server, and get the login page.

Then it dies, of course :)

I've got a slightly hacked version of Kapil's query extractor I'm
going to use to do some query porting of my own.  If it works as well
as it appears to, I'll e-mail my small patches to Kapil and work
towards making it available to people.

Hang on, folks - I'll have more to post after the weekend.  We're
moving closer to getting our organizational act together...

Collapse
Posted by Domingo Alvarez duarte on
Ok I've done the postgresql sql files of /packages/acs-lang.
I know that it's not a hard part, but I'll start with easy things.
I tested it and it generate all tables fine on my machine.
Where I must send it to ?
Collapse
Posted by Don Baccus on
Hey, that's great.  Hang on for a couple of days and I'll get you set up to commit it yourself, OK?  Since you've ported it I'll make you an account and give you commit access to that module.

I want to get the SDM set up first.  Client work is taking me a little  time today so I won't get back to this until tomorrow.

I'll put up some guidelines for porting (not oracle-vs.-postgres but rather process) over the weekend, too.

One thing I'd like folks to do is to test to make sure their ported module still works with Oracle, either on their own machine or using a  shell account elsewhere (for instance, one of Jon Griffin's servers).

So if you haven't already tested this and have Oracle up and running, you could start by verifying that it the APM can still install it.

Collapse
Posted by Domingo Alvarez duarte on
Ok, I dont't have a oracle instalation, but I think it should work because I only added entries for postgresql in "acs-lang.info" and create a postgresql directory with the sql files. Of course you area right to prevent surprises it should be tested, but for now I'll leave it here "http://unolotiene.com/acs/acs-lang.zip" that contain only the files modified or created.
Collapse
Posted by Don Baccus on
You'll also need to port the queries - I'll have word on that hopefully by the end of the weekend, too - are you willing to do query porting, too?

My next task programming task (once I get this admin stuff out of the way) will be to look into getting the APM working under PG - it's a lot easier to let the APM write your .info files for you rather than hack them by hand.  Currently I've been doing that using an Oracle installation.

Collapse
Posted by Domingo Alvarez duarte on
Ok I'll check and port the queries as well !
As mentioned above in order to commit my work to the repository I need write access to it. How can I get it ?
Collapse
Posted by Don Baccus on
If you don't mind, I'd like to review your changes first.  You're new here, after all.  If there are things that don't quite fit with how we  want to execute the port it would be easier to catch them before rather than after changes are committed to the tree.

After review I'll be more than willing to give you commit access to pieces you're working on.

How does that sound?  If you're agreeable could you make a tarball available for me to look at?  I can ftp it from your server if you have one, or you can e-mail it to me if you'd prefer.

Collapse
Posted by Domingo Alvarez duarte on
Of course I don't mind show what I can do and how I do something before get credit, here you can retrieve my acs-lang port I couldn't test it completely because lots of depenedencies in acs-reference that probably will be the next package I'll try port.
Collapse
Posted by Don Baccus on
Talk to Jon Griffin before starting on acs-reference, since he's the author and an active OpenACS volunteer.  I don't think he got started on it, but e-mail him to make sure you're not duplicating efforts...

I'll look at your changes soon, thanks!

Collapse
Posted by Jon Griffin on
I think acs-reference should work out of the box. I will work on it tomorrow afternoon and see what happens.

There are some changes that I really want to make before it is re-released, but the querys are trivial.

Collapse
Posted by Domingo Alvarez duarte on
One question ?

Why are people commiting xql files without specifing the target "postgresql" or "anything else" like "acs-tcl/tcl/site-nodes-procs.xql" it seens that half queries are there and half in "acs-tcl/tcl/site-nodes-procs-postgresql.xql".

It's causing confusion and breaking the package .

Collapse
Posted by Dan Wickstrom on
I ran the query extractor on the acs-tcl package and commited a bunch of .xql files.  It's possible that I broke a few things.  As far as the use of site-nodes-procs.xql and site-nodes-procs-postgresql.xql, it's my understannding that queries that will work with both oracle and postgresql should go in the site-nodes-procs.xql file, and queries that are specific to postgresql go into site-nodes-procs-postgresql.xql. Likewise, queries that are specific to oracle go into site-nodes-procs-oracle.xql.
Collapse
Posted by Domingo Alvarez duarte on
If you area right, why have queries that area "sql92" or works in both "postgresql" and "oracle" copied into a "xql" file instead of leave it as is and now need for replacements ?
Collapse
Posted by Don Baccus on
Dan's about 99% right - queries that are mostly SQL92 compliant ("mostly" because currently I'm including function calls to PL/[pg]SQL functions in that category - at the moment we can't use any RDMBS without decent programatic language support) go in *.xql.

This means outer joins don't go into *-postgresql.xql after porting because they're portable to any SQL92 RDBMS (PG supports pure SQL92 outer joins).  Of course, the oracle specific outer joins do have to go to *-oracle.sql.  Porting the query to SQL92/PG outer join syntax and sticking it in the generic *.xql file means you've also completed the query port for InterBase - congratulations!

Likewise, the query extractor converts "nvl" into "coalesce" and puts the new query into *.xql, not *-postgresql.xql.  Since Oracle (to my surprise) doesn't handle "coalesce" the original "nvl" query is stuck into the proper *-oracle.xql queryfile.

Direct db_exec_plsql calls put nothing into the generic *.xql file, because standard SQL92 doesn't have any equivalent to use as a basis for writing a portable query.  These get copied into both the *-oracle.xql and *-postgresql.xql files.

Queries that are copied but can't be fixed by the extractor in its current form are flagged "FIX ME" with an explanation, i.e. "FIX ME OUTER JOIN".

The easiest way to understand this is to download the extractor and run it over one of the larger models.  Please read the README_PORTERS file first, though - it explains the above in more detail and also some of the limitations. The query extractor is by no means perfect, it is meant to catch a bunch of common cases and put them in the right place and convert when it is easy to do so.  Even though it's not perfect it certainly is a timesaver.

Here's how the query dispatcher is working (the published
spec is behind the times, Ben's not had time to bring it up
to date, sorry - like all of us he's a volunteer and has a
business to run and clients to server so has been busy):

"foo.xql" contains queries that are SQL92 compliant or would
be if they didn't have function calls within them (at the
moment we figure that an RDBMS must have a decent programmatic
language to support the OpenACS 4.x API).

"foo-oracle.xql" and "foo-postgresql.xql" contain queries
specific to each of these.

The query extractor tries to make some intellegent guesses about
where the queries should go.  Something simple like:

"select * from foo"

Goes only into the "foo.xql" generic or SQL92 compliant query
file.

Something like:

"select * from foo, bar where foo.key = bar.key(+)"

gets one copy written into "foo.xql" with a "FIX ME OUTER JOIN"
comment.  The outer join gets fixed with SQL92 compliant syntax
(because that's what Postgres supports).  It doesn't belong in the
"foo-postgresql.xql" because when fixed it won't be PostgreSQL
specific.  Any SQL92 RDBMS will accept the new query (i.e.
InterBase).

A second copy, the original oracle-specific query, gets written
into "foo-oracle.xql" - the query dispatcher will select the
Oracle-specific query instead of the generic or SQL92 compliant
query.

Then there are queries like direct PL/SQL calls that have no
equivalent in SQL92.  A copy gets written to "foo-oracle.xql", and
a second copy gets written to "foo-postgres.xql" with a "FIX ME"
flag.

If there are cases where the query dispatcher isn't finding the
right query please let me know.

I tried to explain this in the query extractor's README_PORTERS
file, but of course I only wrote it a couple of days ago and
I wrote some more yesterday..

Collapse
Posted by Dan Wickstrom on
As far as breakage, I forgot to update the .info file after I commited the new .xql files.  I'll fix that tonight.
Collapse
Posted by Dan Wickstrom on
Ok, I updated the .info file and fixed a few bugs related to the loading and parsing of generic .xql files, so it looks like it's working now.
Collapse
19: Access to repository (response to 1)
Posted by Domingo Alvarez duarte on
Well I saw my name in the volunteers list to work with acs-lang, I sent a first work to Don Baccus but I don't saw my work in the repository or get an answer about access to repository to commit myself my work ?

Any chance get an answer ?

Collapse
Posted by Don Baccus on
I e-mailed you earlier today, Domingo.  Let me know if you don't get it by tomorrow and I'll resend it.  I just had a couple of minor points to discuss then I said I'd be willing to set you up with an account and commit privs to acs-lang.

Where are you, Spain?