yaws

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

yaws

Claes Wikström

Howdy folks,

I've just started a little late-night-hack webserver project.
I've come quite some distance in just a little while and it looks
good.

The reason I started was that
I found myself in a position where I had to write a little dynamic
content website and I discovered that php sucks bigtime.

So hence, we have http://yaws.hyber.org


Lot's of work left to be done, and you are all welcome to take a
look at http://yaws.hyber.org/todo.yaws

Tarball is at  http://yaws.hyber.org/download

Cheers

/klacke



--
Claes Wikstrom                        -- Caps lock is nowhere and
http://www.hyber.org                  -- everything is under control          


Reply | Threaded
Open this post in threaded view
|

yaws

Joe Williams-2

Well done klacke, brilliant.

I had a few ideas for extensions :-)
 
    a) make the server into a mutil-protocol server
        i.e now it's HTML request -> HTML reply

        Suppose it could handle SOAP request -> SOAP reply
        synchronously with the HTML requests (and say SNMP)
        or even Erl rpc :-)

         Then you could use the server as a regular HTTP/HTML machine
          but manage it out of band (so to speak) with SOAP or XMLRPC
         requests.

    b) Add the notion of small peer groups - when we do things like IRC
instant messaging etc. we have to connect to a central server - but most of
the time
the peer group could "detach" itself from the cenral server -
suppose I (joe) wants to "chat" to you (Klacke) why do I need ICQ/MSN/AOL
to introduce us - I have a permanent IP - that's all that's needed :-)
it would be nice if clients that connected to the sever could become part of
the server itself .... (though a soap channel, or an erl channel) ... and then
detach themselves ...

     I'll have to take a look at the code :-)

    /Joe





Reply | Threaded
Open this post in threaded view
|

yaws

Ulf Wiger-4
On Tue, 12 Feb 2002, Joe Armstrong wrote:

>
>Well done klacke, brilliant.
>
>I had a few ideas for extensions :-)
>
>    a) make the server into a mutil-protocol server
>        i.e now it's HTML request -> HTML reply
>
>        Suppose it could handle SOAP request -> SOAP reply
>        synchronously with the HTML requests (and say SNMP)
>        or even Erl rpc :-)

For what it's worth, that's exactly why I started working on
XMErl and its export feature. I'd been building dynamic
content web servers, and the idea was to be able to work
with simple tagged tuples internally, and let the session handler
keep track of what the external representation should look like.
(http://www.erlang.se/euc/00/xmerl.ppt)

Erl rpc would of course be trivial, since the handlers could
define their own data structures (sticking to the {Tag,Args,Data}
format).  Then, context-sensitive export/mapping functions could
map to real XML, HTML, or something else.

I haven't yet verified that the model works well in practice, but
other nice people (e.g. Richard C and Johan B) seem to be busy
fixing things so that it actually becomes useable. (:

I like the <erl>...</erl> stuff. Neat.

/Uffe




Reply | Threaded
Open this post in threaded view
|

yaws

Willem Broekema
In reply to this post by Claes Wikström
Claes Wikstrom wrote:
 > Howdy folks,
 >
 > I've just started a little late-night-hack webserver project.
 > I've come quite some distance in just a little while and it looks
 > good.
 >
 > The reason I started was that
 > I found myself in a position where I had to write a little dynamic
 > content website and I discovered that php sucks bigtime.

Right now you seem to create a template-based file-based web server.

If you want to aim for something bigger, consider making it similar to
Zope, an open-source web application server written in Python,
<http://zope.org>, by adding a persistent storage for Erlang terms, maybe
using Mnesia? Can Mnesia store hierarchical data? In that case you can set
the server up to let server.com/folder1/folder2/term refer to the Erlang
term located in f1/f2. The storage can support transactions, undo etc (I'm
sure I have read Mnesia supports that).

Right now the templates do not work well together with WYSIWYG HTML
editors. Zope has solved this by using the attributes of standard HTML tags
instead of new <erl> tags. In a separate XML namespace, template commands
are included.

See Zope's Template Attribute Language
<http://dev.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4>,
which is part of the functionality of Zope Page Templates,
<http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage>. I think their
solution is quite neat and elegant, better than the current <erl> syntax.


- Willem, satisfied amateur Zope user :-)



Reply | Threaded
Open this post in threaded view
|

yaws

Claes Wikström
On Tue, Feb 12, 2002 at 12:53:41PM +0100, Willem Broekema wrote:

> Claes Wikstrom wrote:
>  > Howdy folks,
>  >
>  > I've just started a little late-night-hack webserver project.
>  > I've come quite some distance in just a little while and it looks
>  > good.
>  >
>  > The reason I started was that
>  > I found myself in a position where I had to write a little dynamic
>  > content website and I discovered that php sucks bigtime.
>
> Right now you seem to create a template-based file-based web server.
>
> If you want to aim for something bigger, consider making it similar to
> Zope, an open-source web application server written in Python,

Actually it is allready an application server, it's just that
the pages that show up on yaws.hyber.org don't do anything more
fancy that including other files. Nothin there that plain ssi can't
do.

However, the erlang code that gets evaluated can do anything it wants.

> <http://zope.org>, by adding a persistent storage for Erlang terms, maybe
> using Mnesia? Can Mnesia store hierarchical data? In that case you can set
> the server up to let server.com/folder1/folder2/term refer to the Erlang
> term located in f1/f2. The storage can support transactions, undo etc (I'm
> sure I have read Mnesia supports that).

This already doable. I'll add some more fancy examples to make
this more clear.

>
> Right now the templates do not work well together with WYSIWYG HTML
> editors.

This is indeed correct, and maybe I should be using one of those since
Vlad pointed out that my HTML was bad, I may need it .... :-)

> Zope has solved this by using the attributes of standard HTML tags
> instead of new <erl> tags. In a separate XML namespace, template commands
> are included.
>
> See Zope's Template Attribute Language
> <http://dev.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4>,
> which is part of the functionality of Zope Page Templates,
> <http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage>. I think their
> solution is quite neat and elegant, better than the current <erl> syntax.
>
>


Ok, thanks, I'll take a look at those.




--
Claes Wikstrom                        -- Caps lock is nowhere and
Alteon WebSystems                     -- everything is under control          
http://www.bluetail.com/~klacke     
cellphone: +46 70 2097763


Reply | Threaded
Open this post in threaded view
|

yaws

Thomas Lindgren-3

For interesting extensions, or some inspiration, have a look at
http://www.aolserver.com

Seems like a natural application for Erlang, except it's written in ...
threaded TCL :-)

(Somebody has already done a plug-in http://www.smlserver.com, by the way.)

-- Thomas

-----Original Message-----
From: owner-erlang-questions
[mailto:owner-erlang-questions]On Behalf Of Klacke
Sent: den 12 februari 2002 13:38
To: Willem Broekema
Cc: erlang-questions
Subject: Re: yaws


On Tue, Feb 12, 2002 at 12:53:41PM +0100, Willem Broekema wrote:

> Claes Wikstrom wrote:
>  > Howdy folks,
>  >
>  > I've just started a little late-night-hack webserver project.
>  > I've come quite some distance in just a little while and it looks
>  > good.
>  >
>  > The reason I started was that
>  > I found myself in a position where I had to write a little dynamic
>  > content website and I discovered that php sucks bigtime.
>
> Right now you seem to create a template-based file-based web server.
>
> If you want to aim for something bigger, consider making it similar to
> Zope, an open-source web application server written in Python,

Actually it is allready an application server, it's just that
the pages that show up on yaws.hyber.org don't do anything more
fancy that including other files. Nothin there that plain ssi can't
do.

However, the erlang code that gets evaluated can do anything it wants.

> <http://zope.org>, by adding a persistent storage for Erlang terms, maybe
> using Mnesia? Can Mnesia store hierarchical data? In that case you can set
> the server up to let server.com/folder1/folder2/term refer to the Erlang
> term located in f1/f2. The storage can support transactions, undo etc (I'm
> sure I have read Mnesia supports that).

This already doable. I'll add some more fancy examples to make
this more clear.

>
> Right now the templates do not work well together with WYSIWYG HTML
> editors.

This is indeed correct, and maybe I should be using one of those since
Vlad pointed out that my HTML was bad, I may need it .... :-)

> Zope has solved this by using the attributes of standard HTML tags
> instead of new <erl> tags. In a separate XML namespace, template commands
> are included.
>
> See Zope's Template Attribute Language
>
<http://dev.zope.org/Wikis/DevSite/Projects/ZPT/TAL%20Specification%201.4>,
> which is part of the functionality of Zope Page Templates,
> <http://dev.zope.org/Wikis/DevSite/Projects/ZPT/FrontPage>. I think their
> solution is quite neat and elegant, better than the current <erl> syntax.
>
>


Ok, thanks, I'll take a look at those.




--
Claes Wikstrom                        -- Caps lock is nowhere and
Alteon WebSystems                     -- everything is under control
http://www.bluetail.com/~klacke
cellphone: +46 70 2097763



Reply | Threaded
Open this post in threaded view
|

yaws

Claes Wikström
In reply to this post by Claes Wikström

Ok, minor update. 0.21 now.
Should fix the broken HTML as well as some other minor stuff.
http://yaws.hyber.org


--
Claes Wikstrom                        -- Caps lock is nowhere and
Alteon WebSystems                     -- everything is under control          
http://www.bluetail.com/~klacke     
cellphone: +46 70 2097763