View · Index

Weblog Page

Showing 211 - 220 of 693 Postings (summary)

Directory of OpenACS Sites

Created by Caroline Meeks, last modified by Gustaf Neumann 18 Jun 2017, at 12:59 PM

Big Picture

The "Community" section of the OpenACS website still uses Edit This Page and has not been updated in years.  This proposal is to begin the work of updating it by replacing: https://openacs.org/community/sites/ an Edit This Page application, with a new package.  This package is expected to be an incremental improvement over the current page, and the current vision, and certainly the first iteration will not provide everything we might ever want to know about how OpenACS is being used.

To attract new developers we need to effectively communicate all the possibilities that can be created using OpenACS. One way to do this is to more effectively highlight existing sites.

You can add you comments to this page or the forum thread https://openacs.org/forums/message-view?message%5fid=605925

User Stories 

User Stories are a method of defining requirements by creating fictional users who might use the feature.

Mary - Developer considering OpenACS

 (see en:docs-eng part of en:openacs-handbook with document guidelines shaped by these requirements: en:docs-eng-reqs -Torben)

Sam - A developer who has just launched an OpenACS website

George - A current OpenACS developer who wants to see a package that he has never used in action on some existing sites 

 Who

This is a joint project between Solution Grove and Miguel Cordova of UNED.

Why

Goals include:

  • This package is primarily a new UI for the existing functionality.
  • Improving the OpenACS Community and outreach to new developers.
  • Solution Grove is using this project as a means to give back more of our AJAX and Dynamic types experience the community.
  • Miguel Cordova is using the project to learn more about AJAX and OpenACS and he will work with his group at UNED to bring what he learns into dotLRN.
  • This package will provide a place on OpenACS.org where people who are evaluating OpenACS can see that AJAX can be used with OpenACS without changing the user experience for current frequent openacs.org users.
  • This package may be useful during sales for OpenACS vendors, including Solution Grove, to demonstrate the capabilities of our platform.
  • This package is an incremental improvement on the current Edit This Page page.  The goal is not to provide a complete solution to our desire to understand how users are using OpenACS.  However, the design should allow integration with any automated APM based solution that might be developed in the future.

The Plan

Step 1 - Use Dynamic types

Use dynamic-types and categories to create a data structure to collect metadata about OpenACS sites.  For details see Data entry screens.

Step 2 - Data Entry UI

Use an AJAX tabbed UI to collect the data

Tab 1 - Basic Information

  • Site Name - required
  • Description - required
  • site url
  • case study or video url
  • Type of site - Category list, allow multiple selections
    • Intranet
    • Extranet
    • Eccomerce
    • eLearning
    • Knowledge management
    • Content Management
  • Type of Organization - Category
    • Corporate
    • Nonprofit
    • Education Sector
    • Individual
  • Organization Location (someday we might do a google maps mashup for fun)
    • City
    • State
    • Country

Tab 2 - Technical Details

  • What functionality does this site provide - Category
    • Forums
    • FAQ
    • Chat
    • File storage
    • Bookmarks
    • Wiki
    • etc. we don't want to go quite down to the package level (eg we want forums not dotlrn-forums, forums, forums-applet)
  • If possible please provide direct links and descriptions to any interesting implementations of the above or custom functionality. Please indicate if your link is a good example of "out of the box" OpenACS functionality or customization. Both are useful. If your site requires login its great if you can provide a guest account or give an email where users can email if they would like access.
    • XINHA text input. I think we keep it simple here.
  • Companies that work on this site
    • Category list populated from our company list
    • Also "In House"
    • "Independent Contractor"
  • Languages used
  • What version of OpenACS kernel are you running? - Category list
  • When did you start development? - Date widget

Tab 3 - Additional Details

Data Entry 

Just as with the current Edit this Page Information will be entered voluntarily by site developers and owners who are  proud of their sites and wish to give back to the OpenACS community.  Only the most basic information will be required fields, everything else will be optional. 

The user who creates the entry should be able to edit it. In addition users with SWA will be able to edit information.  Undoubtedly information and links will get stale as they have in the current Edit This Page version.  The package should allow granting admin to a volunteer who could maintain information.

Search UI

The search UI should show off progressive enhancement. Functionality should include

 Filters based on categories

Tag cloud of the categories and full text search (example: library/search-categories)

Results grid with title, description, url, and other information. The url should have an image of the url when you mouse over it (look at a specific tag on 3ecompass.info and mouse over url for an example).

One Web Site Detail Page

We will also need a page for each entry where we attractively display all the information about the site.

When we list categories on this page (e.g. what features are used) these categories should be links and clicking on the link should take you back to the search interface with all other sites that have that category shown. 

Notes

  • This package is designed to be an AJAX showcase and make almost gratuitous use of AJAX.
  • The use of categories and dynamic types makes it easy to change pick options and data collected so we don't need to think too hard about these choices before we start.

More Bells and Whistles

 This is a brainstorming section, not all these ideas will be implemented

  • Notifications when a new site is added
  • Ratings with an AJAX drag your mouse over the stars interface
  • Views
  • "Hot Sites" include for the front page
  • Random featured site include for the front page.
  • Google map mashup with location and/or reverse lookup of IP
  • Mashup with something like Delicious, where we look up how often and with what tags the site has been bookmarked.
  • Integrate with RSS feeds from user tracking currently under development at UNED

Examples and Links

We are using YUI-ext. An example of what the panel UI looks like.
http://www.yui-ext.com/deploy/yui-ext/examples/layout/complex.html

Tabs can be implemented in the panel interface. Tabs can also be implemented independently from the panel UI. Below is an example :
http://tech.contextsensitivesolutions.org/register/user-new

Scope Limitations

The proposed project is designed to replace one, out of date Edit This Page page.  The first iteration should be designed and developed with future features in mind but, by necessity it will not include all desired possibilities, nor will it solve all potential issues.

  • No changes to OpenACS core nor to any package that is included in dotLRN are currently anticipated.
  • It is not anticipated that many other OpenACS sites would want to use this exact package on their sites. The source code will be made available if people want to browse it.
  • This area will not be a very good demonstration area for Dynamic Types because we be exposing the web interface to change the dynamic types except to admin.  Creating a demonstration area for Dynamic Types is a good idea but a separate project. People interested in this might want to explore dotcommunity.org and talk with the folks at XArgs, its pretty cool stuff.
  • This proposal is not a beach head to put AJAX throughout Openacs.org, indeed it is intentionally putting AJAX demonstrations into a corner of the site that is not often used by day-to-day users  and into an area where we highlight the diversity of uses of OpenACS. It is a goal to continue to document how AJAX can be used in OpenACS.
  • Integration with contacts and replacing the company listing with contacts is not in scope of the first iteration but should be considered during development and anticipated in future iterations.
  • Automated connections to other sites is not included in the first iteration, however it is definitely something that should be considered during development and anticipated in future iterations.
  • Accessibility - Olga's points are noted and thoughtful discussion of this issue is in process
  • Maintainability -  Just as with the page it is replacing there will be maintenance issues. This is an area of the OpenACS where we gather information from humans who have developed OpenACS sites. Gathering information automatically is also a good idea, but it should be in addition to, not replace asking humans directly to describe their sites and to get insight into things like what makes this site cool, what is the purpose of this site, etc. Anything entered by humans will get stale and will need maintenance by admin. We can improve on the current version by displaying fresh sites near the top. Further mitigation ideas include a link for visitors to report out of date info or dead links, and/or automated link checking.

 



 

 

Installing OpenACS on win2k

Created by OpenACS community, last modified by Gustaf Neumann 18 Jun 2017, at 12:37 PM

by Matthew Burke and Curtis Galloway and others

NOTE: These instructions were valid for ACS v4, but have not been tested with OpenACS and the ArsDigita binary distributions are no longer available. Currently (Summer 2010), the best option to get OpenACS 5.6.* and .LRN 2.5.* running on Windows is to use the native windows installation Windows-OpenACS by Spazio IT (Maurizio Martignano).


 

Overview

With the recent release of a win32 version of AOLserver, it is now possible to run the OpenACS on Windows2000 and Windows98. This document explains the steps necessary to get the OpenACS installed and running on your machine.

Note:

We do not recommend running a production server on Windows98. But the platform is more than sufficient for working the problem sets and for getting a feel for the OpenACS.

You'll need to use the ArsDigita binary distribution of AOLserver for the Win32 platform, which contains patches for several problems we have come across in the default AOLserver binary distribution. See the ArsDigita AOLserver 3 distribution page (from archive.org) for details.

You can download the binary distribution from the ArsDigita download page (compliments of Eve Andersson) under "ArsDigita AOLserver 3 Binary Distribution for Win32." Please read the release notes in the distribution for configuration notes specific to the version you are downloading.

Prerequisites

It is helpful if you have Oracle interMedia Text for full-text searches. We're also trying to make our system work with the PLS System, available free from http://www.pls.com.

Although the zsh shell is the only command-line tool required to install the OpenACS, if you are a UNIX person used to typing ls instead of dir you'll get along much better with the Cygwin toolkit. This is a development library and set of tools that gives you a very UNIX-like environment under Windows. In particular, it includes bash, gzip and tar, which you can use to perform the OpenACS installation instead of WinZip and zsh.

Your Oracle installation

When you install Oracle, a good rule of thumb is "every default setting is wrong." We will not discuss Oracle configuration here except to mention that the OpenACS requires Oracle's NLS_DATE_FORMAT parameter be set to 'YYYY-MM-DD'. Fixing this depends on whether Oracle Administration Assistant for Windows NT (yes, that's Windows NT) will run on your machine or not (in some cases, it will complain about Microsoft Management Console not being installed).

If it runs on your machine, proceed as follows:

  1. Run Oracle Administration Assistant for Windows NT

  2. Navigate using the Explorer-style control in the left panel and select the Oracle Home for the database you wish to use.

  3. Bring up its properties dialog and add a parameter NLS_DATE_FORMAT with value 'YYYY-MM-DD' (without the quotes)

  4. Verify the date format by logging into the database using SQL Plus and run the following query: select sysdate from dual;

Otherwise you will need to perform a little registry surgery as follows:

  1. Run regedit and navigate down the registry keys to HKEY_LOCAL_MACHINE\Software\ORACLE.

  2. Choose the appropriate subtree; this will be HOME0 if you only have on einstallation of Oracle.

    If you are an Oracle achiever and have more than one Oracle installation on your machine, you will see HOME0, HOME1, HOME2, etc. Choose the subtree that corresponds to the Oracle installtion you wish to use with the OpenACS.

     

  3. If the NLS_DATE_FORMAT key is already present, double-click on its value and change it to 'YYYY-MM-DD' (without the quotes). If the key does not exist, choose Edit->New->String Value from the menu and type NLS_DATE_FORMAT for the name of the new value to create it. Then double-click on the empty value to change it.

  4. Verify the date format by logging into the database using SQL Plus and run the following query: select sysdate from dual;

For more information on Oracle configuration look at oracle-install or search the OpenACS forums. One other note: the "nuke a user" admin page and Intermedia won't run unless you set open_cursors = 500 for your database.

The ArsDigita binary installation

Extract the ArsDigita AOLserver distribution onto the C: drive into the default aol30 directory. You can install it on any drive, but it will make your life easier if you keep the AOLserver binary and your OpenACS instance on the same drive. For the rest of these instructions, we'll assume that you used drive C:.

Untar the OpenACS

We recommend rooting webserver content in c:\web. Since most servers these days are expected to run multiple services from multiple IP addresses, each server gets a subdirectory from c:\web. For example, http://scorecard.org would be rooted at c:\web\scorecard on one of our machines and if http://jobdirect.com were on the same box then it would be at c:\web\jobdirect.

For the sake of argument, we're going to assume that your service is called "yourdomain", is going to be at http://yourdomain.com and is rooted at c:\web\yourdomain in the Windows 2000 file system. Note that you'll find our definitions files starting out with "yourdomain.com".

  • download the OpenACS (see above) into c:\temp\acs.tar.gz

  • use WinZip (or equivalent) to extract the files to c:\web\yourdomain

You'll now find that c:\web\yourdomain\www contains the document root and c:\web\yourdomain\tcl contains Tcl scripts that are loaded when the AOLserver starts up.

Feeding Oracle the Data Model

The entire server will behave in an unhappy manner if it connects to Oracle and finds that, for example, the users table does not exist. Thus you need to connect to Oracle as whatever user the AOLserver will connect as, and feed Oracle the table definitions.

  • load the states, country_codes and counties tables using the load-geo-tables shell script in the c:\web\yourdomain\www\install directory. You will need to open a console window and run

    zsh load-geo-tables foo/foopassword

    You most likely will see a slew of "Commit point reached . . . " messages. This does not indicate a problem.

  • cd to c:\web\yourdomain\www\doc\sql and feed Oracle the .sql files that you find there. There is a meta-loader file, load-data-model.sql, that includes the other files in the proper order. To use it, open a console window and run

    sqlplus foo/foopassword < load-data-model.sql
  • If you have interMedia installed, while still in c:\web\yourdomain\www\doc\sql, run

    zsh load-site-wide-search foo foopassword ctxsys-password

    Note that there's no slash between foo and foopassword here. The third argument, ctxsys-password, is the password for interMedia Text's special ctxsys user.

Configuring AOLserver

You will need two configuration files. The first is a Tcl file with configuration information for AOLserver. This should be called yourdomain and should be located in c:\aolserve3_0. The second is an .ini file that configures the OpenACS and is discussed below. Note that pathnames in yourdomain must use forward slashes rather than the Windows back slashes. This is also true for the .ini file.

The following items must be defined in yourdomain:

  • three database pools: main, subquery, and log. They must be named as such. The default pool will be "main".

  • the auxconfig directory which contains the .ini file: c:\web\yourdomain\parameters

  • the pageroot: c:\web\yourdomain\www

  • the directory containing the TclLibrary: c:\web\yourdomain\tcl

You can use our template file as a starting point (you'll need to save this file with a rather than .txt extension).

Configuring OpenACS itself

If you want a system that works, go to c:\web\yourdomain\parameters and copy ad.ini to yourdomain.ini (or any other name different from ad.ini). You don't actually have to delete ad.ini.

Each section of yourdomain.ini has a hardcoded "yourservername" in the name (e.g. [ns/server/yourservername/acs]). This means that the OpenACS will ignore your configuration settings unless your AOLserver name happens to be "yourservername". Therefore you must go through yourdomain.ini and change "yourservername" to whatever you're calling this particular AOLserver (look at the server name in the nsd file for a reference).

Unless you want pages that advertise a community called "Yourdomain Network" owned by "webmaster@yourdomain.com", you'll probably want to edit the text of yourdomain.ini to change system-wide parameters. If you want to see how some of these are used, a good place to look is c:\web\yourdomain\tcl\ad-defs. The Tcl function, ad_parameter, is used to grab parameter values from the .ini file.

Starting the Service

Now you're ready to start things up. Before installing as a Windows service, you might want to test the setup for configuration errors. Open up a console window and go to c:\aol30. Then run

bin\nsd -ft yourdomain.tcl

This will print all the AOLserver messages to the console so you can see them.

Try to connect to your new server with a web browser. If you see the message "Error in serving group pages", you probably forgot to copy the ad.ini file in c:\web\yourdomain\parameters If everything seems ok, you can kill the server with Control-c and then issue the following command to install as a Windows service:

bin\nsd -I -s yourdomain -t yourdomain.tcl

You can now configure error recovery and other Windows aspects of the service from the Services control panel. If you make further changes to yourdomain or yourdomain.ini you should stop and start the service from the Services control panel.

Configuring Permissions

Now, you need to protect the proper administration directories of the OpenACS. You decide the policy although we recommend requiring the admin directories be accessible only via an SSL connection. Here are the directories to consider protecting:

  • /doc (or at least /doc/sql/ since some AOLserver configurations will allow a user to execute SQL files)

  • /admin

  • any private admin dirs for a module you might have written that are not underneath the /admin directory

Adding Yourself as a User and Making Yourself a Sysadmin

OpenACS will define two users: system and anonymous. It will also define a user group of system administrators. You'll want to add yourself as a user (at /register/ ) and then add yourself as as member of the site-wide administration group. Start by logging out as yourself and logging in as the system user (email of "system"). Change the system user's password. Visit the https://yourservername.com/admin/ug/ directory and add your personal user as a site-wide administrator. Now you're bootstrapped!

If you do not know what the system user's password is connect to Oracle using SQL Plus and run the following query:

select password from users where last_name = 'system';

Where to Find What

A few pointers:

  • the /register directory contains the login and registration scripts. You can easily redirect someone to /register/index to have them login or register.

  • the /pvt directory is for user-specific pages. They can only be accessed by people who have logged in.

Making sure that it works

Run the acceptance tests in /doc/acceptance-test

Running Multiple Instances of the OpenACS

You can run multiple instances of the OpenACS on a physical machine but they must each be set up as a separate Windows service. Each instance of the OpenACS must have its own:

  • Oracle tablespace and a user account with the appropriate permissions on that tablespace. Each of these tablespaces must have the OpenACS data model loaded.

  • file with the appropriate settings including server name, auxconfig, ipaddress, and port.

  • Copy of the acs files in an appropriate directory under c:\web.

Suppose you wish to run two services: lintcollectors.com and iguanasdirect.com. You would need the following:

  • an Oracle tablespace, lintcollectors with a user lintcollectors and password secretlint

  • an Oracle tablespace, iguanasdirect with a user iguanasdirect and password secretiguanas

For each of these tablespaces/users you would load the OpenACS data model as described above. Then in c:\aolserver3_0 create files for each service, i.e. lintcollectors and iguanasdirect. These files would point to their respective pageroots, c:\web\lintcollectors\www and c:\web\iguanasdirect\www; their respective auxconfigdirs, c:\web\lintcollectors\parameters and c:\web\iguanasdirect\parameters; etc. In the respective auxconfigdirs would be the files lintcollectors.ini and iguanasdirect.ini.

Now open a console window and go to c:\aol30. You'll start up the two services as follows:

bin\nsd -I -s lintcollectors -t lintcollectors.tcl
bin\nsd -I -s iguanasdirect -t iguanasdirect.tcl

In the services control panel you should see two services: AOLserver-lintcollectors and AOLserver-iguanasdirect.

ref: https://openacs.org/doc/win2k-installation.html

Plataforma Elearning

Created by Geovanni Hernandez, last modified by Gustaf Neumann 18 Jun 2017, at 12:32 PM

  • Plataformas Elearning

Se denominador  Aprendizaje electrónico (Also Conocido Como e-learning ) a la Educación a Distancia virtualizada A Traves de canales Electrónicos (Las Nuevas Redes de Comunicación, en especial Internet ), utilizando párr Ello Herramientas o Aplicaciones de hipertexto ( Correo electrónico , paginas web , Foros de Discusión , Mensajería Instantánea , Plataformas de Formación, Entre Otras) Como Soporte de los Procesos de Enseñanza-Aprendizaje. En un Concepto Más relacionado con lo semipresencial, tambien es Llamado b-learning ( blended learning ). 1

El b-learning Es Una modalidad Que Combina la Educación a Distancia y la Educación presencial, Retomando las Ventajas de Ambas Modalidades Y complementando EL APRENDIZAJE de los aprendices.

Also Florerias definirse Como un Sistema BASADO en la Comunicación Masiva y bidireccional Que sustituye la interaction personal en el aula del profesor y alumno, Como medio preferente de Enseñanza, Por La Acción Sistemática y Conjunta de Recursos Didácticos DIVERSOS y El Apoyo De Una organization tutorial, Que PROMUEVE EL APRENDIZAJE AUTONOMO de los Estudiantes, ademas de Reforzar La de habilidad de la Comunicación Efectiva Con Los Participantes A Traves De Las Plataformas implementadas.

  del consiste en la Educación y Capacitación through Internet. Este tipo de Enseñanza en línea permite la         interaction del usuario con el material el Mediante la utilizacion de Diversas Herramientas informáticas.

Este nuevo Concepto educativo Es Una revolucionaria modalidad de Capacitación Que posibilitó Internet, Y Que hoy se posiciona de Como La forma predominante de Capacitación En El Futuro. Este Sistema ha transformado la Educación, Abriendo Puertas al Aprendizaje individuo y organizacional. Es por Ello Que hoy en día this ocupando ONU Lugar Cada Vez Más destacado y reconocido Dentro de las Organizaciones Empresariales y Educativas.

Sigue un "Geovanni Hernández"


English Translation

E-learning is denominator (Also known as e-learning) to Distance Education virtualized through electronic channels (The new communication networks, especially the Internet) using para This Tools or Applications hypertext (E-mail, web pages, Discussion forums, Instant Messaging, Platforms Training, among others) and support the teaching and learning processes. In a concept more related to what blended learning, also called b-learning (blended learning). 1

The b-learning is a modality that combines distance education and classroom education, taking up the advantages of both modalities and complementing LEARNING apprentices.

Also Florist defined as a system based on the Mass and two-way communication system that replaces personal interaction in the classroom of teacher and student, as preferred means of education, the systematic and Joint DIFFERENT Resource Action and support of a tutorial organization, that promotes learning AUTONOMO of Students, in addition to strengthening skill of effective communication with participants through platforms implemented.

  It consists of the Education and Training through Internet. This type of online education allows user interaction with the material By using various tools.

This new educational concept is a revolutionary form of training enabled Internet, and today is positioned as the predominant form of future training. This system has transformed Education, Abriendo Puertas to individual and organizational learning. That is why today esta un Lugar occupying increasingly prominent and recognized within business and educational organizations.

Tcl

Created by OpenACS community, last modified by Gustaf Neumann 17 Jun 2017, at 10:26 AM

Tcl is a Turing Complete, open-source, embeddable interpreted language. OpenACS additionally, uses these modules:

What others say about Tcl

  • Tcl (tcl.tk)
  • testimonials on tcl.tk
  • Tcl the Misunderstood
  • Tcl/Tk is perhaps the most mature of the dynamic languages, dating back to 1988. The evolution of the language over the last 20 years has been marked by passionate preservation of the balance between maintaining simplicity and utility with the adoption of new ideas and new techniques based on accumulated experience.

    Tcl/Tk is used in a number of prominent software systems including DejaGnu (e.g. used for testing the gcc compiler), Expect and AOLserver. The language is used by many scientific organizations including NASA as well as being used extensively in the commercial and financial sectors. ( http://wiki.tcl.tk/20832 )

Using Tcl

.LRN Zen Project: Package Completion Checklist

Created by Red Wylie, last modified by Gustaf Neumann 17 Jun 2017, at 10:19 AM

 Package  File 508 AA Con HTML Notes UNED
               
news www/index.adp            
  www/item.adp            
www item-create.adp         FORM BUILDER  
www preview.adp            
               
               
news-portlet              
www news-admin-portlet x x x      
www news-portlet.adp x x x      
www summary.adp x x x      
               
file-storage              
www folder-create            
www file-add            
www simple-add            
fs-portlet              
www fs-portlet            
dotlrn              
www applets-chunk.adp x 13.1 x   AA caused by breadcrumbs and tabs having same name  
www communities.adp x x x      
www communities-chunk.adp         uses listbuilder already  
www community-member.adp x x x      
www community-member2.adp            
www community-edit.adp x          
www community-edit-2.adp            
www community-type.adp x x x      
www community-types-chunk.adp         converted to list builder  
www control-panel.adp x x x      
www courses.adp x x x   no content  
www deregister-confirm.adp            
www dotlrn-group-admin-faq.adp         Needs to be I18N  
www dotlrn-main-portlet.adp x x x      
www dotlrn-user-faq.adp         Needs to be I18N  
www element-list.adp         converted to use list builder  
www element-rename.adp            
www help.adp         Need to be i18n  
www manage-memberships.adp         converted to use list builder  
www member-add.adp x x x      
www member-add-2.adp         FORM-BUILDER - INLINE  
www member-confirm.adp            
www member-email.adp         Needs to be I18N  
www member-email-confirm.adp         Needs to be I18N  
www members.adp         LIST BUILDER  
www members-chunk.adp            
www members-chunk-table.adp         LIST-BUILDER  
www my-communities.adp         LIST-BUILDER  
www spam-2.adp         FORM BUILDER  
www spam-recipients.adp         LIST BUILDER/ FORM BUILDER  
www spam-variables.adp         LIST BUILDER  
www user-add.adp            
www user-add-2.adp         FORM BUILDER  
www weblog-control-panel.adp            
lib bio.adp x x x      
               
               
               
  dotlrn-admins         FORM-BUILDER - INLINE  
               
notifications all user visible files x x x   DONE  
               
dotlrn-portlet              
www dotlrn-admin-portlet.adp x x x      
www dotlrn-members-portlet.adp x x x      
www dotlrn-members-staff-portlet x x x      
www dotlrn-portlet.adp x x x      

 

             
calendar + portlet              
www view (day/week/month/list) x   x x

no HC

problem with form

 
calendar-portlet/ww all portlets x   x x no HC  
               
faq   508 AA Con HTML    
www one-faq x x x x

table used for layout needs to be change

- ah found the table.  looking into it.

 
www one-question x x x x    
www cat*     x   needs lots of work  
www index x x x x    
               
www/admin index x x x x    
www/admin faq-add-edit     x      
www/admin configure x x x x    
www/admin one-faq     x      
www/admin q-and-a-add-edit     x      
www/admin one-question     x      
www/admin faq-disable x x x x    
www/admin faq-delete     x      
www/admin swap     x      
               
Assessment              
www index.adp            
www instructions.adp            
               
               

Oracle Notes

Created by Jade Rubick, last modified by Gustaf Neumann 16 Jun 2017, at 09:34 AM

How do I use a literal ampersand within a SQL statement for INSERT, SELECT, etc.?

This is a sqlplus issue, I believe. See this link for a workaround: http://www.jlcomp.demon.co.uk/faq/litampersand.html
If you're on a *nix box - yasql is a great replacement for sql*plus.

Is there an equivalent of PostgreSQL's vacuum analyze

No, not really, but you can do something similar to speed up a table:

 analyze table ticket_xrefs compute statistics;

This will look at the usage statistics, and update them. This can dramatically increase performance when the amount of data in a table has changed a lot.

Moving one Oracle instance to another server

Apparently, Oracle installations are fairly self-contained. In theory, at least, you should be able to move an installation from one server to another by shutting down the server, tarring up the /ora8 directory, sftp-ing it to another server, untarring it, and possibly running the setup_stubs.sh script.

Needless to say, this is much easier than reinstalling, exporting the database, and importing it back in. No guarantees on how well it works, however.

Turning on autotrace

Turning on Autotrace

Hierarchical queries and getting around join problem with CONNECT BY

https://openacs.org/forums/message-view?message_id=125969

Getting [too long] messages?

If you get an error message starting with SQL: [too long], then you need to read this. Sometimes, for long error messages, your error messages are truncated, which makes tracking down the errors more difficult.

Efficient updates

You can do this

UPDATE
  (SELECT col1, value
     FROM t1, t2
    WHERE t1.key = t2.key
    AND t2.col2 = :other_value)
SET col1 = value

Using lots of dynamic SQL (more than 32768 chars?)

You cannot use a clob, so use the dbms_sql package:

declare
    l_stmt          dbms_sql.varchar2s;
    l_cursor        integer default dbms_sql.open_cursor;
    l_rows          number  default 0;
begin
    l_stmt(1) := 'insert';
    l_stmt(2) := 'into foo';
    l_stmt(3) := 'values';
    l_stmt(4) := '( 1 )';

    dbms_sql.parse( c             =>   l_cursor,
                    statement     => l_stmt,
                    lb            => l_stmt.first,
                    ub            => l_stmt.last,
                    lfflg         => TRUE,
                    language_flag => dbms_sql.native );

    l_rows := dbms_sql.execute(l_cursor);

    dbms_sql.close_cursor( l_cursor );
end;
/

This is from Tom Kyte, Oracle God.

Online table updates

DBMS Redefinition package

PL/SQL exception handling

  • Exception handling in PL/SQL

    SPfile and Pfile startups

    $ sqlplus /nolog
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Tue Feb 28 19:04:30 2006
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    
    19:04:34 > connect / as sysdba
    Connected.
    19:05:21 sys@vs> startup pfile=/u01/app/oracle/admin/vs/pfile/init.ora.192006104950
    ORACLE instance started.
    
    Total System Global Area  285212672 bytes
    Fixed Size		    1218992 bytes
    Variable Size		   92276304 bytes
    Database Buffers	  188743680 bytes
    Redo Buffers		    2973696 bytes
    
    Database mounted.
    Database opened.
    19:05:37 sys@vs> 19:05:37 sys@vs>
    19:05:38 sys@vs> create spfile from pfile='/u01/app/oracle/admin/vs/pfile/init.ora.192006104950';
    
    File created.
    

Troubleshooting Oracle Dates

Oracle has an internal representation for storing the data based on the number of seconds elapsed since some date. However, for the purposes of inputing dates into Oracle and getting them back out, Oracle needs to be told to use a specific date format. By default, it uses an Oracle-specific format which isn't copacetic. You want Oracle to use the ANSI-compliant date format which is of form 'YYYY-MM-DD'.

To fix this, you should include the following line in $ORACLE_HOME/dbs/initSID.ora or for the default case, $ORACLE_HOME/dbs/initora8.ora

nls_date_format = "YYYY-MM-DD"

You test whether this solved the problem by firing up sqlplus and typing:

SQL> select sysdate from dual;

You should see back a date like 2000-06-02. If some of the date is chopped off, i.e. like 2000-06-0, everything is still fine. The problem here is that sqlplus is simply truncating the output. You can fix this by typing:

SQL> column sysdate format a15
SQL> select sysdate from dual;

If the date does not conform to this format, double-check that you included the necessary line in the init scripts. If it still isn't working, make sure that you have restarted the database since adding the line:

[joeuser ~]$ svrmgrl
SVRMGR> connect internal
Connected.
SVRMGR> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SVRMGR> startup
ORACLE instance started.

If you're sure that you have restarted the database since adding the line, check your initialization scripts. Make sure that the following line is not included:

export nls_lang = american

Setting this environment variable will override the date setting. Either delete this line and login again or add the following entry to your login scripts after the nls_lang line:

export nls_date_format = 'YYYY-MM-DD'

Log back in again. If adding the nls_date_format line doesn't help, you can ask for advice in our OpenACS forums.

Useful Procedures

  • Dropping a tablespace

    • Run sqlplus as the dba:

      [oracle ~]$ sqlplus system/changeme
      
    • To drop a user and all of the tables and data owned by that user:

      SQL> drop user oracle_user_name cascade;
      
    • To drop the tablespace: This will delete everything in the tablespace overriding any referential integrity constraints. Run this command only if you want to clean out your database entirely.

      SQL> drop tablespace table_space_name including contents cascade constraints;
      

Creating an appropriate tuning and monitoring environment

The first task is to create an appropriate environment for finding out what is going on inside Oracle. Oracle provides Statspack, a package to monitor and save the state of the v$ performance views. These reports help finding severe problems by exposing summary data about the Oracle wait interface, executed queries. You'll find the installation instructions in $ORACLE_HOME/rdbms/admin/spdoc.txt. Follow the instructions carefully and take periodic snapshots, this way you'll be able to look at historical performance data.

Also turn on the timed_statistics in your init.ora file, so that Statspack reports (and all other Oracle reports) are timed, which makes them a lot more meaningful. The overhead of timing data is about 1% per Oracle Support information.

To be able to get a overview of how Oracle executes a particular query, install "autotrace". I usually follow the instructions for autotrace.

Make sure, that the Oracle CBO works with adequate statistics

 

The Oracle Cost Based optimizer is a piece of software that tries to find the "optimal" execution plan for a given SQL statement. For that it estimates the costs of running a SQL query in a particular way (by default up to 80.000 permutations are being tested in a Oracle 8i). To get an adequate cost estimate, the CBO needs to have adequate statistics. For that Oracle supplies the dbms_stats package.

 

Useful links

IMSLD Announcement Significance Draft

Created by Cesar Brea, last modified by Gustaf Neumann 16 Jun 2017, at 09:24 AM

In case you missed it, which of course is only true for a very small percentage of you, OpenACS/.LRN recently announced that it was the first software platform to support the new IMS LD standard.

What is this all about, and why should you care?  Here's the short version:

Online learning, whether as an extension of offline learning in a classroom or as a pure proposition itself, has become a big deal and will continue to grow in importance.  One of the things that will continue to drive this is the growing availability of free, open, high-quality educational content online.  A popular example of this is MIT's seminal OpenCourseWare initiative, which in addition to becoming an incredibly useful resource itself around the world has also spawned other similar efforts.  But OpenCourseWare initially consists largely of static content -- syllabi, tests, etc.  What about interactive learning materials?

To make sure that interactive content developed by one instructor could be "played" by other instructors using different learning management systems, The US Defense Department and several other organizations setting standards for information technology in education, including a 300-member consortium called IMS, published a specification called SCORM, short for Shareable Content Object Reference Model.  So if you have a "SCORM-compliant LMS", that means it can play interactive learning content, like self-guided tutorials, and certain simulations.  Very cool! .LRN's LORS package, authored principally by Ernie Ghiglione, is one example of a SCORM-compliant player.

Many learning experiences, however, are open-ended -- meaning it's the interaction between and among instructors and students, and other players in the learning experience (patients for example, in a medical setting, or clients in a law school moot court or business school project) that really drives the value students derive from a course.  SCORM doesn't do a very good job of modeling an open-ended process, or integrating the collaborative tools that participants use online to support such experiences.

Enter IMS LD ("learning Design").  This is a more sophisticated specification that provides a pedagogically neutral language for modeling such experiences.  And now OpenACS/.LRN is the first LMS to support the specification by providing a player for IMS LD-compliant content.  In addition to "expressing the "base content" itself, the OpenACS/.LRN player allows integration of the many collaboration tools our platform provides into the learning experience experienced through the player.

Professor Carlos Delgado Kloos of Madrid's Universidad Carlos III (UC3M) kindly provided this link to instructions for accessing a working instance of IMS LD running as part of a .LRN instance; this documentation for administrators on using the package is also very helpful to read.

Now why should you care?  Online massively-multi-player (MMP) gaming, online communities, and e-learning are all increasingly central to the worlds of education and entertainment, which themselves are inextricably intertwined, especially for younger generations.  And, IMS LD represents an effort to create a lingua franca for developing content for the nexus of these three phenomena.  What, concretely, do we mean?  Consider, for example, how such a capability might be used in a law school.  We could model the legal system, with "players" acting in different roles to advocate, adjudicate, and dispense justice, using collaboration tools like chat for lawyers to examine witnesses and present arguments, polls for juries to reach verdicts, and wikis for judges to write decisions collaboratively. 

Huge, right?  It's even more significant if this experience can be developed with the knowledge that it can reach a really broad audience, which is what an open specification makes possible.  The hard part is keeping things simple enough that people can learn the format and develop for it, while keeping it flexible and "abstract" enough to encompass a large enough "possibility set" that people won't be tempted to fork so far for their own tweaks that they can't get back to something everyone can run.  I'd expect a cottage industry will emerge in which participants will author libraries of "LD templates" of different pedagogical approaches that instructors could then easily configure for their teaching needs.  Right now, though, that's a bit further ahead in the future.

So we'll see how this unfolds.  See immediately below, as well as in the comments on this page for excerpts from some very helpful further comments by some colleagues in the .LRN community:

From Professor Jesus G. Boticario of the Artificial Intelligence Department of Spain's Universidad Nacional de Educacion a la Distancia (UNED):

"Let me add that I'm looking forward to reading the comments from Luis and Jopez on this. I presume that they will clarify a key issue regarding IMS-LD, which is the description, in a non-dependent pedagogical way (i.e., open to any pedagogical approach) of learning activity workflows. Moreover, this opens up a standard approach to deal with a recurrent open problem in learning, which is to take into account individual needs and preferences while interacting with learning activities. In particular, the LD designer can describe a learning activity to be delivered, using any pedagogical approach applicable (e.g., a very simple one: first provide the examples then a related explanation, or the other way around, first introduce the subject at hand then provide examples, and provide one or the other considering if the learner has an inductive or deductive learning style).

Furthermore, the fact is that the IMS-LD specification expands opportunities for re-use of learning designs by enabling interoperability among compliant learning management systems is what makes it so powerful (Buzza, Bean, Harrigan & Carey, 2004). Available at: http://www-jime.open.ac.uk/articles/10.5334/2005-17/

 IMHO, another relevant issue here is to remark the R&D projects which have been using IMS-LD in conjuction with dotLRN. On our side these are as follows:

- EU4ALL (October 2006-September 2010)
European Unified Approach for Assissted Lifelong Learning
Funded by the EC under the 6th FP: IST-2005-034778
http://cordis.europa.eu/project/rcn/80191_en.html

- ADAPTAPlan (January 2006-December 2008)
Adaptation based on machine learning, user modelling and planning for complex user-oriented tasks
Funded y the Spanish Ministry of Science and Technology: TIN 2005-08945-C06-01
http://adenu.ia.uned.es/adaptaplan/

- FAA (February 2005 – July 2007)
Open and Accessible Training
Funded by the Xunta of Galicia (Spain): PGIDIT-05-SIN-011-E
http://adenu.ia.uned.es/faa

- aLFanet (May 2002-April 2005)
Active Learning for Adaptive Internet
Funded by the EC under the 5th FP: IST-2001-33288 to cover de full life cycle of adaptive e-learning
http://alfanet.ia.uned.es

Cheers,
Jesus"

 

From Professor Gustaf Neumann, Head of the Department of Information Systems at Vienna University of Economics and Business Administration:

"Hi Folks,

A few comments from my side concerning IMS LD.

 - first of all, i think that it is great, that we have one of the best IMS LD supports
  available in .LRN

 - however, we should not overemphasis it, since IMS LD has as well many weaknesses, at least for university usage with a blended learning approach:

 * most teachers are not able to develop a useful IMS LD design in the time they want to devote for this

 * IMS LD is designed with an "ex-ante course design" in mind, which is "re-played" in a class situation. At least in our university, this would not work, since we seldom run the exact same design multiple times. It looks to me, as if the mindset behind IMS LD is that the course designer is typically not the teacher  in a class.

  * The suitability of IMS LD might be much better for highly standardized courses such as for driving licenses, ecdl, etc. or for university targeting on distance education.

 - in our environment agile content development and flexible content reuse together with some learning-activity management (similar to ad-hoc work flows) are much more important. Teachers want to react immediately to pot. weaknesses in their materials and course designs...

Interesting enough, the community base approach of .LRN makes it easy to define online learning communities,which are suitable for both, distant and blended learning. So I would recommend emphasizing this aspect as well sufficiently.

best regards
-gustaf

 

From Jose Pablo Escobedo Del Cid at UC3M:

"Hi, Jesus,

You are right about the pedagogical issue. The IMS-LD specification provides a generic and flexible language to capture the pedagogic structure of an online learning experience and it is designed to enable many different pedagogics to be expressed. (More info on how to model different didactical scenarios can be found here: Daniel Burgos, Rob Koper, 2005, "Practical pedagogical uses of IMS Learning Design's Level B http://dspace.ou.nl/handle/1820/471) ". IMHO, the flexibility of the IMS-LD spec, not being bound to any pedagogy, is one of its major advantages. The levels B and C (which introduce the conditions, properties and notifications) enable the automation of learning flow activities, which are triggered by the completion of tasks and the value of the properties that change during the run, rather than the learning flows being pre-planned by the course designer. A consequence of this dependence on runtime events is that the activities set to learners are no longer wholly predictable, they depend on the course of the collaboration.

I hope this helps!

Regards,
Jopez"

Dynamic Object Type

Created by Lee Denison, last modified by Gustaf Neumann 15 Jun 2017, at 02:58 PM

Package Specification Summary for Package: dynamic-types

Summary: Dynamic Object Type management API
Description: Allows creation, manipulation and ui generation of dynamically generated object types.
Maturity: New Submission or Maturity Unknown
This package depends on: acs-kernel acs-content-repository acs-translations
Packages that depend on dynamic-types: project-manager
Package parameters: None


Bug Tracker Summary for Package: dynamic-types

There is no package with the name "dynamic-types" known to bug-tracker.



Code Metrics Summary for Package: dynamic-types

# Tcl Procs 0
# Tcl Lines 0
# Tcl Blank Lines 1
# Tcl Comment Lines 0
# Automated Tests 0
# Stored Procedures PG: 0 ORA: 0
# SQL Lines PG: 0 (blank 1 comments 0) ORA: 0 (blank 1 comments 0)
# ADP pages 0
# ADP lines 0
# Include pages (dynamic-types/lib/) 0
# Documentation pages 0
# Documentation lines 0
Browse Source Not installed
Github Repository: https://github.com/openacs/dynamic-types/tree/oacs-5-10

 

cvs head version of project-manager requires dynamic-types

What does dynamic-types do?
Dynamic types allows you to create new OpenACS Object Types and add attributes to them through a Tcl API.

When should I use dynamic-types?
Dynamic types supports several use cases:

  • Container Applications - meta-applications which define the necessary data model and code to perform a useful function but the extended data is decided by the administrator.
  • Extending existing packages with dynamic data. As an example project manager has dynamic types support which allow third packages to add attributes to projects and tasks which can be edited using the standard interface for project manager.

Creating a Dynamic Type (Declaration)
There are three main ways to create dynamic types:

  • As a user, through an application user interface.
  • As a system administrator, through install.xml actions.
  • As a programmer, through the Tcl API.

notes:

a 2005 implementation example

Running Applications built on dynamic-types

The project manager package (latest version in HEAD) relies on dynamic types to allow custom applications and other packages (like invoices, logger) to extend the basic attributes of a project and a task. This is in use by three clients of cognovís.

Solution Grove has been exploring helping clients build dynamic data models with dynamic types.

Two examples we have are about bulk data collection, aggregation, and analysis. In both cases, data is uploaded to the system, where a web user interface is providing for viewing and aggregating the data.

In the first case, there is an administrative user interface to define a new type, and arbitrarily many types can be created. Each new type of data collection gets a different table/dynamic type in the database. Here we are mainly using the dynamic type system to programatically build new tables for collection. We also use the dynamic type definitions to build the user interface to explore the data after it has been uploaded. Storing all the data in a specific table, instead of generic storage, makes the reporting and dynamic analysis of the data much easier to code for. Doing sum, average, etc calculations on the data is greatly simplified. In this case we are collection many different types of data, and doing unique analysis on each type, so the ability to create the types, and build a user interface to it, on the fly is very helpful. The data collection is done through transfer of XML files with an external application. Using the dynamic-type attribute info we are able to map the XML structure to the various dynamic data collection types.

For another client, we are using dynamic types to give the site administrators more flexibility in developing their application. The client wants to allow users to upload specialized data files, but then to organize these files in ways that make sense to the client and their users. So, we developed 4 dynamic-type objects (institution, ward, glucose_file and glucose). An institution can have multiple wards, which can have multiple glucose_files which can have multiple glucoses. The attributes of each object is set by the site-administrator, and the plan is to adjust them over time as the site's needs change. Because everything is done with the Web UI, the administrator can make changes as they need to. The add-edit pages respond automatically to any changes in the attributes - there's no need to recode them when you add an attribute to an object.

A third application we have developed is a generic resource database, where a form can be generated to collect information such as a list of businesses, or other resources. The dynamic UI here can be integrated with categories to build a dynamic form for data entry. We also built a dynamic UI to view lists and individual entries.

 

Xarg Examples 

Xarg have developed two 'products' which are installed for multiple clients. In each case we used dynamic types to handle sections of data which are expected to be different for each client installation. Dynamic types allowed the system to handle the different data sets without needing to modify the code for each client.

dotCommunity: In our dotCommunity product users are able to create community websites by filling in an application form.  The system supports multiple community 'types'.  Dynamic types allows each clients to collect and display different data for each community type on a per installation basis.

dotConsult: This is our e-consultation product which uses dynamic types to store a flexible set of demographics information for the users taking part in the consultation.

Future Directions

The current APIs of dynamic-types are under revision, a much more consistent, and less abstract API is under development. It does not appear an upgrade from the older API will be easy to write.  In the long run support for "lists" as AMS has them would be a nice feature in addition to the option to store the additional types and attributes in a meta database (as AMS does) or in the primary tables (as dynamic types does currently). Dynfield (an application from Project Open) supposedly does exactly that, but for reasons unknown to me (MS) it has never made it into proper OpenACS and therefore any of it's packages.

 

Difference to AMS

 

The AMS package allows you to extend any object_type with additional attributes. These attributes are stored in a meta table, allowing you to quickly change the makeup of you objects without the need to change anything in the database. Additionally, through the support of "lists" for object_types, you can compose the entry forms for objects in multiple different ways, thereby allowing many different views on the same object_type.

Emacs as an OpenACS IDE

Created by OpenACS community, last modified by Gustaf Neumann 13 Jun 2017, at 10:30 AM

emacs integrated development environment for OpenACS

emacs documentation: http://www.gnu.org/software/emacs/manual/html_node/

Emacs uses major and minor modes that provide a UI context for editing various file types. Here are some useful ones for working with OpenACS:

CVS Mode Emacs with OpenACS

I use M-x cvs-examine to update and check in code when I am working with OpenACS. One thing that is a pain with CVS is that cvs diff does not tell you what you are going to get if you update, it only tells you what is changed in your local copy.

You can use M-x cvs-examine and then type "d e" next to any of the files in your checkout in the *cvs* buffer to open ediff mode and then interactively merge what's in CVS with your local changes. In ediff mode you use n/p to got to the next/previous difference. You can copy changes from the CVS buffer to your local copy using a/b to copy the the buffer marked A to B or B to A. Type ? on the ediff window to get a list of other commands.

OpenACS Mode for Emacs

See historical page describing oacs.el http://web.archive.org/web/20040621200046/www.thecodemill.biz/services/oacs/

 

Download: oacs.el.tar updated 2006-08-15 . The lastest version includes nXML mode support in addition to PSGML support. There are good installation instructions in the INSTALL.txt file. A quick install guide for Debian


 


sudo su -
cd /usr/share/emacs/site-lisp
wget http://www.emacswiki.org/elisp/color-occur.el
wget https://openacs.org/storage/view/xowiki-resources%5C/oacs.el.tar
tar xf oacs.el.tar
apt-get install psgml mmm-mode

# Alternatively compile manually
wget http://www.lysator.liu.se/~lenst/about_psgml/psgml-1.2.5.tar.gz
tar xfz psgml-1.2.5.tar.gz
cd psgml-1.2.5
./configure
make install
cd ..
wget http://switch.dl.sourceforge.net/sourceforge/mmm-mode/mmm-mode-0.4.8.tar.gz
tar xfz mmm-mode-0.4.8.tar.gz
cd mmm-mode-0.4.8
./configure
make install

After this login as the user who is doing the development and edit you .emacs file.

 (add-to-list 'load-path "/usr/share/emacs/site-lisp/oacs")
 (require 'oacs)
 (setq user-full-name "<yourname>")
 (setq user-mail-address "<your email>")
 (add-to-list 'auto-mode-alist '("\\.vuh" . tcl-mode))
 (add-to-list 'auto-mode-alist '("\\.adp" . html-mode))

For recent Emacs versions (> 2008), modify oacs-nxml.el in the downloaded tarball:

 line 30: (load "nxml-mode.el")  instead of (load "rng-auto.el")

See http://lists.gnu.org/archive/html/emacs-devel/2008-01/msg00947.html

Also, you may need to modify adp.rnc to the correct path to the xhtml.rnc schema on your installation. On OS X, for example, line 5 should read:

include "/Applications/Emacs.app/Contents/Resources/etc/schema/xhtml.rnc" 

 

The following was written by Bart the author of oacs.el

OpenACS lacked a good Integrated Development Environment and as I use Emacs for almost everything it was only natural to fill the void. The Emacs OACS module is an extension to GNU Emacs, the extensible, customizable, self-documenting real-time display editor.

Development status

Emacs OACS's development is driven by the needs I encounter in my OpenACS projects. Development takes place in my spare time. At this stage the code is the documentation. I lack the time to write a proper article. However, as Emacs OACS addresses the issues described in articles XQL Document Type Definition and Replacing SQL bind vars in Emacs some background information can be found in those articles.

Forum thread: Beta Emacs OACS module available

Useful commands

Formating TCL

  • M-o ft to re-format Tcl code. See code for details.
  • M-o fh to reformat Html or Adp code.
  • M-o fs to reformat Sql code.
  • M-x oacs-format-separate-tags to separate adjacent tags. E.g. <tr><td>
  • M-x oacs-format-includes to place all include attribubtes on a separate line.
    
     

Code navigation

  • M-o oo to search for any custom regular expression.
  • M-o on to search the log for Notice oacs-dbg messages. That is a Notice level message created with the macro 'oddbg'.
  • M-o od to search the log for Debug oacs-dbg messages.
  • M-o oe to search the log for Error oacs-dbg messages. Etc for all other ns_log levels.
  • M-o op to browse Tcl libraries for procedure definitions. This is by far my favorite way of navigating a library!
  • M-o fp (find-file-at-point) to NSD error log mode.
  • M-o rl to revert the logfile
  • M-o ml to to open an error log file and monitor the changes to the log. 

 

Editing docbook xml

 

editing via Muse mode

editing via nXML mode

See https://openacs.org/doc/nxml-mode.html

psgml mode

See:

Developing with emacs

To make emacs display .vuh files similar to .tcl files, add to .emacs file:

 (add-to-list 'auto-mode-alist '("\\.vuh" . tcl-mode))

 

To make emacs display .adp files similar to .html files, add to .emacs file:

 (add-to-list 'auto-mode-alist '("\\.adp" . html-mode))

 

Common command shortcuts

Minor Modes

 M-x global-font-lock-mode highlights syntax using colors
 M-x transient-mark-mode   shows a highlighted text region
 M-x show-paren-mode       shows matching parentheses (and when the do not)

Move, Search and Replace

 M-x goto-line             go to a specific line in a file
 M-x goto-char             go to a specific character number in a file
 M-C-f                     search forward for matching brace
 M-C-b                     search backward for matching brace
 M-x replace-regexp        search/replace using regular expressions
 M-x query-replace-regexp  query/search/replace using regular expressions
   note \\( and \\) for start and end subgroups
 M-x grep                  grep creates new buffer with results
                           for fast loading/editing search hits

Useful "sleepers" (not found in many shortcut sheets)

 fg<cr>                    restart a suspended emacs session from commandline
 C-q <key press>           add a key without emacs interpreting the key binding

You can configure emacs to create 4 spaces when you press the tab key--important for meeting coding standards. Add this to your .emacs file:

(setq-default tab-width 4 indent-tabs-mode nil)

other useful quicksheets

PostgreSQL Administration

Created by OpenACS community, last modified by Gustaf Neumann 13 Jun 2017, at 10:27 AM

Finding and fixing expensive queries

Probably the most important thing you can do to improve performance is rewriting queries to run quickly. Explain analyze is your friend. OpenACS also includes tools to track down slow queries, and you can ask PostgreSQL to give you information about queries as well.

First you should install the acs-developer-support package on a development or staging server. In general its not a good idea to keep the develop support tracking features running constantly on a production system, but you can turn it on temporarily to diagnose a problem on a production system. Once Developer Support is installed you can visit /ds/ on your site and turn on the developer support toolbar and database statistics. This will give you a total of the time for all queries for a page in the toolbar at the top of the page. If you click on the timing information you can see a page that lists every query run for that page. It should be easy to spot the slow running query in the list.

Once you find the slow running query you can copy it to your clipboard. Next you want to open a psql session on the database server, or use M-x sql-postgres most in emacs. Type "explain analyze" and paste the query after that. This will tell PostgreSQL to run the query and show the query plan it will use.  The first thing to look for is a "Sequential Scan" on a large table. If the table is small (hundreds instead of thousands of rows, for example)  it is probably cheaper to scan the table than to load an index, but on large tables like "acs_objects". "users", "cr_items", a sequential scan is a sign of trouble.

PostgreSQL does not seem to generate good plans if you do a join with a view. In this case you should try to recreate the query using the tables in the view explicitly. This can speed up many queries. A common example is the cc_users view, or the cr_revisionsx view or the (x) view automatically created for subtypes of cr_revisions.

If you can't figure out why the query plan is slow, post it somewhere on the OpenACS forums or ask for advice in the #openacs irc channel. (https://openacs.org/irc/) 

This will help you is you know which page is slow. If you don't know which is slow, but notice a high load on PostgreSQL on your server. You'll need to turn on the stats collector and command string collector in PostgreSQL. In the postgresql.conf file set

   stats_start_collector true

and

   stats_command_string true

and then do /etc/init.d/postgreql reload or pg_ctl reload to turn it on.

Once this is on you can execute "select * from pg_stat_activity" to see if there are any long running queries. Most queries will finish too quickly to notice in this table. The table includes the start time of the query and the process id of the backend executing the query. Sometimes you'll find a particularly bad query has been running for a very long time. Sometimes hours. If this happens you can stop the query by issuing a SIGINT signal to the process of the backend that is running that query. This will execute a cancel request to the backend and is the only safe way to stop a long running query. Do not kill the process or try to stop AOLserver. If you stop AOLserver the query will continue to run in the PostgreSQL backend process.

Tuning PostgreSQL

Tune PostgreSQL. (OPTIONAL). The default values for PostgreSQL are very conservative; we can safely change some of them and improve performance.

  1. Change the kernel parameter for maximum shared memory segment size to 128Mb: DAVEB: How current is this? Do modern 2.4 or 2.6 kernels have such low settings? This is highly dependent also on the amount of RAM on your server, most servers have gigabytes of RAM so adjust accordingly.

    [root root]# echo 134217728 >/proc/sys/kernel/shmmax
    [root root]#

    Make that change permanent by editing /etc/sysctl.conf to add these lines at the end:

    # increase shared memory limit for postgres
    kernel.shmmax = 134217728
  2. Edit the PostgreSQL config file, /usr/local/pgsql/data/postgresql.conf, to use more memory. These values should improve performance in most cases. (more information

    #       Shared Memory Size
    #
    shared_buffers = 15200      # 2*max_connections, min 16
    
    #       Non-shared Memory Sizes
    #
    sort_mem = 32168            # min 32
    
    
    #       Write-ahead log (WAL)
    #
    checkpoint_segments = 3     # in logfile segments (16MB each), min 1
    

    Restart postgres (service postgresql restart) or (/etc/init.d/postgres restart) so that the changes take effect.

Performance tuning resources:

more information about PostgreSQL

Vacuuming multiple databases

If you are frequently creating and dropping various databases, using this in your crontab can help simplify setup:

vacuumdb --all --verbose

 Debugging queries

You can work directly with the database to do debugging steps like looking directly at tables and testing stored procedures. Start emacs. Type M-x sql-postgres. Press enter for server name and use $OPENACS_SERVICE_NAME for database name. You can use C-(up arrow) and C-(down arrow) for command history.

Hint: "Parse error near *" usually means that an xql file wasn't recognized, because the Tcl file is choking on the *SQL* placeholder that it falls back on.

Next Page
previous November 2024
Sun Mon Tue Wed Thu Fri Sat
27 28 29 30 31 1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30

Popular tags

17 , 5.10 , 5.10.0 , 5.10.1 , 5.9.0 , 5.9.1 , ad_form , ADP , ajax , aolserver , asynchronous , bgdelivery , bootstrap , bugtracker , CentOS , COMET , compatibility , CSP , CSRF , cvs , debian , docker , docker-compose , emacs , engineering-standards , exec , fedora , FreeBSD , guidelines , host-node-map
No registered users in community xowiki
in last 30 minutes
Contributors

OpenACS.org