[Zope] can I use my existing twisted rpc app in zope.
krmane at gmail.com
Sun May 3 13:11:16 EDT 2009
On Sun, 2009-05-03 at 18:48 +0200, Lennart Regebro wrote:
> That surely is possible. How much you need to rewrite it impossible to
> answer without knowing your code. You don't "talk" to Zope the same
> way you "talk" to Twisted, for example.
OK, you can look at the code at
http://gnukhata.gnulinux.in/svn/gnukhata_alpha by doing svn co on that
Look at the server part which is in
GNUKhata is an accounting/ Point Of Sales Application and is supposed to
be just a usual accounting solution with customisation for tax and
inventory types. However this is just for the beginning, in the later
stages we aim to make it an application which can be used on the web as
a micro financing tool and Point Of Sales in the rural areas.
There will be people carrying small netbooks with just Ubuntu or Fedora
installed with a web browser. Then they can talk to one of the servers
and do the transactions.
In addition we will have a p2p model for sharing moduels (plugins )
which can represent new accounting voucher types, account heads and even
inventory categories. This will reduce the time it takes every time an
application is deployed after case study.
Right now the twisted based RPC server application is just a bunch of
published classes for getting and setting the data and the entire
processing logic for the transactions on account heads for every type of
voucher or invoice created by the client.
The rpc app also provides Get methods for clients which intend to
generate reports on the basis of the data provided as a service. Thus
we have getLedger, getTrialBalance etc.
All the logic is in the server application and represented in all the
classes which inherit the twisted's server class.
I am thinking that I will take this out of twisted and I am ready to put
all these classes into a zope product, no matter if I have to write some
bit of code for this. My only question is that will I have to change
the way my existing classes call stored procedures in postgresql
database or do I need to make changes to the logic which sends across
the queries to my database?
And yes, I still want this application to work as an RPC server app. So
would like to know if zope can serv my application as an rpc server? I
am ready to take it out of twisted, but was confused because I herd zope
All that I need is that it should still remain as an rpc server and
nothing else. I will then think of writing a web based client which can
again be run by zope.
> > My question was will I be able to re-use my published objects and their
> > functionality by coding it in such a way that zope hosts the twisted
> > based rpc server application I already have?
> No, you will have to take your objects out of twisted and put them in Zope.
As I said previously, I am ready to do that.
> If your objects are tightly integrated with Twisted, you are likely
> better off keeping the servers separate applications, but make them
> talk to each other. Chris recommendation of WSGI makes sense.
Will this not be a heavy and tedious task? I any ways have my
application as a server and want to make it web enabled by making a
browser work as a client with some middleware to talk to my application.
The idea for using zope came to me because I can see that zope will
become a one-stop solution for all my needs.
More information about the Zope