>  I read your previous reply. What i want to do ?
>  In my webapp (network probe or thinkclint mabager) i use this kind off
>  class to retreive some data from the server (mysql query, snmp query
>  etc..). And my goal is to do the same things with mongrel2.

I could be wrong (google for tim wilson and "I could be wrong"
sometime -- not safe for work (NSFW) and primarily US culture).
However, I think we need to take a step back.  Mongrel2 (or apache2 +
mod_python for that matter) doesn't care about your database; your
server application must handle the database/business logic, convert it
to a message (maybe json), and then ask mongrel2 to send it to your
pyjamas application (on the client).  In other words, mongrel2 doesn't
(and shouldn't) query your database.  Mongrel2's purpose is to be a
message broker and route messages here and there.  It is up to your
server side app to receive the JSON over HTML, parse the JSON, query
the database, encode the result as JSON, send a response to Mongrel2
and who to forward it to.

I think what needs to be done here is to take things in smaller steps
(left for you to fill in).  May I propose 3 major steps:
1) Getting your current server side web application hosted from
mongrel2 rather than apache2 + mod_python
2) Testing said web app via jsonrpclib (or anything similar) as Luke recommended
3) Hooking up your pyjamas application to your server side application
that is served by mongrel2

Reply via email to