Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Krishnakant
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote:
 No, at least without doing some work (where some work is more than just 
 dropping your code into a directory and expecting Zope to pick it up and 
 serve 
 it out).  It will essentially be a rewrite, although maybe with some careful 
 coding you'd be able to reuse most of the existing code.

Yes, that's exactly my point.  I don't mean that I would just drop the
code into a folder and expect zope to do every thing write.

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?

This implies that my application core logic with the sets of Published
API calls need not change but let's say I add the necessary things to
make my app a zope product and still have it work as an rpc server?

I had read somewhere that zope uses twisted, so I thought will my app be
put into zope as a server product with of course the necessary additions
to the package to make it a zope product.

So is that possible?

happy hacking.
Krishnakant.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Chris McDonough
On 5/3/09 11:21 AM, Krishnakant wrote:
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote:
 No, at least without doing some work (where some work is more than just
 dropping your code into a directory and expecting Zope to pick it up and 
 serve
 it out).  It will essentially be a rewrite, although maybe with some careful
 coding you'd be able to reuse most of the existing code.

 Yes, that's exactly my point.  I don't mean that I would just drop the
 code into a folder and expect zope to do every thing write.

 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?

Likely no.

 This implies that my application core logic with the sets of Published
 API calls need not change but let's say I add the necessary things to
 make my app a zope product and still have it work as an rpc server?

The application you already have was probably written to an API that assumes 
that the Twisted mainloop is running.  In normal mode under Zope, Twisted's 
mainloop is not running.  I'm not even certain that if you use the Twisted HTTP 
server support in Zope whether your application will run without modification. 
Almost certainly if it did it would be off to the side unable to use Zope 
authentication services, etc, because the server contacts your code directly 
without indirecting through any Zope ZPublisher stuff.  The magic that makes 
authentication services and so on work are basically all wrapped up in 
ZPublisher.  In order to make use of them you'd need to rewrite your 
application 
as a native Zope app.

 I had read somewhere that zope uses twisted, so I thought will my app be
 put into zope as a server product with of course the necessary additions
 to the package to make it a zope product.

 So is that possible?

Sorry, not in the way you've described.

- C
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Chris McDonough
On 5/3/09 11:21 AM, Krishnakant wrote:
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote:
 No, at least without doing some work (where some work is more than just
 dropping your code into a directory and expecting Zope to pick it up and 
 serve
 it out).  It will essentially be a rewrite, although maybe with some careful
 coding you'd be able to reuse most of the existing code.

 Yes, that's exactly my point.  I don't mean that I would just drop the
 code into a folder and expect zope to do every thing write.

 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?

By the way, for the record, you *might* be better off trying to serve up your 
Twisted app through WSGI and use WSGI middleware to do the 
authentication/authorization, and what-have-you instead of trying to tie your 
application into Zope to get those features.

- C

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Lennart Regebro
On Sat, May 2, 2009 at 13:04, Krishnakant krm...@gmail.com wrote:

 It's really up to you. Personally, I would recommend looking into
 either Grok, which is based on Zope 3, or BFG, which is a minimalistic
 framework using Zope 3 technologies.

 http://grok.zope.org/
 http://bfg.repoze.org/

 I see, By the way will 5 help me solve this confusion?

No.

 Now if I want to take the entire rpc server based application and put it
 into zope in such a way that my rpc application is not disturbed but the
 features like PAS get integrated, will this be possible?

 More presisely, I want to use zope for this same application server and
 have it do the same work on xml rpc.

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.

 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.

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.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Krishnakant
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote:
 By the way, for the record, you *might* be better off trying to serve up your 
 Twisted app through WSGI and use WSGI middleware to do the 
 authentication/authorization, and what-have-you instead of trying to tie your 
 application into Zope to get those features.
 
WSGI?
what does that exactly do?
happy hacking.

Krishnakant.



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Krishnakant
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote: 
 By the way, for the record, you *might* be better off trying to serve up your 
 Twisted app through WSGI and use WSGI middleware to do the 
 authentication/authorization, and what-have-you instead of trying to tie your 
 application into Zope to get those features.
 
WSGI?
what does that exactly do?

happy hacking.

Krishnakant



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Chris McDonough
On 5/3/09 12:40 PM, Krishnakant wrote:
 On Sat, 2009-05-02 at 20:16 -0400, Chris McDonough wrote:
 By the way, for the record, you *might* be better off trying to serve up your
 Twisted app through WSGI and use WSGI middleware to do the
 authentication/authorization, and what-have-you instead of trying to tie your
 application into Zope to get those features.

 WSGI?
 what does that exactly do?

Google is your friend.

- C
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-03 Thread Krishnakant
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
url.

Look at the server part which is in
gnukhata-server/GNUKhata-ApplicationServer.

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
uses twisted.
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.


happy hacking.
Krishnakant.



___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-02 Thread Andreas Jung
On 02.05.09 10:45, Krishnakant wrote:
 hello all,
 I am new to this mailing list and pritty new to zope as well.

 I have been reading the zope wiki and trying to find many answers to all
 the questions I have about this very powerful application server.

 My first question is, should I use zope 2 or zope3 for a financial/
 accounting software?  I am not intending to develop just a web site but
 a complete web application which will be used in fields like Point of
 Sales and micro finance.  I feel I must go for zope 3 because the wiki
 says that zope3 is targeted at application developers for the web.

 But at the same time I am unsure whether zope3 has products for tasks
 such as open office integration and call to a database.

 This brings me to the second and the main question for which I am
 writing this email.
 I have a team of python developers working on the core logic of the
 system and they have already written  an RPC based server application
 containing the entire core logic.

Consider using GROK first.

-aj

begin:vcard
fn:Andreas Jung
n:Jung;Andreas
org:ZOPYX Ltd.  Co. KG
adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany
email;internet:i...@zopyx.com
title:CEO
tel;work:+49-7071-793376
tel;fax:+49-7071-7936840
tel;home:+49-7071-793257
x-mozilla-html:FALSE
url:www.zopyx.com
version:2.1
end:vcard

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-02 Thread Lennart Regebro
On Sat, May 2, 2009 at 10:45, Krishnakant krm...@gmail.com wrote:
 My first question is, should I use zope 2 or zope3 for a financial/
 accounting software?  I am not intending to develop just a web site but
 a complete web application which will be used in fields like Point of
 Sales and micro finance.  I feel I must go for zope 3 because the wiki
 says that zope3 is targeted at application developers for the web.

It's really up to you. Personally, I would recommend looking into
either Grok, which is based on Zope 3, or BFG, which is a minimalistic
framework using Zope 3 technologies.

http://grok.zope.org/
http://bfg.repoze.org/

 But at the same time I am unsure whether zope3 has products for tasks
 such as open office integration and call to a database.

You can use ny Python library both from Zope 2 and Zope 3. Often
easier from Zope 3 in fact.

 Right now we use a gtk based thin client to make calls to the rpc server
 based API.
 I would be interested to know if I can directly take this twisted based
 rpc server application and put it inside zope.

That depends on what you mean with inside.

 What I mean is that I would like to directly integrate my already
 developed rpc server application inside zope in such a way that it sits
 in the server

I don't understand what you mean with having a twisted server inside a
zope server. It doesn't make any sense to me. Zope talks either HTTP
or WSGI (which in turn talks HTTP). The RCP server doesn't. I don't
see how inside makes sense there. Can the two servers talk to each
other and share data? Sure, there are many solutions for that. Can you
have the same application talk both HTTP and RPC? Sure. But in either
case neither is inside the other.

 So is this possible and should zope3 be the right choice for this?

Zope 3, or rather Grok or BFG, is the right answer to everything. ;)

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-02 Thread Krishnakant

 It's really up to you. Personally, I would recommend looking into
 either Grok, which is based on Zope 3, or BFG, which is a minimalistic
 framework using Zope 3 technologies.
 
 http://grok.zope.org/
 http://bfg.repoze.org/
 
I see, By the way will 5 help me solve this confusion?
  But at the same time I am unsure whether zope3 has products for tasks
  such as open office integration and call to a database.
 
 You can use ny Python library both from Zope 2 and Zope 3. Often
 easier from Zope 3 in fact.
 
Well my requirement is to have open office spreadsheet integration so
that I can create ledger reports etc as a spreadsheet.
I had recently herd about a zope product which does that but can't
remember that name which was similar to zetac or some thing.

 

 
  What I mean is that I would like to directly integrate my already
  developed rpc server application inside zope in such a way that it sits
  in the server
 
 I don't understand what you mean with having a twisted server inside a
 zope server. It doesn't make any sense to me. Zope talks either HTTP
 or WSGI (which in turn talks HTTP). The RCP server doesn't. I don't
 see how inside makes sense there. Can the two servers talk to each
 other and share data? Sure, there are many solutions for that. 

I will try and make my problem clear.
Right now my application is a twisted based rpc server application which
gives the set of api like setCustomer() getCustomer() etc.

Right now we have created a gtk based thin client which is nothing but
an rpc client which calls the rpc published objects in the server
application.

Now if I want to take the entire rpc server based application and put it
into zope in such a way that my rpc application is not disturbed but the
features like PAS get integrated, will this be possible?

More presisely, I want to use zope for this same application server and
have it do the same work on xml rpc.

But if I have to re-write the entire rpc application server, then it
will be a tedious task.  What I am thinking is to take this twisted
based application server and make it a zope product.  This way my
classes and the published objects for rpc requests remain intact and I
continue adding feature enhancements like security and other advantages
which zope would give as an application server.  So my simple twisted
based rpc application becomes a zope product which sits in zope and
takes the advantage of all that zope has to offer.

I hope I am clear this time.

Thanks and 
happy hacking.
Krishnakant.
 continue adding 

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] can I use my existing twisted rpc app in zope.

2009-05-02 Thread Chris McDonough
On 5/2/09 7:04 AM, Krishnakant wrote:
 It's really up to you. Personally, I would recommend looking into
 either Grok, which is based on Zope 3, or BFG, which is a minimalistic
 framework using Zope 3 technologies.

 http://grok.zope.org/
 http://bfg.repoze.org/

 I see, By the way will 5 help me solve this confusion?

No, it will just confuse you more. ;-)

 I will try and make my problem clear.
 Right now my application is a twisted based rpc server application which
 gives the set of api like setCustomer() getCustomer() etc.

 Right now we have created a gtk based thin client which is nothing but
 an rpc client which calls the rpc published objects in the server
 application.

 Now if I want to take the entire rpc server based application and put it
 into zope in such a way that my rpc application is not disturbed but the
 features like PAS get integrated, will this be possible?

No, at least without doing some work (where some work is more than just 
dropping your code into a directory and expecting Zope to pick it up and serve 
it out).  It will essentially be a rewrite, although maybe with some careful 
coding you'd be able to reuse most of the existing code.

- C

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )