On Mon, Jan 5, 2009 at 5:02 PM, Anthony Buck <[email protected]> wrote:

> Ooh i will have to have a play...

Yes please do - you may need some help on getting Wt::Ruby to build. Some
documentation is needed, but there are plenty of the Wt examples translated
to Ruby and I hope it should be reasonably self explanatory.


>
>
>     Came to wt due to frustration with rails :) Coding up a wt app in ruby
> sounds like an interesting proposition :) How do you deal with delayed
> construction (i.e. as seen in tab widgets on the wt-homepage example?)

See the code in ruby/wtruby/examples/wt-homepage/home.rb. That isn't really
part of Wt itself and so it was just a matter of converting the C++ code to
Ruby. I would be very interested in what frustrated you about Rails and why
you prefer Wt.


>
> If you could keep us all up to date on the scalability of the system that
> would be fabulous too... Scalability is defiantly one of the biggest issues
> with wt generally though... Hence why a java version, lying on top of
> terracotta would be so awesome :)

As I haven't quite got fastcgi working with Wt::Ruby yet I still don't
really know. You can't use the wthttp library with threads with Ruby 1.8.x
and you need to build it with multithreading disabled. I'm not sure if I
like having lots of threads in an application anyway, as it make the whole
thing a bit fragile if a single thread can take down all the rest, losing
their state.


>
>
> As for fcgi... I use lighttpd and fcgi is a breeze, think there is an
> example confg somwhere in the mailing list archive too!

OK, I must have a look - I've only just got as far as getting the wtfcgi
Ruby extension to build.


>
>
> 2009/1/5 Richard Dale <[email protected]>
>
>>
>>
>> On Mon, Jan 5, 2009 at 3:51 PM, Koen Deforche <[email protected]> wrote:
>>
>>> Hey Richard,
>>>
>>> 2009/1/5 Richard Dale <[email protected]>:
>>> > We (Foton Sistemas Inteligentes) develop custom applications for
>>> customers
>>> > using mostly Rails. Personally, I find Rails a bit too low level as it
>>> > involves a lot of raw HTML coding with ruby embedded in it (ie
>>> *.html.erb
>>> > sources). Rails also doesn't work well (in my opinion) for developing
>>> > applications like gmail which are really 'web page based', but more
>>> like
>>> > desktop apps. So I thought it would be nice to have an api to develop
>>> these
>>> > sort of applications in, even if Wt::Ruby might not scale as well with
>>> > FastCgi, as Rails does.
>>>
>>> Do you suspect Wt::Ruby will not scale very well with FastCGI because
>>> of the Wt::Ruby layer or rather because of Wt itself (i.e. memory
>>> usage) ?
>>
>> Each process with Ruby uses 3-4 Mb of non-shared memory. I don't think
>> that will be a problem in practice which is why I say 'might not' in the
>> comment above. But the other guys who I work with see it as a possible
>> problem and they think the Rails style 'shared nothing' approach is better.
>> Until we've tried Wt::Ruby with actual applications it is difficult to say.
>>
>> I did some tests on the mill used by Wt with Ruby bindings and it is
>> pretty low. A Wt::Ruby based web application running on a slow machine like
>> the Nokia N810 internet tablet, uses neglibable mill. So I don't think there
>> is much overhead in mill terms for Ruby, only in the larger size of the Wt
>> processes.
>>
>>
>>>
>>> >     if ENV['WT_ENV'] == 'production'
>>> >       require 'wtfcgi'
>>> >     elsif ENV['WT_ENV'] == 'development'
>>> >       require 'wthttp'
>>> >     end
>>>
>>> Really nice!
>>>
>>> > But I don't know anything about how to set up Apache2 to use fast cgi
>>> yet.
>>> > My install of apache2 has config files named differently from the docs
>>> in
>>> > Wt. So I haven't actually got the C++ Wt hello world working yet, but
>>> I'm
>>> > pretty sure that the Ruby one will work too once I do.
>>>
>>> What linux distro are you using?
>>
>> I use Kubuntu. From the Wt docs:
>>
>> "Treat the example as a mod_fastcgi application, by adding a line to
>> 20_mod_fastcgi.conf in your Apache configuration modules.d/ directory, e.g.:
>>
>>
>>     FastCgiServer
>> /var/www/localhost/htdocs/wt-examples/composer/composer.wt
>> "
>>
>> I have these fastcgi config files:
>>
>> /etc/apache2/mods-enabled/fastcgi.conf
>> /etc/apache2/mods-enabled/fastcgi.load
>> //etc/apache2/mods-available/fastcgi.conf
>> /etc/apache2/mods-available/fastcgi.load
>>
>> I tried adding a line like that for hello.wt to mods-enabled/fastcgi.conf,
>> and entered a url of wt-examples/hello/hello.wt but it didn't work.
>>
>> -- Richard
>>
>>
>>
>> ------------------------------------------------------------------------------
>>
>> _______________________________________________
>> witty-interest mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> witty-interest mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
------------------------------------------------------------------------------
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to