I just wrote an email on my twisted server setup. It was very nice as I have one definition I created that was called when ever I needed to send a message. Very easy code on both ends.
I will look at tornado adn this anyserver.py sshhhtuff soon. :)
BR,
Jason

On 01/22/2011 10:24 PM, Massimo Di Pierro wrote:
If you just want to run web2py with twisted as web server, look into
web2py/anyserver.py. There is already a handler for that.
If you are looking at using twisted to handle asynchronous calls, I
guess it can be done as with tornado in web2py/gluon/contrib/
comet_messaging.py
Any higher level of integration would probably require a lot of work
and I do not think it is going to happen.

massimo


On Jan 22, 2:08 pm, Peter L<[email protected]>  wrote:
Thanks for the answer Massimo. I will look at it as Twisted supports
websockets.

I guess you know about the Twisted framework. Would it be possible to
integrate it into web2py or does this not make sence at all? It was
the thread about long running processes which made me think that using
Twisted Deferred's could be useful.

These very excellent tutorials about Twisted and asynchronous
programming convinced me to give Twisted a 3rd and 4th try. So now I'm
almost getting it.http://krondo.com/?page_id=1327

Peter

On 22 Jan., 04:40, Massimo Di Pierro<[email protected]>
wrote:







I have not used twisted but I have used tornado for html5 websockets.
web2py notifies tornado by digitally signing post requests.
The source is herehttp://code.google.com/p/emte-trading/
Massimo
On Jan 21, 6:08 pm, "Peter M."<[email protected]>  wrote:
I have made small demonstration client/server project using the
Twisted framework (http://twistedmatrix.com/) which is just as easy to
use for client/server projects as web2y is for for web applications
and now I want to use web2py as frontend for a shared database.
Twisted web component(s) is not at a state where I want to use it
(http://twistedmatrix.com/trac/wiki/TwistedWebPlan) and I much rather
prefer web2py.
I have seen at least one person on this list saying he is using web2py
as frontend for a "Twisted server". I would like advice on how to make
web2py notify the "Twisted server" about changes in the database. Both
server applications (the "Twisted server process" and web2py) are
running on the same server. I guess I could use a table as message
queue which the Twisted server would read every few seconds.
But if wanted a here-and-now notification then how to do it most elegantly?
There is a solution which works for PostgreSQLhttp://www.divillo.com/
but I prefer a more general solution.
Should I send a xml-rpc or soap request from web2py ->  Twisted server?
Are there other ways to communicate?
Has anyone had success trying to import twisted modules into web2py?
I guess an integration of Twisted and web2py would make it such a big
killer product that it will require a license to operate it ;-)
Regards
Peter

Reply via email to