On Tue, Sep 8, 2009 at 4:09 PM, Jules Stevenson<[email protected]> wrote:
>
> Hi List,
>
> We have a pylons app that is used on an intranet, it's now reached a point
> where locally installed applications [3d applications, use python] on
> network client machines need to start talking to the database, and I'm
> unsure of the best way of achieving this. I've got them to talk over http,
> but this strikes me as ridiculously inefficient way of approaching this, as
> all data has to be parsed back from HTML in to useful python. I'm *guessing*
> that I need to look at some way of opening up sqlalchemy / model over the
> local network (and hopefully using the pylons controllers / pylons methods,
> but figured this might be a non-starter / insane since the whole thing is
> geared up for http), but I have no idea how to approach this. I'd be very
> grateful if anyone has any ideas or pointers as to how I might begin to
> tackle this, or whether this whole idea is a very bad one.

If the database itself is accessible over the network (e.g., with
MySQL or PostgreSQL), you can write a standalone SQLAlchemy
application that users can run on their desktops, which connects to
the database via a remote engine.  To access the model in the Pylons
application, install the application on everybody's desktops, then
have the standalone application import the model and call
init_model(engine).

If the database is not accessible over the network or you prefer to go
through a central web application, you can make the application's
actions accept JSON input/output instead of HTML, and then write a
separate standalone application users would run on their desktops,
which packages up their data to JSON and sends it to the web
application.

-- 
Mike Orr <[email protected]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to