Michael Arnoldus | 1 Feb 2005 11:17
Picon

Embedded mode doesn't work in 1.51

I have just upgraded my application using Yaws in embedded mode to 1.51, and it doesn’t seem to be working. It claims it needs server restart. I am using the standard embedded mode example to start the server. It works perfectly in 1.50. This also seems to influence BTT, which does not work in 1.51.

 

Does anybody have any suggestions or should I just track this down myself?

 

Enjoy,

 

Michael Arnoldus

Michael Arnoldus | 1 Feb 2005 11:32
Picon

Improvements to the wiki

Hi,

 

I’m writing a system where the users should be able to extract lots of different data in different formats, and actually specify this as some kind of reports. The users of this system are technically proficient, but are not programmers. We are currently using a wiki (PHPwiki) to communicate, and they love the idea of a wiki.

 

My idea is to improve the Erlang wiki to be able to use a basis for this ‘report’ facility. I already found the plugin feature, which I think is very nice, and which I can use immediately to show my users some beginning of what could be possible. However the next step would be some improvements to the wiki, such as:

 

  • The ability to use markup to define forms. This would require some place to specify if the form should be POST or GET and where to post it and what function to call etc.

  • Moving the page layout to CSS instead of the heavy realiance on HTML tables. Currently the use of notes (the yellow ones) is nice, but looks ugly when you have more than one in one page. If we used CSS, it would be easy to separate the logical content in forms from the layout.

  • The addition of tables. Some simple wiki-markup to define tables, but more important, some simple way to display dynamic data in tables, through the plugin facility. I have recently found a very nice javascript module that makes it possible to sort by columns in HTML tables, just by clicking the relevant column header. This could make it for a very nice report thingy.

 

The disadvantage with these changes could be that it requires some newer version browsers.

 

What do you think? Does this belong in the generic wiki? Any other ideas?

 

Enjoy,

 

Michael Arnoldus

 

 

Attachment (smime.p7s): application/x-pkcs7-signature, 3280 bytes
Johan Bevemyr | 1 Feb 2005 12:51

Re: Improvements to the wiki

"Michael Arnoldus" <chime@...> wrote:
> *	Moving the page layout to CSS instead of the heavy realiance on HTML
> tables. Currently the use of notes (the yellow ones) is nice, but looks ugly
> when you have more than one in one page. If we used CSS, it would be easy to
> separate the logical content in forms from the layout.

Absolutely. I've been planning to move to an CSS implementation 
for some time but my bandwidth for Wiki works is very limited at
the moment. 

> *	The addition of tables. Some simple wiki-markup to define tables,
> but more important, some simple way to display dynamic data in tables,
> through the plugin facility. I have recently found a very nice javascript
> module that makes it possible to sort by columns in HTML tables, just by
> clicking the relevant column header. This could make it for a very nice
> report thingy.

Yes, possibly if we can find a nice way to integrate it. I've been thinking
about a similar calendar plugin.   

If you write the code I'll check it in :-) 

/Johan

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
Michael Arnoldus | 2 Feb 2005 13:59
Picon

RE: Embedded mode doesn't work in 1.51

I have found the bug in 1.51 embedded mode:

 

diff –r yaws-1.51/src/yaws_api.erl yaws-1.51a/src/yaws_api.erl

1711c1711

<          {true, false} when OLDGC#gconf.username == undefined ->

---

>          {true, false} when OLDGC == undefined; OLDGC#gconf.username == undefined ->

 

diff –r yaws-1.51/src/yaws_config.erl yaws-1.51a/src/yaws_config.erl

1115a1116,1117

>          Old == undefined ->

>                      true;

 

Will somebody please check that these fixes make sense, and check them in?

 

It makes the 1.51 work here …

 

Enjoy,

 

Michael Arnoldus

 

 

From: erlyaws-list-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:erlyaws-list-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Michael Arnoldus
Sent: 1. februar 2005 11:18
To: erlyaws-list-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Erlyaws-list] Embedded mode doesn't work in 1.51

 

I have just upgraded my application using Yaws in embedded mode to 1.51, and it doesn’t seem to be working. It claims it needs server restart. I am using the standard embedded mode example to start the server. It works perfectly in 1.50. This also seems to influence BTT, which does not work in 1.51.

 

Does anybody have any suggestions or should I just track this down myself?

 

Enjoy,

 

Michael Arnoldus

Attachment (smime.p7s): application/x-pkcs7-signature, 3280 bytes
Claes Wikstrom | 2 Feb 2005 15:09
Picon

Re: Embedded mode doesn't work in 1.51

> 
> Will somebody please check that these fixes make sense, and check them in? 
> 

Ok, looks ok, I'm also running embedded mode but don't
get OldGC to be undefined they way you do.
However, patch is ok and checked in.

> in 1.50. This also seems to influence BTT, which does not work in 1.51. 
> Does anybody have any suggestions or should I just track this down > > myself? 
> 

Tobbe ???

/klacke

-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
Michael Arnoldus | 2 Feb 2005 16:04
Picon

RE: Embedded mode doesn't work in 1.51

I am mystified.

To start yaws in embedded mode, I use the following function:

start() ->
	application:start(yaws),
	GC = yaws_config:make_default_gconf(false),
	SC = #sconf{port = 8888,
			listen = {0,0,0,0},
			docroot = "www"},
	yaws_api:setconf(GC, [[SC]]).

Almost exactly as taken from the example. When yaws is started in embedded
mode the internal gconf thingy will be set to 'undefined' as far as I can
see from the code.

Are you starting yaws embedded in some new and fancy way I need to know or
... ?

Anyway, thanks for checking (in) my changes!

Michael

-----Original Message-----
From: Claes Wikstrom [mailto:klacke@...] 
Sent: 2. februar 2005 15:10
To: Michael Arnoldus
Cc: erlyaws-list@...; olivier
Subject: Re: [Erlyaws-list] Embedded mode doesn't work in 1.51

> 
> Will somebody please check that these fixes make sense, and check them in?

> 

Ok, looks ok, I'm also running embedded mode but don't
get OldGC to be undefined they way you do.
However, patch is ok and checked in.

> in 1.50. This also seems to influence BTT, which does not work in 1.51. 
> Does anybody have any suggestions or should I just track this down > >
myself? 
> 

Tobbe ???

/klacke

Attachment (smime.p7s): application/x-pkcs7-signature, 3280 bytes
Bob.Smart | 10 Feb 2005 00:38
Picon
Picon
Favicon

RE: compiling btt

I figured out my yaws+btt problem: yaws writes
stuff into /tmp/yaws so you can't have two uses
for yaws on the one machine. [Yaws even has
problems with -check if it can't write to /tmp/yaws
and that is something you don't expect].

Is there a simple solution or do I need to hack
the code. If the latter: any advice would be
appreciated.

And now for my next problem. After 'make local'
I try to start:

$ ~/bin/btt -i -c ~/btt.conf

ip = {127,0,0,1}
port = 8337
docroot = "/home/btt/btt_local_install/www"
dbdir = "/home/btt/btt_local_install/db"
maildir = "/home/btt/btt_local_install/mail"
logdir = "/home/btt/btt_local_install/logs/btt"
cmd = false
cmd_ip = {127,0,0,1}
cmd_port = 9338
Eshell V5.4.3  (abort with ^G)
1> {"init terminating in
do_boot",{{badmatch,{error,need_restart}},[{btt_yaws,configure_yaws,0},{
btt_yaws,start,0},{init,start_it,1},{init,start_em,1}]}}

Crash dump was written to: erl_crash.dump
init terminating in do_boot ()

Bob

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
Claes Wikstrom | 10 Feb 2005 10:07
Picon

Re: compiling btt

On Thu, 10 Feb 2005 10:38:27 +1100, Bob.Smart@...
<Bob.Smart@...> wrote:
> I figured out my yaws+btt problem: yaws writes
> stuff into /tmp/yaws so you can't have two uses
> for yaws on the one machine. [Yaws even has
> problems with -check if it can't write to /tmp/yaws
> and that is something you don't expect].

Good detective work !!

This is a wellknown problem. Yaws has a flag "-I id" and a corresponding
config item "id" which address this.

So when running check from the makefiles for example, it's a good idea
to use the "id" feature 

as in the following extracts from a Makefile of mine:

YAWS=../../../yaws/bin/yaws
ID=check-${USER}
.SUFFIXES: .yaws-TS .yaws

%.yaws-TS: %.yaws
      r=`pwd`/../../../util/include; \
      $(YAWS)  \
        -I $(ID) -check $< $$r  || exit 1; \
        touch $<-TS

So, readup on the "id" flag in the manpages for "yaws" and "yaws.conf"
It is thus posible to run multiple yaws servers on the same box, but
they need to have different "id"s

The "id" is also used for the temorary filles under /tmp/yaws/*

> 
> Is there a simple solution or do I need to hack
> the code. If the latter: any advice would be
> appreciated.
> 

The solution for btt is probably to use a special "id" for btt only, such
as "btt-"${USER}  or something. This would then have to be set in the
btt code which populates the configuration records for embedded mode.

If "btt" doesn't do this, i.e. use the default "id" which b.t.w is "default"
the btt interacts with other yaws instances (including check) on the
same machine.

To clear all old shit, first stop all yaws'es and then as root:

# rm -rf /tmp/yaws

> And now for my next problem. After 'make local'
> I try to start:
> 
> $ ~/bin/btt -i -c ~/btt.conf
> 
> ip = {127,0,0,1}
> port = 8337
> docroot = "/home/btt/btt_local_install/www"
> dbdir = "/home/btt/btt_local_install/db"
> maildir = "/home/btt/btt_local_install/mail"
> logdir = "/home/btt/btt_local_install/logs/btt"
> cmd = false
> cmd_ip = {127,0,0,1}
> cmd_port = 9338

Hmmm, this may be related to a crash (+ bugfix/patch) sent to the list
by Michael Arnoldus on Wed Feb  2 13:14:09 2005 
     (Ahhh I do like bugreports that accompanied with a patch !!!)

He also had similar problems with embedded mode on 1.51 and found some
weird stuff. His fix is in CVS. (or you can dig it up from the archives)

(I was puzzled by his embedded problems because I'm myself running
 embedded mode on 1.51. I never had the time to figure out 
 the real reason for his problems though, and since the fix was  good ...
 regardless, I took it)

Cheers

/klacke

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Claes Wikstrom | 18 Feb 2005 21:37
Picon

1.53

New release 1.53 (and also never announced 1.52)

Go get relnotes at http://yaws.hyber.org

Cheers

/klacke

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Mikael Karlsson | 19 Feb 2005 11:31

Re: 1.53

The new feature that makes it possible to do config changes
without stopping a running system (that was introduced in 
version 1.51), is it for embedded Yaws, or can it be done
for a standalone server as well?

Regards
Mikael

Fri 18 Feb 2005 21:37 Claes Wikstrom wrote:
> New release 1.53 (and also never announced 1.52)
>
> Go get relnotes at http://yaws.hyber.org
>
> Cheers
>
> /klacke

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

Gmane