Re: [Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-12-08 Thread Sophana K
My tasks do not access the sessions. (Why would they?)
As it is a new behaviour, (I was using 0.9) a look at the changes could
help...
Could it be the scheduler instances sharing some global task lists?


On Fri, Dec 7, 2012 at 2:38 PM, Christoph Zwerschke  wrote:

> Am 07.12.2012 12:16, schrieb Sophana K:
> > Yes, I'm creating a Scheduler instance.
> > I didn't know I was supposed to use the one from the application.
>
> It's ok to create your own instance. But then the two schedulers will
> run as two parallel threads which needs more ressources and you can get
> these race conditions if both schedulers have tasks which access the
> session store. It's also convenient to use the application.taskManager()
> because it's started and stopped automatically together with the
> application.
>
> > Is it normal that a scheduler instance automatically does session
> sweeping?
> > Shouldn't the application create the task explicitely?
>
> But that's excactly how it works. The application creates its own
> scheduler, and then adds just one task, the one which is used for
> session sweeping. You can replace that task with your own or add more
> tasks if you like.
>
> > I have now fixed my code to use the existing scheduler.
> > Shouldn't you remove the previous fixes then?
>
> The fixes are still helpful in case anybody changes the session store
> for whatever maybe valid reasons.
>
> It's still unclear to me what caused your problems: Do your own tasks
> modify the session store? Then that's the explanation, because you ran
> them in a parallel scheduler. If your own tasks don't change the
> session, then you must continue searching for the error cause. It looks
> like the session sweeper thread somehow was duplicated, but how this
> happens is unclear to me without seeing your code. If you just create
> your own Scheduler instance, this should not happen.
>
> -- Christoph
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-12-07 Thread Sophana K
Yes, I'm creating a Scheduler instance.
I didn't know I was supposed to use the one from the application.
Is it normal that a scheduler instance automatically does session sweeping?
Shouldn't the application create the task explicitely?

I have now fixed my code to use the existing scheduler.
Shouldn't you remove the previous fixes then?

Thanks for the hint.



On Thu, Dec 6, 2012 at 12:23 PM, Christoph Zwerschke  wrote:

> Am 06.12.2012 10:59, schrieb Sophana K:
> > I have some tasks scheduled every 30m and 24h.
> > I did nothing special about the session sweeper. Are they related to
> > taskKit?
>
> The session sweeper thread is started by the Application instance using
> its own instance of the TaskKit scheduler, available as
> Application.taskManager(). Do you use that scheduler instance or do you
> use your own? To me it looks as if you're either running the session
> sweeper twice or one of your tasks is doing something with the session
> store of the application. Otherwise you shouldn't see that error.
>
> -- Christoph
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-12-06 Thread Sophana K
I have some tasks scheduled every 30m and 24h.
I did nothing special about the session sweeper. Are they related to
taskKit?


On Fri, Nov 30, 2012 at 6:28 PM, Christoph Zwerschke  wrote:

> Am 30.11.2012 18:01, schrieb Sophana K:
> > Isn't it strange nobody had this problem before? Seems that there
> > isn't a lot of webware 1.1 applications in production. Don't you
> > think?
>
> That problem should not appear in practice unless you have somehow two
> session sweeper tasks running at the same time. Are you doing anything
> special in this regard? I'm running Webware 1.1 apps with many users
> which use sessions heavily, and I've never seen this issue.
>
> -- Christoph
>
> (Sorry, my mailer just sent an empty reply.)
>
>
> --
> Keep yourself connected to Go Parallel:
> TUNE You got it built. Now make it sing. Tune shows you how.
> http://goparallel.sourceforge.net
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Using SVN head in production environment

2012-12-06 Thread Sophana K
Hi

Looking at the svn logs, it looks like the changes are quite minor since
the 1.1 release.
I think most of them correspond to some bugs reported in this mailing list.


On Thu, Dec 6, 2012 at 10:34 AM, Andreas Poisel  wrote:

> Hi!
>
> I've been using the svn head on a test system for a while now without
> any problem.  Would you object using svn head in a production
> environment?
>
> Thank you!
> --
> Bye, Andreas
>
>
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-11-30 Thread Sophana K
Thanks

Isn't it strange nobody had this problem before?
Seems that there isn't a lot of webware 1.1 applications in production.
Don't you think?

Sophana


On Fri, Nov 30, 2012 at 5:36 PM, Christoph Zwerschke  wrote:

> Am 30.11.2012 13:48, schrieb Sophana K:
> > It seems the problem has now moved to another place.
> > Should I try the trunk?
> >
> >   File "/home/.../Webware-1.1/WebKit/Tasks/SessionTask.py", line 13, in
> run
> >  self._sessionstore.cleanStaleSessions(self)
> >File "/home/.../Webware-1.1/WebKit/SessionDynamicStore.py", line 256,
> in cleanStaleSessions
> >  self._memoryStore.cleanStaleSessions(task)
> >File "/home/.../Webware-1.1/WebKit/SessionStore.py", line 202, in
> cleanStaleSessions
> >  for key in self:
> > RuntimeError: dictionary changed size during iteration
>
> Same problem. It's now also fixed in the trunk.
>
> -- Christoph
>
>
>
>
>
>
>
> --
> Keep yourself connected to Go Parallel:
> TUNE You got it built. Now make it sing. Tune shows you how.
> http://goparallel.sourceforge.net
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-11-30 Thread Sophana K
It seems the problem has now moved to another place.
Should I try the trunk?

 File "/home/.../Webware-1.1/WebKit/Tasks/SessionTask.py", line 13, in run
self._sessionstore.cleanStaleSessions(self)
  File "/home/.../Webware-1.1/WebKit/SessionDynamicStore.py", line
256, in cleanStaleSessions
self._memoryStore.cleanStaleSessions(task)
  File "/home/.../Webware-1.1/WebKit/SessionStore.py", line 202, in
cleanStaleSessions
for key in self:
RuntimeError: dictionary changed size during iteration



On Wed, Nov 28, 2012 at 12:56 PM, Christoph Zwerschke wrote:

> Am 28.11.2012 12:10, schrieb Sophana K:
> > Look like another thread could be changing the _memoryStore during
> > this iteration. Should I change to
>  > for key in list(self._memoryStore):
>
> Yes, this or "for key in self._memoryStore.keys()" should fix it. I have
> already committed this as a fix to the trunk.
>
> -- Chris
>
>
> --
> Keep yourself connected to Go Parallel:
> INSIGHTS What's next for parallel hardware, programming and related areas?
> Interviews and blogs by thought leaders keep you ahead of the curve.
> http://goparallel.sourceforge.net
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
--
Keep yourself connected to Go Parallel: 
TUNE You got it built. Now make it sing. Tune shows you how.
http://goparallel.sourceforge.net___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] RuntimeError: dictionary changed size during iteration

2012-11-28 Thread Sophana K
Hi

I just upgraded to webware-1.1, and get some errors (about every day) in
the session dynamic store intervalSweep method.

Here is the traceback
 File "/home/sophana/src/env1/Webware-1.1/WebKit/Tasks/SessionTask.py",
line 13, in run
self._sessionstore.cleanStaleSessions(self)
  File "/home/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py",
line 264, in cleanStaleSessions
self.intervalSweep()
  File "/home/sophana/src/env1/Webware-1.1/WebKit/SessionDynamicStore.py",
line 288, in intervalSweep
for key in self._memoryStore:
RuntimeError: dictionary changed size during iteration

Look like another thread could be changing the _memoryStore during this
iteration.
Should I change to
for key in list(self._memoryStore):
?

Regards
Sophana
--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] webware gevent based appServer

2012-09-20 Thread Sophana K
I will give a try again with webware 1.1
It works, but not for a long time...

python3 doesn't look like a priority for me. (I admit I had some hard
time with unicode...)
Backward compatibility for webkit is the most important IMHO.
About naming convention, I don't care that much.
I'm not using plugins. A little bit of TaskKit (not a big deal)

Migrating to more modern server architectures is a big plus for me:
more scalability, comet, etc...

If it is possible to just use WebKit compatibility in order to
integrate more easily with other python libraries, it would be great.

Sophana

On Wed, Sep 19, 2012 at 8:07 PM, Christoph Zwerschke  wrote:
> Am 19.09.2012 18:13, schrieb NoRaGen:
>> It would be nice to have the option to upgrade to a python3.x Version
>> of Webware for later purpose.
>
> Definitely, that has also been one of my goals for a new version.
>
>  > Compatiblity should be given so, that API remains the same, but
>  > using python3.x capability. This should be possible, I think. API
>  > changes would very bad at all.
>
> The problem here is that Webware development started even before Python
> 2, so the old API is very old-fashioned concerning naming conventions,
> use of getters and setters etc. My idea was to add a tool like py2to3
> that can convert an old style Webware app to a new style app.
>
> Another idea would be to allow both styles. E.g. request could become a
> property, but if you call the request object, then it returns self, so
> if you use request as a getter function, it would still work. We already
> discussed this in the past. Method names could be changed from camelCase
> to PEP8 style, but the old names could be kept as aliases.
>
>> However we use many modules where still no python3 port is existing.
>> For now, switching to higher python version, would still not
>> effective for us.
>
> Yes, e.g. ReportLab is still one of the roadblockers.
>
> -- Chris
>
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://ad.doubleclick.net/clk;258768047;13503038;j?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] webware gevent based appServer

2012-09-17 Thread Sophana K
Hi

I'm using webware for my website since 2007.
I'm using webware 1.0, because webware 1.1 didn't work correctly for
me (I don't remember why)

I'm currently trying to debug a freeze problem that occur every 1 to 3 weeks.
The python appServer process is completely frozen, and must be killed with -9.
It doesn't respond to any signal, so I can't dump its stack, and
really don't know the cause
strace shows that python is waiting on a futex.

I still have some actions to do in my investigations like:
- rebooting the server which is up since 620 days...
- separating the custom radius server I made which is launched in the
same process in several new threads. (I didn't know about the GIL at
that time...)
- reverting to webware 0.9

I intend to use gevent for the radius server, because I like it.
I would also like to use comet services for the web application, which
brings me to my question:
I've seen that there is a WSGI adapter that connects to the appServer.
Is it possible to wrap a webware application in a real WSGI handler?
This would allow to use webware applications under modern servers like
gevent (gunicorn) and why not google app engine.
The threaded app server is no more adapted to modern web techniques. A
gevent based appServer would be so great!
libraries like gevent-zeromq and gevent-socketio would be so nice to have.

Gevent is able to wrap standard python libraries (monkey patching) and
make standard code greenlet compatible, so I'm not sure the wsgi
wrapper would be complicated to do.

I have started to look inside the appServer. I don't know where to start.
There are quite some code that initializes different modules and
things like that.
In gevent, the idea is to spawn a greenlet for every new transaction.
I'm not sure there is a pool of workers.

Thanks for reading.

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] bug in UnknownFileTypeServlet.py (guess_type multithread)

2010-09-24 Thread Sophana KOK
Hi

I tested webware 1.0.2 on python 2.6.2 (fedora 12) and came into a bug
that I could find.
from python 2.6 guess_type implementation doesn't support multi threading.
The symptom is an infinite recursion exception on guess_type when it
is called concurrently

Looking in webware trunk I could see it that the exception is catched:


try:
mimeType, mimeEncoding = guess_type(filename, False)
except Exception:
mimeType = None

I'm not sure this is a good method because python does make an
infinite recursion before sending the exception.
Maybe it is better to prevent it, just by using a mutex:

from threading import Lock
guess_type_lock=Lock()


...

with guess_type_lock:
mimeType, mimeEncoding = guess_type(filename, False)

This works fine for me.

Thanks

--
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] webware and webware application packaging

2008-03-07 Thread Sophana
Hi

I'm using webware and am very happy with it.
However, I think webware packaging should be "more standard"
I think it becomes necessary to have easyinstall, rpm or debian packages
of webware

The same for webware applications, the application context is not
packageable, as it has direct pathnames to the webware installation.
What about compatibility between applications and webware versions...

I've read on this list that there were effort made for this, what is the
status?

packaging is important if you want to see open source projects using
webware...

Today, I know very very few applications available for webware.

When looking at python paste, it looks completely different

Regards


-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue bug found

2007-09-04 Thread Sophana
Christoph Zwerschke a écrit :
> Sophana wrote:
>   
>> I reverted to 0.9.2 because of the cookie clear bug which I couldn't
>> find a workaround.
>> 
>
> If you provide a test case for that bug, I'll try to fix it in the next 
> version.
>
>   
>>> But this would be redirected to /wk/wk/* and not work anyway?
>>>   
>> No, in my case I only redirect / (^/$) with [PT] rewriting (Pass Through)
>> Other urls are not redirected.
>> 
>
>   
>> Here is the rewrite rule (apache 2):
>>
>> RewriteEngine on
>> RewriteRule ^/$ /wk/Main [PT]
>> 
>
> Ok. I thought you used something like
>
> RewriteRule ^/(.*) /wk/$1 [L,PT]
>
> In your case, since you have to servlet paths, you need to use the least 
> common path, i.e. set CookiePath explicitly to '/'.
>
> Maybe we should make '/' the default CookiePath again instead of None 
> (automatic determination)? This is less secure, but at least it will 
> always work (Microsoft policy ;-) This issue has already caused too much 
> confusion in the past.
>
>   
Could you tell us more about this security problem?


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] response().delCookie() doesn't work anymore in 0.9.4

2007-08-30 Thread sophana
Christoph Zwerschke a écrit :
> Sophana wrote:
>   
>> simple:
>> self.response().delCookie('cookieName')
>> works in 0.9.2
>> doesn't work in 0.9.4 (cookie creation works)
>> 
>
> Hm, this is working for me in 0.9.4.
>
> I tried with
> self.response().setCookie('mycookie', 'myvalue')
> in one servlet - the cookie was there, and then
> self.response().delCookie('mycookie')
> in another servlet - the cookie was gone.
>
> -- Chris
>   
Did you try with an url rewrite rule?
Maybe the one I have?

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] response().delCookie() doesn't work anymore in 0.9.4

2007-08-30 Thread Sophana
Christoph Zwerschke a écrit :
> sophana wrote:
>   
>> I have the same application over 4 servers, 2 have webware 0.9.4 with 
>> fedora core 6, the others have webware 0.9.2 with centos4.
>> With 0.9.2 delCookie works, but no more with 0.9.4
>> The created cookie is the same in both cases (the path is /)
>> Is it related to the session cookie path modification?
>> 
>
> There was a problem with delCookie in 0.9.3 but that should have been 
> fixed in 0.9.4 (r6559(. Can you explain more exactly what you're doing 
> or provide a test case?
>   
simple:
self.response().delCookie('cookieName')
works in 0.9.2
doesn't work in 0.9.4 (cookie creation works)

I don't know how to debug that...


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue bug found

2007-08-30 Thread Sophana
Christoph Zwerschke a écrit :
> Sorry for the late answer, I was offline was some weeks.
>
> sophana wrote:
>   
>> Now looking at firefox cookie list, when I go to my server root url, I
>> get a SID cookie with the path set to //
>> 
>
> This is a bug. It should only be '/'. I have already fixed it in the 
> trunk. Can you try again with the HTTPRequest module from SVN?
> http://svn.w4py.org/Webware/trunk/WebKit/HTTPRequest.py
>
>   
I reverted to 0.9.2 because of the cookie clear bug which I couldn't
find a workaround.
I'll try when I get some time on the devel server.
>> When I go to another /wk/* url I get another cookie
>> 
>
> But this would be redirected to /wk/wk/* and not work anyway?
>
>   
No, in my case I only redirect / (^/$) with [PT] rewriting (Pass Through)
Other urls are not redirected.
>> I think the default cookie path should not depend on the path before
>> going through mod_rewrite but the destination path : /wk/
>> 
>
> The problem is that the cookie path is evaluated by the browser, so you 
> need to set it to the path *before* rewriting takes place.
>
> Can you let me know whether the latest HTTPRequest module solves the 
> problem? If not, can you send me your Apache config so I can reproduce 
> the problem?
>
>   
As I said I reverted.

Here is the rewrite rule (apache 2):

RewriteEngine on
RewriteRule ^/$ /wk/Main [PT]
 
Thanks for your support.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] response().delCookie() doesn't work anymore in 0.9.4

2007-08-18 Thread sophana
Hi

I have the same application over 4 servers, 2 have webware 0.9.4 with 
fedora core 6, the others have webware 0.9.2 with centos4.

With 0.9.2 delCookie works, but no more with 0.9.4

The created cookie is the same in both cases (the path is /)
Is it related to the session cookie path modification?

Anyone knows a workaround?

Thanks

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] How to prevent a session creation?

2007-08-04 Thread sophana
Chuck Esterbrook a écrit :
> On 8/4/07, sophana <[EMAIL PROTECTED]> wrote:
>   
>> Hi
>>
>> While trying to debug my webware application, I tried to stress it with
>> a simple wget loop.
>> I saw that memory was increasing.
>> After searching a little, I found out that it was webware sessions that
>> were growing up to the max dynamic session limit.
>> Using cookie option of wget made no more session creation...
>>
>> My application set a session variable at each visit.. So I though it is
>> a normal behaviour.
>> But I have a page which is dedicated to monitoring. I thought that by
>> making the monitoring servlet a subclass of Page, webware would no more
>> allocate a new session at each wget access.
>> But it does allocate a session at each wget access!
>> Is it normal that a session is created even if I don't use it?
>> How can I prevent webware from creating a session?
>>
>> Thanks for your help
>> 
>
> If you never access self.session() then it should not be created. But
> as soon as you do, I don't see how WebKit has any other choice but to
> create it.
>
> You can safely check for a session without creating one with
> self.transaction().hasSession() and then only update the session if
> there is one. Several of my apps have done so to avoid the problem you
> describe.
>
>   
The monitoring servlet is a subclass of WebKit.Page
All it does it make an sql ping, and write 'success' to the output.
It does not use any session.
But my simple test is as follow.
- I shut down the appserver.
- erase all session files
- restart AppServer
- make a wget loop on the monitoring servlet.
- shutdown again
- then I see a LOT session created. note that the test is made on 0.9.2
webware...

They are not created if I use the cookie session option of wget.

Could someone please check?
Thanks

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] How to prevent a session creation?

2007-08-04 Thread sophana
Hi

While trying to debug my webware application, I tried to stress it with
a simple wget loop.
I saw that memory was increasing.
After searching a little, I found out that it was webware sessions that
were growing up to the max dynamic session limit.
Using cookie option of wget made no more session creation...

My application set a session variable at each visit.. So I though it is
a normal behaviour.
But I have a page which is dedicated to monitoring. I thought that by
making the monitoring servlet a subclass of Page, webware would no more
allocate a new session at each wget access.
But it does allocate a session at each wget access!
Is it normal that a session is created even if I don't use it?
How can I prevent webware from creating a session?

Thanks for your help



-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue bug found

2007-08-04 Thread sophana
Christoph Zwerschke a écrit :
> Concerning the sessions, this may have to do with the more secure 
> default cookie path for Webware. It will be probably using '/wk' now, 
> while you had been using '/'. If you still experience problems with the 
> cookies, you can set a fixed cookie path in 0.9.4, setting 
> 'SessionCookiePath'. But the default setting should work fine normally.
>   
I made some investigation on the session problem, there seems to be a
bug with 0.9.4 and mod rewrite.

As I said earlier, I use mod_rewrite just to map / to /wk/ and nothing else.
This means that I have /wk/Servlets paths public.

Now looking at firefox cookie list, when I go to my server root url, I
get a SID cookie with the path set to //
When I go to another /wk/* url I get another cookie with the path set to
/wk/
This make 2 separate webware sessions!

everytime I come back to /, the webware session is reset...

With my other 0.9.2 webware, I get only one cookie set to /

Using 'SessionCookiePath' to '/' seem to fix the problem...

I think the default cookie path should not depend on the path before
going through mod_rewrite but the destination path : /wk/

I still can't reproduce the AppServer freeze.
But I corrected a memory leak in my code.

Will try to go again in production...

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-08-02 Thread sophana
Jkx a écrit :
> Hi all,
>
> I've been off webware for a while now, but yesterday I need to
> update my website, and I run into some issues with an old webware 
> install (which work smothly since 2 years).
>
> I switched to mod2_webkit, and last stable webware release 0.9.3 + 
> apache 2.2 (my previous setup was mod_webkit + apache 2 + ww 0.7). 
>
> After some tweaks in the webware context config, all is working 
> quite fine. (migration was easy :) .. but the session doesn't work
> any more. And even worst I try to do some debuging, and find that
> trans.request()._environ['HTTP_COOKIE'], contains some cookies but
> not the SID one, beside this cookie is present on the browser side. 
>
> Hum, just wordering if I missed something ?? 
>
> Thanks for any help  ;)
>
>   

I also upgraded my webware application, when changing my hosted server.
I reinstalled everything from scratch.
I went from a centos4 to a fedora core 6.
from 0.9.2 to 0.9.4
The mod2-webkit was the one from 0.9.0, and now it is 0.9.4
I'm also using mod_rewrite to rewrite from the web root to /wk

I now have several problems.
The first one was the session no more working. To resolve it, I had to
stop webware, erase all sessions, and restart my web browser to clear
the cookies. My users also complained about that...
Now it seems to work.

The most annoying problem I have is that the AppServer is now freezing
after several hours.
A simple restart doesn't work, I have to do a kill -9 to kill the
process, then restart.
I don't know how to debug this as it is in production.

I will revert to the previous server, then try to reproduce the problem.
I hope the session incompatibility will not show up again...


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] request().serverURL() question

2007-06-19 Thread sophana
I still haven't tested your modification sorry, but the code is very
similar to the one I use.
Just to say that HTTP_HOST does not always exist in some rare cases,
with some exotic clients (generally bad robots).
Maybe a try/except would help, but what to use instead?

Christoph Zwerschke a écrit :
> sophana wrote:
>   
>> Yes I have a rewrite rule, but the rule does not apply in this case.
>> This may explain that I don't get the expected result.
>> What I don't understand is that, even if the url was rewritten, the
>> result is simply wrong... The apache name must not be used.
>> 
>
> It does not matter whether your URL is rewritten or not. If (and only 
> if) the engine is on, then Apache (mod_rewrite) sets SCRIPT_URI, which 
> includes the canonical name (the one that you don't want), and this is 
> returned by serverURL().
>
>   
>>> This does the same as serverURL() except for checking SCRIPT_URI, right?
>>>   
>> I wouldn't have written that if the result was the same... ;-)
>> 
>
> I only wanted to make sure that the only reason why the result is not 
> the same is that you have the rewrite engine on and thus have SCRIPT_URI 
>   set (with the canonical hostname instead of HTTP_HOST).
>
> I've implemented my suggestion with the canonical parameter now (see 
> http://svn.w4py.org/Webware/trunk/WebKit/HTTPRequest.py). Can you let me 
> know whether this solves your problem with serverURL()?
>
> -- Chris
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>   

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] request().serverURL() question

2007-05-17 Thread sophana
Christoph Zwerschke a écrit :
> I've implemented my suggestion with the canonical parameter now (see 
> http://svn.w4py.org/Webware/trunk/WebKit/HTTPRequest.py). Can you let me 
> know whether this solves your problem with serverURL()?
>   
Thanks
I'll try that.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] request().serverURL() question

2007-05-17 Thread sophana
Christoph Zwerschke a écrit :
> sophana wrote:
>   
>> I've just found out that request().serverURL() does not return the real
>> PATH of the request.
>> It replaces the http host with the server name configured in apache.
>> Is this the intended behaviour?
>> I can't use this, because the session is lost when returning to another url.
>> 
>
> Actually serverURL() normally constructs the URI using HTTP_HOST which 
> is the hostname given by the client, not the one configured in Apache, 
> i.e. it does the same as your requestURL() method.
>
> However, if SCRIPT_URI is available (i.e. when the rewrite engine is on, 
> as seems to be in your case), then this value is used, and the problem 
> seems to be that this value uses the canonical server name configured in 
> Apache, not the one used by the client in the request.
>
>   
Yes I have a rewrite rule, but the rule does not apply in this case.
This may explain that I don't get the expected result.
What I don't understand is that, even if the url was rewritten, the
result is simply wrong... The apache name must not be used.

> My suggestion is to add a boolean parameter "canonical" to the 
> serverURL() method which will cause SCRIPT_URI to be ignored if set to 
> False, and we can set canonical=False by default.
>
>   
>> def isSecure(self):
>> return self.request().serverDictionary().get('HTTPS',None) == 'on'
>> 
>
> Right, we should really define isSecure like that in HTTPRequest.
>
>   
>> def requestURL(self):
>> req=self.request()
>> if self.isSecure():
>> url='https://'
>> else:
>> url='http://'
>> url+=req.serverDictionary()['HTTP_HOST']+req.serverPath()
>> return url
>> 
>
> This does the same as serverURL() except for checking SCRIPT_URI, right?
>
>   
I wouldn't have written that if the result was the same... ;-)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] request().serverURL() question

2007-05-17 Thread sophana
Hi

I'm using apache2 + mod-webkit (from 0.9.1) and webware 0.9.2 (and 0.9.3)
My website can have multiple names: http://example.com/ or
http://www.example.com (like many websites) and also https://...
I've just found out that request().serverURL() does not return the real
PATH of the request.
It replaces the http host with the server name configured in apache.
Is this the intended behaviour?
I can't use this, because the session is lost when returning to another url.

As I need an absolute return url (for payments for example), I've made a
custom requestURL() method:

def isSecure(self):
return self.request().serverDictionary().get('HTTPS',None) == 'on'

def requestURL(self):
req=self.request()
if self.isSecure():
url='https://'
else:
url='http://'
url+=req.serverDictionary()['HTTP_HOST']+req.serverPath()
return url



-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] strange webware freezes

2007-05-01 Thread sophana
Hi
Thanks for the suggestion. I'll try it next time.
I happened  again some minutes ago, but it unfreezed without my
intervention.
Does this signal exits the process?

Ben Parker a écrit :
> Hi Sophana - There was a new feature in webware 0.9.2 which allows you 
> to send SIGQUIT to the process and get a dump of the stack frames for 
> all threads. Have you tried this?
>
> Regards - Ben
>
> sophana wrote on 5/1/07 2:03 PM:
>   
>> I'm not using pdb breakpoints inside my code.
>> The strange thing is that it does not respond to kill, but kill -9.
>> would pdb cause that?
>>
>> Cosmin Stejerean a écrit :
>>   
>> 
>>> I've seen something similar happen with pdb debug breakpoints. When
>>> the application hits the breakpoint it will freeze all processes so
>>> that you can debug leaving the application server seemingly hung up
>>> and needing to be killed. Check to make sure that you don't have odd
>>> places in the code that only get hit occasionally with references to pdb.
>>>
>>> - Cosmin
>>>
>>> On May 1, 2007, at 3:24 PM, sophana wrote:
>>>
>>> 
>>>   
>>>> Hi
>>>>
>>>> I'm using webware in production since almost 10 months now. I would
>>>> first like to thank all webware contributors. I'm really busy actually,
>>>> and hope to contribute some of my code as soon as I can.
>>>>
>>>> My server is a centos4 with a python2.4.1 package which came from the
>>>> atrpms repository (which doesn't exist anymore...).
>>>> It has been running rock solid since several months without any
>>>> problems. But there have been 2 times (3 weeks beween) where I noticed a
>>>> process freeze. The process don't even react to a kill. I have to do a
>>>> kill -9 to kill the process then restart it. Sometimes it doesn't want
>>>> to restart also... I have to rekill -9/restart several times until
>>>> everything goes fine again.
>>>> I'm not sure it is webware related, as I absolutely don't know what
>>>> could be the problem.
>>>> The kill-9 thing seems that it is not related to webware, but more to
>>>> python itself.
>>>> Is there a way to know about the process state? (stack)
>>>> If someone has a clue, I would be happy to hear it.
>>>>
>>>> Thanks again
>>>> Sophana
>>>>
>>>>
>>>> -
>>>>
>>>> This SF.net email is sponsored by DB2 Express
>>>> Download DB2 Express C - the FREE version of DB2 express and take
>>>> control of your XML. No limits. Just data. Click to get it now.
>>>> http://sourceforge.net/powerbar/db2/
>>>> ___
>>>> Webware-discuss mailing list
>>>> Webware-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>>>>   
>>>> 
>>> 
>>>   
>> -
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Webware-discuss mailing list
>> Webware-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>>
>>
>>   
>> 
>
> -
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>   


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] strange webware freezes

2007-05-01 Thread sophana
I'm not using pdb breakpoints inside my code.
The strange thing is that it does not respond to kill, but kill -9.
would pdb cause that?

Cosmin Stejerean a écrit :
> I've seen something similar happen with pdb debug breakpoints. When
> the application hits the breakpoint it will freeze all processes so
> that you can debug leaving the application server seemingly hung up
> and needing to be killed. Check to make sure that you don't have odd
> places in the code that only get hit occasionally with references to pdb.
>
> - Cosmin
>
> On May 1, 2007, at 3:24 PM, sophana wrote:
>
>> Hi
>>
>> I'm using webware in production since almost 10 months now. I would
>> first like to thank all webware contributors. I'm really busy actually,
>> and hope to contribute some of my code as soon as I can.
>>
>> My server is a centos4 with a python2.4.1 package which came from the
>> atrpms repository (which doesn't exist anymore...).
>> It has been running rock solid since several months without any
>> problems. But there have been 2 times (3 weeks beween) where I noticed a
>> process freeze. The process don't even react to a kill. I have to do a
>> kill -9 to kill the process then restart it. Sometimes it doesn't want
>> to restart also... I have to rekill -9/restart several times until
>> everything goes fine again.
>> I'm not sure it is webware related, as I absolutely don't know what
>> could be the problem.
>> The kill-9 thing seems that it is not related to webware, but more to
>> python itself.
>> Is there a way to know about the process state? (stack)
>> If someone has a clue, I would be happy to hear it.
>>
>> Thanks again
>> Sophana
>>
>>
>> -
>>
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> ___
>> Webware-discuss mailing list
>> Webware-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] strange webware freezes

2007-05-01 Thread sophana
Hi

I'm using webware in production since almost 10 months now. I would
first like to thank all webware contributors. I'm really busy actually,
and hope to contribute some of my code as soon as I can.

My server is a centos4 with a python2.4.1 package which came from the
atrpms repository (which doesn't exist anymore...).
It has been running rock solid since several months without any
problems. But there have been 2 times (3 weeks beween) where I noticed a
process freeze. The process don't even react to a kill. I have to do a
kill -9 to kill the process then restart it. Sometimes it doesn't want
to restart also... I have to rekill -9/restart several times until
everything goes fine again.
I'm not sure it is webware related, as I absolutely don't know what
could be the problem.
The kill-9 thing seems that it is not related to webware, but more to
python itself.
Is there a way to know about the process state? (stack)
If someone has a clue, I would be happy to hear it.

Thanks again
Sophana


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] Secure templating solution?

2007-02-24 Thread sophana
Hi

On my hotspot management website using webware: http://worldspot.net,
users can customize their landing page with a wysiwyg editor (fck
editor). I'm actually just replacing a %(content) tag with the dynamic
content that I generate.
However users are asking for a more customizable hotspot landing page
dynamic behaviour. Here comes the idea to use a templating system.
My problem is: Does anyone knows about a "secure" templating system?
By secure I mean that my users are designing their own templates, and
must NEVER access my webware python variable space. I must be able to
totally separate both worlds. The user must never make infinites loops,
etc...
I would need very simple templating functions: The conditionnal html is
the main feature I need. Access to some variables that I provide would
also help.
Finaly I would need a very simple templating system that does not use
ANY python expression inside (unlike most existing solution I know)

If someone has a pointer, it would help me a lot.

Thanks


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Page instances and threads

2007-01-22 Thread sophana
Christoph Zwerschke a écrit :
> sophana wrote:
>   
>> There is still something that I would like to get confirmed:
>> I have a big object that takes some time to be instantiated. This is why
>> I would like to instantiate it once per webware execution thread.
>> Do you think that the page __init__ method is the place to store this
>> object instance?
>> When are Page object created? Is it at the first request of a thread? Do
>> they remain in memory until the thread is closed?
>> 
>
> You can configure this with the Application.config settings 
> CacheServletClasses and CacheServletInstances. If you set them to yes, 
> then it is like you write.
>   
Ok thanks!
I was wondering why I couldn't find any documentation about this.
I finally found it in the 0.7 webkit doc, but it is not is the 0.9 doc
http://webware.sourceforge.net/Webware-0.7/WebKit/Docs/UsersGuide.html
http://webware.sourceforge.net/Webware-0.9.2/WebKit/Docs/UsersGuide.html

Where is it gone?
> You may also consider instantiating your object in the function 
> __init__.contextInitialize(app, ctxPath). This is only executed once 
> when the context is initialized.
>
>   
Yes but I think it is launched once per process, and not once per thread.
Am I right?

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] Page instances and threads

2007-01-18 Thread sophana
Hi

I wrote my first (big) web application with webware, and am really happy
with it.

There is still something that I would like to get confirmed:
I have a big object that takes some time to be instantiated. This is why
I would like to instantiate it once per webware execution thread.
Do you think that the page __init__ method is the place to store this
object instance?
When are Page object created? Is it at the first request of a thread? Do
they remain in memory until the thread is closed?
If the object is not thread safe, can I still use it safely inside the
Page instance?

Thanks for this great simple and powerful framework!
Keep up the good work!

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] How to evaluate webware and get started?

2007-01-11 Thread sophana
Christoph Zwerschke a écrit :
> [EMAIL PROTECTED] wrote:
>   
> This can be handled by Webware plug-ins (e.g. FormKit, FunFormKit) or by 
> other external libraries (e.g. FormEncode).
>
> Unfortunately, the plug-ins are not part with the Webware package, 
> though I think at least one of them should be included if the authors 
> permit. I'd also like to put SimpleHTMLGen which is part of FunFormKit 
> into Webware's WebUtil library, and use these tools in some of the 
> example servlets. Any opinions and recommendations?
>
>   
I really like FormKit!
The main reason is that I don't use any template, and use no html editor
to generate the html.
FormKit has a very simple form layout method, so I wrote my own system
to control the form layout very simply that I can contribute.
It does make form description a little simpler.
Also made a FckEditor form and some validators.
FormKit validation is simple and powerful enough.
There are still some small things to change IMO (some optimizations,
unicode things), but it is great.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] How to evaluate webware and get started?

2007-01-05 Thread sophana
[EMAIL PROTECTED] a écrit :
> Well, according to the documentation, the webware community is supposed to be 
> pretty helpful. :)  I wonder if you all could help me without me having to 
> spend long amounts of time trying to find the info myself?
>
> I would like to evaluate using Python for making websites.  Webware is one of 
> the sites that was mentioned.  First off, a few questions:
> Note: I don't know a lot about Python, so you may have to clarify some things 
> if you sense I misunderstand something.
>   
Python is a very good programming language. Very good choice! I
personaly already known python before choosing the website solution.
Java looks like  another very good solution.
> *) As I understand it, Python is not primarily a web language, but there are 
> ways to use Python for websites.  Some documentation seems to suggest that 
> Python's web development ability is actually better than others (like PHP).
>   
Python is really very powerful and simple. It is simpler to learn than
php I think.
It is a real object programing language since the beginning unlike php.
I had to make that choice when I began making my website, and It was
really a good choice. Very productive language thanks to really powerful
object libraries like Webware, SqlObject or FormKit and others.
> *) Is Webware the only way to website work in Python?  Is it the best way?
>   
No many other solutions exist.
I had a look at some other python solutions, and they did not look
simpler nor more powerful. You should have a look before making your choice.
> *) Can I program website entirely in script?  I won't have to compile 
> anything at any point will I?
>   
That's what I did. I did not find templating solutions useful for me.
compilation is automatic.
> *) Licensing: Am I correct in that both the Python and Webware licences are 
> essentially MIT license?  The Python one looks much more wordy, but seems 
> like it might be, but I can't really tell.  I am very picky about licensing; 
> don't like any copyright/copyleft entanglements -- especially the GPL, LGPL 
> (as well as shareware, donationware, etc...).  If it's free source (BSD, MIT, 
> public domain), then that should be pretty safe for me.
> *) Is Python really a good choice for web dev -- over say other scripted 
> languages like Ruby, PHP, Perl, etc...?
>   
Definitely. However, as it is less widespread than php, there is less
python content on the web, but it is sufficient.
For example, when I wanted to use the Paypal SOAP API, there is no
existing paypal python SDK.
I had to search hard to find a working solution. I finally found it and
am very happy with it (ZSI and SOAPpy).
> *) Are there high level frameworks for making database stuff much much easier 
> (like CakePHP, Ruby on Rails)?
>   
SQLObject is really simple! simpler to use than middleKit IMO. many
backends supported including postgres.
> *) Can you still easily go low level without jumping through lots of hoops 
> (like http headers, encoding, etc...)?
>
>   
Yes you can, it is a matter of overriding the right object methods in
the object hierarchy. I hope that you understand object programing...
> Let's assume you want to use Python and webware for website development...  
> then I need a whole lot of information to get started.  Unfortunately, what I 
> need to know is scattered in so many different places.
>
> Part 1: Setting up python for web development on a local machine.
> In order to do anything, Python will need to be setup on a local Windows 
> machine.  Can someone provide the info needed to do this?
> The system will be using Windows XP Home, Apache for the server, and 
> PostgreSQL for the database.
> 1) What do I need to do to setup Python?  What do I download?  Where are the 
> step by step instructions for setting it up?
> 2) Does webware need to be setup separately?  If, so where are the 
> instructions (literally step by step)?
> 3) Where are the instructions for getting webware and/or python to work with 
> Apache?  for getting it to work with the PostgreSQL database?
>
> again... this is all for a Windows system
>
>   
I would recommend using cygwin for being in a unix like environment, but
it is not mandatory. SqlObject is postgreSQL compatible. Apache is not
needed for development...
> Part 2: Getting started with web development using Python.
> I know that there is Python documenation for Python itself; however, I don't 
> know what is going on regarding web development in Python.  So, let's assume 
> the system is setup and ready to go.
> 1) Where is the really newbie tutorial for making a very simple hello world 
> Python web app?  I just want to know how you get started so I can understand 
> how everything is related to each other.  Once I can grasp all the concepts 
> of how things are working, I can jump into the real stuff and just consult 
> the documentation or tutorials or books or whatnot.
> 2) Where is the documenation for web development for Python (with all the 
> 

Re: [Webware-discuss] OperationalError: (2006, 'MySQL server has gone away')

2006-12-27 Thread sophana
Roger Haase a écrit :
> Hi,
>
> I am testing a new server with Fedora Core 6 and Middlekit-Webware 9.2
> and MySQL 5.0.  When the new server is idle for 5 (or more) hours I get
> abends with OperationalError: (2006, 'MySQL server has gone away'). 
> Restarting the webkit AppServer eliminates the immediate problem.
>
> I have not seen this problem on a lightly loaded server with Fedora
> Core 4, MySQL 4.1, and Webware 9.1.  The Webkit AppServer is restarted
> by cron daily in both cases.   In both cases the result of a call to
> Middlekit MySQLObjectStore is saved in the Sitepage module at load time
> for use by all servlets.
>
> Where should I be setting a timeout parameter for the Middlekit-MySql
> connection?  Is 24 hours an unreasonable time limit?
>
> Roger
>   
This is a well known problem that they have introduced in mysql5.
The best solution I found is to patch mysqldb to activate the
auto-reconnect option of the mysql C API.

A mysqldb patch can be found here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1483074&group_id=22307&atid=374934
It also applies on mysqldb 1.2.2
If you want the option to be enabled by default, you can fix the patch
easily yourself.
Works great, even if you restart mysql.


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Webware/Apache Threading Problem?

2006-09-08 Thread sophana
Gary Perez a écrit :
> Hello all,
>
> I've searched through all the past mailing list archives & scoured  
> the web looking for an idea as to what's going on. Sorry this is so  
> long, just trying to cover all my bases.
>
> First, the setup: CentOS release 4.3 (Final) running Apache 2.0.52 in  
> front of Webware 0.9.1 via mod_webkit(2). Standard httpd  
> configuration, with:
>
> LoadModule webkit_module modules/mod_webkit.so
> 
>WKServer 127.0.0.1 8086
>SetHandler webkit-handler
> 
>
> All the other WebKit apps run as expected.
>
> Here's my problem, and I hope you can help.
>
> I have two pages to be served *almost simultaneously* by WebKit: one  
> of them is a large-file upload form processor which--naturally--will  
> take a long time to return (a problem I will try to solve later), the  
> second is a status page that lists the contents of a directory which  
> self-refreshes once every three seconds.
>
> While the first is waiting for all the form-data to upload, the  
> second simply does not respond, and eventually throws an Apache  
> Internal Server Error (500).
>
> Apache error logs report ten of these:
> [Wed Sep 06 17:38:36 2006] [error] Can not open socket connection to  
> WebKit AppServer
> [Wed Sep 06 17:38:36 2006] [error] Couldn't connect to AppServer,  
> attempt 10 of 10, sleeping 1 second(s)
> ... and finally:
> [Wed Sep 06 17:38:37 2006] [error] timed out trying to connect to  
> appserver -- giving up.
>
> I have WebKit's AppServer running threaded (default AppServer.config):
> StartServerThreads = 10
> MaxServerThreads = 20
> MinServerThreads = 5
>
> Someone with greater knowledge of Apache stated: "The default mode  
> for Apache 2 is pre-forking, aka, 1.3 compatibility." ... which I  
> take to mean it forks child processes from the main control (root)  
> process - and this is not the same thing as threading... am I  
> mistaken in this assumption?
>
> Finally, is apache's inability to connect to the AppServer an  
> inherent limitation and/or problem with the AppServer, *or* is it  
> caused by running apache in pre-forking mode versus enabling threads  
> there? If so, do you think that running both in threaded mode will  
> resolve the problem?
>   
Looking at the error messages, it seems that it is webware that don't
accept the connection.
I don't know why, and don't even know if I have the same problem.
Are you sure that your second request is not blocked by the first one in
webware?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Question......

2006-09-06 Thread sophana
Matt Feifarek a écrit :
> On 9/6/06, *Christoph Zwerschke* <[EMAIL PROTECTED]
> > wrote:
>
>
>
> I thought it was more Webware-centric. So maybe we should integrate
> FunFormKit instead, and mention FormKit and FormEncode as alternatives
> in the docs? I just like the idea to have some basic HTML and
> HTML-Form
> support already built-in in Webware.
>
>
> I'm not sure that it has to be "centric" to be compatible. Truth is we
> made it for Webkit, but thought that it was important (and simple) to
> make it generalized, so we did.
>
> FunFormKit is more "centric" in that it can't run without Webkit, but
> I think Ian has pretty significantly moved on to FormEncode.
>
> If there is sufficient interest, I could make FormKit into an egg, and
> get it into the Cheese Shop... then it could be required by Webkit.
I'm not sure these packages should be included in webware, unless
specific integration needs to be done.
However, having a pointer in the documentation, and an easy plugin
install management would be more modular.
Easy_install already does the job, even if it lacks some basic features
(like uninstall).
But I think the new user should choose by himself, and webware would
just guide him a little.
For example I prefer SqlObjects to middleKit. It would have been cool
that the webware doc could tell about sqlobject so the choice would be
easier...

I second the idea of making formkit go into cheese shop.

About formkit TRAC, it's too bad that it is spammed, because I would
have contributed some code+doc (when I have some time). Maybe you should
install user registration plugin with a real login form. That's what I
did, and it works just fine.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Question......

2006-09-06 Thread sophana
Tim Roberts a écrit :
> There's nothing wrong with Webware, of course, but there are a LOT of
> very competent Python web frameworks available today (in fact, I wrote
> an essay on that in comp.lang.python last week), and Webware isn't the
> top of my list any more.  If you had said "we evaluated the alternatives
> and decided Webware fit our style the best", I'd congratulate you on
> your decision-making process.  But I'm curious about "I have to use
> python with webware".
>   
Could we have a pointer to your essay?
I did a tour of the numerous python web framworks available not so long
ago. I choosed webware, because it is simple and powerful.
Which one did you choose?

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Question......

2006-09-06 Thread sophana
Christoph Zwerschke a écrit :
> sophana wrote:
>   
>> formencode does the trick also, but its too bad it doesn't have an
>> automatic layout by default.
>> I had to write my own simple layout management for formkit, that I will
>> contribute some times.
>> 
>
> Is FormKit still maintained? If it is not actively developed any more 
> and not used for any other web frameworks, I think it would be good to 
> continue development inside the Webware SVN and release it together with 
> Webware, maybe with some improvements like the additions you have made.
>
>   
Formkit works just fine. I don't think it needs major development. I
don't understand why it was not integrated into webware, because it was
designed for it.

I found some minor details that could be corrected:
for example, fields are stored in the form with a list.
When you want to access a field by its name, formkit iterates the list
to find the field. That's not really the best performance wise
implementation.

What I don't like in formencode, is that forms are entered in html
(which I don't like, because I personaly prefer python object hierarchy
description)
I don't think it is also very performant in terms of cpu power...

The validator features of formencode and formkit seem similar.

What could be improved, (that's what I did), is the layout description,
which is actually a simple vertical table.
I simply did a nested horizontal or vertical tables description which
fitted my needs.
> I also like to add something like FunFormKit's SimpleHTMLGen.py to 
> Webware, maybe as module in the WebUtils package. Is something like that 
> also part of FormKit?
>   
I agree that webware should have some simple html helper methods.
For tables, I wrote my own little script where you describe tables with
nested lists. It's very simple, and because of that, it won't fit
everybody's needs, but it save lot of python lines of code.


If we talk about the features of webware, I did not find how to manage
directories url notation.
for example, what I would like to have is:
if Main is the page handler, it should be possible to enter any url like:
http://webkit/Main/foo/boo?a=1&b=2

Main request fields would be:
{ 'a':'1','b':'2','_path':'foo/boo'}

http://webkit/Main/foo would give : {'_path':'foo'}
What do you think of that? simple isn't it?


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session expiration problem

2006-09-06 Thread sophana




Christoph Zwerschke a écrit :

  
I will also try to reimplement returning an error page for expired 
sessions if IgnoreInvalidSession=False (the default is True). Maybe 
instead of sending an error page, we should simply send a 408 Request 
Timeout error?

  
  
I have fixed it that way now, but sending "401 Session Expired" instead 
of "408 Request Timeout" since the latter is interpreted by Firefox 
differently (namely in the way it was actually intended). I think 401 is 
the proper error message for an expired session.

Thanks to Niurka for reporting that bug just in time before the final 
0.9.2 release. If there are any other bugs, please let me know.

  

Hi
Is your fix available in the 0.9.2 beta? I'd like to test it...
Thanks


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Question......

2006-09-06 Thread sophana
I'd suggest that you use formkit to manage forms.
It's really simple to use.
With it, I don't need any templating language (which I find not really
useful...)

formencode does the trick also, but its too bad it doesn't have an
automatic layout by default.
I had to write my own simple layout management for formkit, that I will
contribute some times.

Regards

Salman Toor a écrit :
> Hi I am salman Toor and i just started my thesis... I have to use
> python with webware ... can any body guide me like how to i get
> the information about the basic modules and the methods of python web
> components . what is the good IDE to use Now i have a basic
> problem 
>
>
> i want to handle a checkbox in a python script
>
> 
> 
> 
> ...
> 
>
>
> def func(self) :
> 
> f1 = self.request().field('Donit')
>  ...
>
> self.write(
>
> """Check_Box_Output%s  % (f1))
>
> **
>
> when i checked the checkbox it dose not give me error but if i do not
> checked the check box it gives me error msg .
>
> 
> f1 = self.request().field('Donit')
> KeyError: 'Donit'
> 
>
> I know its a basic problem but i want to learn what function is for
> what and how many functions are available in the classes that are for
> this python web programming  ..
>
> Thankz in advance
>
> Best Regards
> Salman Toor..
>
> -
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> ___
> Webware-discuss mailing list
> Webware-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>   


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] problem with session store

2006-06-08 Thread sophana
Also forgot to ask, is there an option for entering python interactive 
mode so I can launch pdb?

sophana wrote:

>Hi
>
>I have the following message:
>
>[Thu Jun  8 16:46:03 2006] [error] WebKit: Error while executing script None
>Traceback (most recent call last):
>  File "../WebKit/SessionFileStore.py", line 82, in __setitem__
>self.encoder()(item, file)
>  File "../WebKit/SessionStore.py", line 54, in dump_with_highest_protocol
>return dump(obj, f, proto)
>PicklingError: Can't pickle : attribute lookup 
>__builtin__.module failed
>
>Is it normal that it does want to pickle a module?
>In my session values I have some SqlObject instances. Do you think this 
>can make a problem?
>
>Thanks
>
>
>___
>Webware-discuss mailing list
>Webware-discuss@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/webware-discuss
>
>  
>



___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] problem with session store

2006-06-08 Thread sophana
Hi

I have the following message:

[Thu Jun  8 16:46:03 2006] [error] WebKit: Error while executing script None
Traceback (most recent call last):
  File "../WebKit/SessionFileStore.py", line 82, in __setitem__
self.encoder()(item, file)
  File "../WebKit/SessionStore.py", line 54, in dump_with_highest_protocol
return dump(obj, f, proto)
PicklingError: Can't pickle : attribute lookup 
__builtin__.module failed

Is it normal that it does want to pickle a module?
In my session values I have some SqlObject instances. Do you think this 
can make a problem?

Thanks


___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] Why is AppServer consuming CPU while idle?

2006-04-25 Thread sophana

Hi

I have webware 0.9 installed with mod_webkit.
I lauched the appserver the 13 april (12 days).
It has only served 12 http requests since up (I have the log)
top shows it has consumed 513 hours of cpu (it is a pentium [EMAIL PROTECTED])

Why so much cpu for nothing?

Regards
Sophana



---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] webware forms: formkit, formencode, any other?

2006-04-03 Thread sophana

Matt Feifarek wrote:

On 4/2/06, *sophana* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


I'm actually using formkit with success. I find it just cool as it is.
Maybe the forms look should be a little more customizable (I haven't
tried a lot)


Glad to hear it.

FK has quite extensive support for CSS and other attributes; just make 
sure to go beyond the "dump()" output, and you'll have more 
flexibility that you could need.


;-)



just another question, why isn't formkit shipped with webware?
Isn't it quite desgned for webware?
I don't think that webware proposes another form solution?



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] webware forms: formkit, formencode, any other?

2006-04-02 Thread sophana

Hi Matt

I'm actually using formkit with success. I find it just cool as it is.
Maybe the forms look should be a little more customizable (I haven't 
tried a lot)

But the result is ok for me.
The problem with formencode, is that I don't want to generate html by 
hand. I still haven't found a viable (wydiwyg) html editor solution.

That's why I'm using formkit.

About the automatic sqlobject to form generation, I finally found it not 
very useful, as the database schema is often not the same as the form.


Matt Feifarek wrote:

On 3/9/06, *sophana* <[EMAIL PROTECTED] 
<mailto:[EMAIL PROTECTED]>> wrote:


Now I'm looking for a method for generating forms.
formkit looks quite good, although not that simple.


Hello Sophana.

I'm one of the authors of FormKit.

The apparent complexity is largely due to the crappiness of HTML, but 
we've done a pretty good job (IMHO) of putting a consistent api across 
all field types. most of the complexity is under the hood and out of 
your hair... again, IMO.


It would be pretty easy to do what you ask -- to make SQLObjects and 
FormKit fields more intimately hooked together. You could write a 
simple Validator/Convertor that would inspect your database objects to 
determine what's required.


Ultimately, there is no free lunch however, eventually you will find 
an example of something you need that is not easily "automated" by 
such a hack... again, HTML (and especially forms) SUCK. Sooner or 
later you'll have a database object that's too complicated for 'smart' 
code, and will have to break your own rules...


Ian's approach with FormEncode might be more to your liking... stop 
trying to mess with HTML and start worrying just about values.


If you have any specific FK questions, let me know.

Good luck. 





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-31 Thread sophana

I am still not convinced that polling is a good solution for long queries.
One good reason for this is that you can't implement real time 
application anymore: a chat board, real time stock quotes, etc...


Isn't it better to store the tcp socket file handles left open in a 
connection pool?
As soon as a new event is to be sent, the tcp connection is retrieved 
from the pool, then simply written.
If apache limit connection time, isn't it simpler to use another port 
and let the javascript contact directly the webware application server 
bypassing apache?
I don't know how many tcp connections can a single linux server can 
handle, probably tens of thousand?

Maybe a persistant connection handler could be implemented in webware?

Anyway, you need to somehow inform the client that your result is 
ready. For VERY long running queries, you can expect the client to 
look at a certain result page. But John's solution is nice in that it 
informs the client automatically when the server is ready, even if it 
takes longer than the usual timeout of 90 seconds.





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-31 Thread sophana


However, I'm actually wondering whether you really always need to run 
this background polling. If requests are always answered within the 
timeout interval (which is set to 100 seconds), that mechanism should 
be never needed. For instance, in the "AjaxSuggest" example, it will 
be surely not needed. You will only need it if you have long-running 
queries or computations where getting the result is crucial. So I was 
wondering whether AjaxPage should provide a parameter that allows 
disabling and enabling the polling mechanism. In the AjaxSuggest 
example, I would like to disable it from the beginning.


I agree with you that webware is not designed for doing this kind of stuff.
If you want to do long running queries, I suggest that you bypass apache 
and webware, and implement a separate dedicated (python) server that 
supports these very long running queries, without the timeout problem, 
without polling.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana

Jeff With The Big Yellow Suit wrote:


> If someone could explain, I would be grateful...

If I'm interpreting your questions and statements correctly
then you seem to have two misunderstandings.  One is about
how HTTP requests work, and the other is about the costs
of threading.  Please forgive me if I've gotten either of these
interpretations wrong.

To correct the first misconception, here's an outline of how
an HTTP request works.

1) Client opens a TCP connection to server.
2) Client sends HTTP request to server over TCP connection.
3) Server performs request
4) Server returns the results over _the same_ TCP connection.
5) TCP connection is terminated


I know that already.
I simply didn't understand why the server was polling anything in the 
first email of this thread. It is a very specific application for very 
long responses (more than 5 minutes)




To correct the second misconception, threads are *not*
zero cost.  They're cheap in comparison to forking, but they're
nowhere near free.   That's why non-threaded networking
frameworks such as twisted exist.  By avoiding the costs of
threading they can achieve much higher throughputs.

Sorry, I will repeat myself: We are not talking about the same threads. 
Python threads have NOTHING in common with the threads you are talking 
about.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana

John Dickinson wrote:





I think I understand now.
The client is polling the server for new data that could come up 
because of external events.
If I understand correctly, this kind of application is useful for a 
certain class of websites like chat, real time data updating (like 
stock quotes), etc..


In majority of ajax applications, such polling might be useless isn't 
it?



Not quite useless. The reason I originally wrote AjaxPage was for a 
system that can have long-running requests to the server (generating 
reports). In that case, I was fighting against browser/server 
timeouts. On our installation of Apache, the client/server connection 
would be broken after 5 minutes. 


OK!!!
This is a VERY specific application.
I thought the ajax page was a base class for any ajax application but it 
is absolutely not...
Believe me that a vast majority of http or ajax request is responded 
immediately, and such mechanism is simply not needed.

Sorry for having bothered you.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana

John Dickinson wrote:

In answer to your first set of questions, ajax_response() waited to 
see if anything would show up in the response bucket that needed to be 
sent to the client. Once something showed up, it was send down the 
pipe to the client, and the connection was closed. 


What kind of thing shows up? I don't see the application...

The client would then reopen the connection the ajax_response to see 
if anything else was on the server that needed to be processed on the 
client side.


But, that was an inefficient implementation. I would suggest that the 
newer implementation I posted this morning be used instead. I'm sure 
that it can still be improved upon, but it is better (for webware's 
threads) than the older implementation used in the AjaxSuggest example 
page.


In your previous mail, you explain that the client wait for some 
amount of time. Wait for what?



In the newer implementation, the client waits so as not to hammer the 
server with requests as fast as possible. If that were allowed, it 
would amount to the site developer willingly subjecting themselves to 
a DDOS. The client timeout allows the servers some time between 
requests. Essentially, the client wakes up every few seconds and asks 
the server if any new data is available. The server then responds 
immediately. If there was something to give to the client, then that 
is sent back. If there is nothing to give back to the client, nothing 
is send back besides the number of seconds for the client to wait 
until it asks the server for results again.


Check out the code: wiki.w4py.org/ajax_in_webware.html.


I think I understand now.
The client is polling the server for new data that could come up because 
of external events.
If I understand correctly, this kind of application is useful for a 
certain class of websites like chat, real time data updating (like stock 
quotes), etc..


In majority of ajax applications, such polling might be useless isn't it?


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana


But there is thread switching going on all the time. The more threads, 
the more switching overhead.



I don't think we talk about the same threads.
python is an interpreted language. There is absolutely no overhead in 
switching a python context. Nothing similar with a regular os thread switch.
python generators iteration are an example of python contexts use at no 
cost.


well, in my understanding the proposal was to mix the conventional 
threaded execution of 'regular' requests (which allows you to run each 
request straight through, without async-specific contortions) with 
async handling of ajax requests. One thread cannot at the same time 
run a single request straight through and at the same time hop around 
between additional async'ed ones. So, you would have to dedicate one 
or more threads exclusively to the async'ed handling of ajax requests.



I'm really sorry bothering you with so many questions.
I thought that the 'Async' word in AJAX, was the about the way the 
request is made at the client side.
If I understand correctly, async means that the script does not block 
when waiting for the server response.


At the server side, I see no difference how this request is handled, 
compared to any http request.
In simple ajax examples on the web, the script calls a really simple php 
script like any other, except that it responds javascript instead of html...


If someone could explain, I would be grateful...

Thanks


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana




They are handled like standard requests. The issue is that (in my 
older implementation) the request would be made to the server, and the 
server would sit around with that request for TIMEOUT seconds. 


That is my question: Why waiting?
Why not immediately close the connection and  the thread like any http 
request?

Is it because the javascript client does maintain the tcp connection?

The problem is when you have multiple users connecting (or even 
several ajax-enable pages viewed in rapid succession), many of the 
threads from webware's thread pool are used for up to TIMEOUT seconds. 
Once the threads are all busy, the next user trying to connect must 
wait until a busy thread finishes its current task before that user's 
request is served.


With the changes I posted to the wiki this morning, the ajax_response 
requests are not held up on the server side, so the limit of 
concurrent users goes up (a lot). The problem is not really solved, 
per se, but it's impact is weakened.


In your previous mail, you explain that the client wait for some amount 
of time. Wait for what?
Sorry if my questions look silly, I don't understand everything in this 
ajax mechanism.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] AjaxSuggest example busy-waits

2006-03-30 Thread sophana

Michael Palmer wrote:




Geoffrey Talvola wrote:


John Dickinson wrote:


Not only that, it consumes a webware thread that could be used for
other requests.



Yes, this won't scale too well if you have large numbers of concurrent
users.  You could probably handle hundreds of users with a large 
thread pool

though.



According to some measurements I made, a pool with more than 10-20 
threads will seriously affect overall performance.


Are you sure of that?
A python thread has nothing in common to standard threads (pthread or 
even light weight threads)

It will use some memory, but no performance pelnalty at all.

I haven't understood why ajax requests require a busy thread to be handled.
Is it because the tcp connection is not closed between the requests?
Why ajax requests are not handled like standard http requests, using a 
session Id to maintain the per client state (with a new tcp connection 
per request)?






Nevow/Twisted solves this problem by using async event-driven methods
instead of threads.  I think Twisted's architecture is a better fit 
for this
type of application than Webware's thread pool.  I wonder if there is 
some

way to combine the two -- use standard Webware threads for "normal"
short-lived requests but have some way to handle the ajax_response-type
requests without tying up threads.  It would probably require 
reworking the

ThreadedAppServer architecture significantly.

Should work in principle. One problem is the lack of thread priorities 
in Python. If you dedicate one thread to the asynchronous requests, 
that thread will compete for CPU time against all others in the pool 
and may be quite slow. It might be necessary to use several threads to 
get more overall CPU time for the async requests.


Why dedicating one thread only? Why aren't the event handled by the same 
pool of thread concurrently?





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] sqlite usage

2006-03-30 Thread sophana
Db access is independant of webware. You can use any python library for 
sqlite.
middleKit is the webware proposed database management system but you are 
not obliged to.
I personaly use SQLObject inside webware (it also supports sqlite but 
not tested). I find it MUCH easier than middlekit.


Mike Partin wrote:

are there any documents relating to using say sqlite from inside of 
webware? I haven't found any db docs on the webware site other than 
middlekit, which doesn't seem to be what I'm looking for. Any pointers 
to information would be appreciated.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting 
language
that extends applications into web and mobile media. Attend the live 
webcast
and join the prime developer group breaking into this new coding 
territory!

http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] How to include a php page from the same server inside my SitePage?

2006-03-29 Thread sophana

Not yet. I think I'll use frames until I'll try another solution.

Jose Galvez wrote:

did you ever find a solution to your problem?
Jose

sophana wrote:
  

So your website is composed of php pages mixed with webware pages, but
you don't have php+webware mixed pages. Did I understand right?
That is not exactly what I was looking for. Duplicating the SitePage
which contains header and sidebar that contains session dependant
account info is impossible for me.
I was wondering if it was possible to 'include' a php page from python
by doing something like

f=popen('php script.php php args')
s=f.readlines()
self.write(s)

The problem is how can I transmit the http request url and things like
that to the php script?
What do you think about the performance of this kind of script?
Maybe I could use urllib and open a tcp connection to the local apache
server?
Is there a way to pipe the file handle directly into the response
request to achieve better performance?
Or should I simply use frames?

Sophana

Jose Galvez wrote:



Dear Sophana,

When I've mixed webware with php (which we do quite alot where I work),
I have always gone through the apache web server.  Essentially we have a
single root context which can server either webware pages or php pages
depending on the extension of the script, py is run through webware and
php is run through php.  As to the look and feel, that really depends on
how you have your pages set up, most of our actual html design is done
with cheetah, so alot of our look and feel is done with stylsheets and
the usual stuff, which will carry over to php without any trouble.
However some of our pages are set up with header and footers and stuff
like that, a practice which is very common in php, which we had to build
duplicates for, so essentially for some websites we have duplicate php
and webwaer page headers and footers.  Its a pain if you are actively
editing a site because you have to remember to edit more then one set of
code, but our users don't seem to see the difference.  No sure if this
is what you wanted, but I hope it helps.  BTW within the same folder we
often have both php and webware scripts, like I said we have apachie
configured to deal with both.

Jose

sophana wrote:
 

  

Hi all

I'm coding a website with webware, but I'd like to reuse php scripts
in it.
These php scripts are hosted on the same machine (web server)

How do I include these scripts inside my SitePage look and feel?
Can I call the php interpreter directly from python or should I go
through the apache web server?

In both case, how can I do it?

Thanks for your help
Sophana




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


  



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

 

  


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss







---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

  




---
This SF.Net email is spo

Re: [Webware-discuss] How to include a php page from the same server inside my SitePage?

2006-03-16 Thread sophana
So your website is composed of php pages mixed with webware pages, but 
you don't have php+webware mixed pages. Did I understand right?
That is not exactly what I was looking for. Duplicating the SitePage 
which contains header and sidebar that contains session dependant 
account info is impossible for me.
I was wondering if it was possible to 'include' a php page from python 
by doing something like


f=popen('php script.php php args')
s=f.readlines()
self.write(s)

The problem is how can I transmit the http request url and things like 
that to the php script?

What do you think about the performance of this kind of script?
Maybe I could use urllib and open a tcp connection to the local apache 
server?
Is there a way to pipe the file handle directly into the response 
request to achieve better performance?

Or should I simply use frames?

Sophana

Jose Galvez wrote:


Dear Sophana,

When I've mixed webware with php (which we do quite alot where I work),
I have always gone through the apache web server.  Essentially we have a
single root context which can server either webware pages or php pages
depending on the extension of the script, py is run through webware and
php is run through php.  As to the look and feel, that really depends on
how you have your pages set up, most of our actual html design is done
with cheetah, so alot of our look and feel is done with stylsheets and
the usual stuff, which will carry over to php without any trouble. 
However some of our pages are set up with header and footers and stuff

like that, a practice which is very common in php, which we had to build
duplicates for, so essentially for some websites we have duplicate php
and webwaer page headers and footers.  Its a pain if you are actively
editing a site because you have to remember to edit more then one set of
code, but our users don't seem to see the difference.  No sure if this
is what you wanted, but I hope it helps.  BTW within the same folder we
often have both php and webware scripts, like I said we have apachie
configured to deal with both.

Jose

sophana wrote:
 


Hi all

I'm coding a website with webware, but I'd like to reuse php scripts
in it.
These php scripts are hosted on the same machine (web server)

How do I include these scripts inside my SitePage look and feel?
Can I call the php interpreter directly from python or should I go
through the apache web server?

In both case, how can I do it?

Thanks for your help
Sophana




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting
language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding
territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


   





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

 





---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] How to include a php page from the same server inside my SitePage?

2006-03-16 Thread sophana

Hi all

I'm coding a website with webware, but I'd like to reuse php scripts in it.
These php scripts are hosted on the same machine (web server)

How do I include these scripts inside my SitePage look and feel?
Can I call the php interpreter directly from python or should I go 
through the apache web server?


In both case, how can I do it?

Thanks for your help
Sophana




---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] MiddleKit

2006-03-15 Thread sophana

marcelo schiavone wrote:


Hi, does someone know the way of doing that "MiddleKit" works with a
remote (existing) database, using MSSQL?

The database already exists and the idea is to realize an application
in Webware in another PC that accedes to the above mentioned database
using MiddleKit.

Regards.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss

 

SqlObject can auto create an SqlObject from an existing table. Never 
tested it.

class MyTable(SQLObject):
   class sqlmeta:
  table='your_existing_table'
  fromDatabase=True

then you simply play with your SQLObject...
It works just fine with webware.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] webware forms: formkit, formencode, any other?

2006-03-09 Thread sophana

Hi

Still investigating in the python for web world.
Now I'm looking for a method for generating forms.
formkit looks quite good, although not that simple.
formencode does not generate html but mostly cares about validation (if 
I understood the quite poor doc correctly)


If possible, I would like something that would directly wrap my 
sqlobjects directly into forms, or create both forms and sqlobjects from 
a single description.

What are your impressions about this?
How do you generate your forms (and pages) (wysiwyg html? template? 
which ones?)


Thanks for your great help.


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] How to manage database connections efficiently?

2006-03-09 Thread sophana

Ian Bicking wrote:


Sophana Kok wrote:


I'm a webware beginner.
I would like to use sqlobject with webware and kid.



If you are using SQLObject, it handles the connections for you.


Ok thanks, I just had a look in the source, seems that I just need to 
set the sqlhub.processConnection global in one of my modules (not in a 
method), then a connection will be created per thread. Nothing to do. 
(very nice indeed)

But what if the connections get broken, will they restart automaticaly?

About speed, what (free) database is the fastest? I need to sort with 
the distances from one point. I don't know yet the tables sizes, but 
they could be big (I may need scalability). I've heard that postgreSQL 
can be better than mysql. What do you think?



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


[Webware-discuss] How to manage database connections efficiently?

2006-03-08 Thread Sophana Kok

Hi

I'm a webware beginner.
I would like to use sqlobject with webware and kid.

I have a question concerning database connections managment.
How do I leave connections open between requests? Is there a document 
somewhere on the website?
In the website, I've seen that there are awake() and sleep() method for 
different object levels.
But when I make a print inside these (in a class derivating from Page), 
awake and sleep are called at all transactions.
I still don't understand what are these methods for (except for ease of 
derivation)


Reading the webware doc and website, I found nothing to take care about 
external connections handling.
Do I have to manage my own opened connections pool which is accessed by 
all threads concurrently?

Should there be a connection per thread?
Is there a Thread instance, so I can store a connection handler?

Thanks for your help.



---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss