[ANN] Wee goes public

Hi,

Wee is another "Web Framework". My concentration was to get the core
right and light. It includes features from Seaside2, Iowa and Borges.

Note, that it's in no way complete, nor usable for anything other than
toy examples (due to very little code, it's probably stable, but
especially with the Html-generation stuff, there might be problems).

You can download the sources directly from viewcvs here:

  http://www.ntecs.de/viewcvs/viewcvs/Wee/

There are no dependencies. To get started change into the examples
directory and run example.rb, then point your browser to
http://localhost:2000/app/ and have fun, or play with it online here:

  http://ntecs.de/wee/counter

You can find some documentation on my blog.

  http://www.ntecs.de/blog/?cat=web

Any comments, bug fixes etc. very welcome!

Many thanks goes to Avi Bryant, who guided me into the right direction
by answering a lot of question. Thanks!

Regards,

  Michael

Or check it out:

  svn checkout svn://ntecs.de/public/Wee

Regards,

  Michael

···

On Thu, Oct 28, 2004 at 09:55:35PM +0900, Michael Neumann wrote:

Hi,

Wee is another "Web Framework". My concentration was to get the core
right and light. It includes features from Seaside2, Iowa and Borges.

Note, that it's in no way complete, nor usable for anything other than
toy examples (due to very little code, it's probably stable, but
especially with the Html-generation stuff, there might be problems).

You can download the sources directly from viewcvs here:

  http://www.ntecs.de/viewcvs/viewcvs/Wee/

Michael Neumann <mneumann@ntecs.de> wrote in message news:<20041028125530.GC2376@miya.intranet.ntecs.de>...

Hi,

Wee is another "Web Framework". My concentration was to get the core
right and light. It includes features from Seaside2, Iowa and Borges.

Note, that it's in no way complete, nor usable for anything other than
toy examples (due to very little code, it's probably stable, but
especially with the Html-generation stuff, there might be problems).

You can download the sources directly from viewcvs here:

  http://www.ntecs.de/viewcvs/viewcvs/Wee/

There are no dependencies. To get started change into the examples
directory and run example.rb, then point your browser to
http://localhost:2000/app/ and have fun, or play with it online here:

<snip>

I did this on my Windows XP box. The first time it worked fine. But,
Ctrl-C wouldn't work when I wanted to kill it. So, I pulled up the
Task Manager and killed it that way.

However, when I tried starting it again I got this error:

C:\ruby\src\Wee\examples>ruby example.rb
.../lib/wee/application.rb:57:in `load': marshal data too short
(ArgumentError)
        from ../lib/wee/application.rb:57:in `load_from_disk'
        from example.rb:262

Any ideas?

Regards,

Dan

Yes. By default, when you shutdown the application/webserver, all data
is marshalled to disk (the complete session state etc.), and next time,
it is load's from this file.

This file is probably corrupted.

Hm, Ctrl-C doesn't work on FreeBSD, too. Or it takes a lot of time until
the program finally shuts down. That's a problem of WEBrick.

Just delete the file "dump" if it exists. And run the program again.

Regards,

  Michael

···

On Fri, Oct 29, 2004 at 04:23:59AM +0900, Daniel Berger wrote:

Michael Neumann <mneumann@ntecs.de> wrote in message news:<20041028125530.GC2376@miya.intranet.ntecs.de>...
> Hi,
>
> Wee is another "Web Framework". My concentration was to get the core
> right and light. It includes features from Seaside2, Iowa and Borges.
>
> Note, that it's in no way complete, nor usable for anything other than
> toy examples (due to very little code, it's probably stable, but
> especially with the Html-generation stuff, there might be problems).
>
> You can download the sources directly from viewcvs here:
>
> http://www.ntecs.de/viewcvs/viewcvs/Wee/
>
> There are no dependencies. To get started change into the examples
> directory and run example.rb, then point your browser to
> http://localhost:2000/app/ and have fun, or play with it online here:

<snip>

I did this on my Windows XP box. The first time it worked fine. But,
Ctrl-C wouldn't work when I wanted to kill it. So, I pulled up the
Task Manager and killed it that way.

However, when I tried starting it again I got this error:

C:\ruby\src\Wee\examples>ruby example.rb
.../lib/wee/application.rb:57:in `load': marshal data too short
(ArgumentError)
        from ../lib/wee/application.rb:57:in `load_from_disk'
        from example.rb:262

Any ideas?

this shouldn't happen using pstore right? it's transaction should work
correctly under all conditions except nfs, power failure, etc. or isn't this
being used?

cheers.

-a

···

On Fri, 29 Oct 2004, Michael Neumann wrote:

Any ideas?

Yes. By default, when you shutdown the application/webserver, all data
is marshalled to disk (the complete session state etc.), and next time,
it is load's from this file.

This file is probably corrupted.

--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
When you do something, you should burn yourself completely, like a good
bonfire, leaving no trace of yourself. --Shunryu Suzuki

===============================================================================

Yes, I probably should (and will) use pstore. But corruption has never
occured on my system. Might be a Windows related problem?

Well, I don't know too much about signals unter Unix...

This is what I do:

  trap("INT") {
    trap("INT", "IGNORE")
    server.shutdown # shut WEBrick down
    self.shutdown # shut's the application down (calls store_to_disk)
  }

Btw, does anybody knows why WEBrick needs so long to shut down? Is this
socket related?

Regards,

  Michael

···

On Fri, Oct 29, 2004 at 05:43:59AM +0900, Ara.T.Howard@noaa.gov wrote:

On Fri, 29 Oct 2004, Michael Neumann wrote:

>>
>>Any ideas?
>
>Yes. By default, when you shutdown the application/webserver, all data
>is marshalled to disk (the complete session state etc.), and next time,
>it is load's from this file.
>
>This file is probably corrupted.

this shouldn't happen using pstore right? it's transaction should work
correctly under all conditions except nfs, power failure, etc. or isn't
this
being used?

Michael Neumann ha scritto:

Yes, I probably should (and will) use pstore. But corruption has never
occured on my system. Might be a Windows related problem?

maybe the usual lack of the binaty flag on file operations?

I'm not sure, but I've seen the same thing on my WinXP box. I ended up
putting in something like:

trap("INT") {
server.shutdown
exit
}

and that seemed to work most of the time...

Yours,

Tom

···

On Thu, 2004-10-28 at 17:29, Michael Neumann wrote:

Btw, does anybody knows why WEBrick needs so long to shut down? Is this
socket related?

Oh yeah, that's it. Thanks very much.

Regards,

  Michael

···

On Fri, Oct 29, 2004 at 07:18:59AM +0900, gabriele renzi wrote:

Michael Neumann ha scritto:

>
>Yes, I probably should (and will) use pstore. But corruption has never
>occured on my system. Might be a Windows related problem?

maybe the usual lack of the binaty flag on file operations?

Michael Neumann ha scritto:

maybe the usual lack of the binaty flag on file operations?

Oh yeah, that's it. Thanks very much.

nice to be useful :slight_smile:
I wonder why we can't imply the flag for any operation. This seem to be the most common problem in any project developed for windows.