Porting a ZOPE (2.13) application into PYRAMID

86 views
Skip to first unread message

rober...@gmail.com

unread,
Sep 14, 2017, 1:22:56 PM9/14/17
to pylons-discuss
Hello to everybody,
I have an alive application running in (on) ZOPE 2.13.
We are maintaining the application with linux virtual machines running python 2.7 and ZOPE 2.13.

Here are a summary description of the objects present in ZODB:
- 335 pages are written in ZPT (Zope Page Template)
- 230 pages are still written in DTML => we are (slowly) rewriting them in ZPT
- 123 javascript (DTML Document type) scripts
- 919 python scripts
- 421 ZSQL scripts => we are (slowly) moving SQL queries on server side

Moreover, we use ZOPE Extensions to call external services that are
- called through XML/RPC protocol
- 80% provided by a python business application server 
- 20% provided by a java-tomcat business application server 

Since ZOPE is dead, or so it seems (at least as own product),
I'm looking for a little-painful-solution to run away from ZOPE.

My idea was keeping the 2 business server python and java and porting only the ZOPE stuff in another python framework.

I thought that PYRAMID could do the job, expecially if I could port easily the ZPT pages to CAMELEON.

Can anybody give any suggestion?

Thank you very much,
Roberto Vivarelli

Mikko Ohtamaa

unread,
Sep 14, 2017, 4:05:23 PM9/14/17
to pylons-...@googlegroups.com
Hi Roberty,

You are right; Pyramid is your best bet. Pyramid community knows ho to interact with ZODB and Chameleon is prettty close to ZPT.  I would suggest continuous migration approach, where you start moving views to a Pyramid server URL by URL, using some kind URL map on the front end web server (nginx?)

-Mikko

--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to pylons-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/1483d157-bcca-4530-95e6-f886845d9e6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Brian Sutherland

unread,
Sep 19, 2017, 10:10:19 AM9/19/17
to pylons-...@googlegroups.com
On Thu, Sep 14, 2017 at 11:05:17PM +0300, Mikko Ohtamaa wrote:
> Hi Roberty,
>
> You are right; Pyramid is your best bet. Pyramid community knows ho to
> interact with ZODB and Chameleon is prettty close to ZPT. I would suggest
> continuous migration approach, where you start moving views to a Pyramid
> server URL by URL, using some kind URL map on the front end web server
> (nginx?)

We are just finishing something like this and took a slightly different
approach:

* Serve Zope and pyramid via WSGI within one process
* Use something like the paste.cascade middleware to first attempt
pyramid and on a 404 fallback to Zope.
* Stash the pyramid request inside the WSGI environment to make it
available from within Zope. That way you can change helper
functions slowly to use the pyramid request and not need 2
implementations.

Having the "use Zope if pyramid returns a 404" is probably the best part
of that, you can replace urls with equivalent implementations slowly
without breaking links.

> -Mikko
>
> On 14 September 2017 at 19:12, <rober...@gmail.com> wrote:
>
> > Hello to everybody,
> > I have an alive application running in (on) ZOPE 2.13.
> > We are maintaining the application with linux virtual machines running
> > python 2.7 and ZOPE 2.13.
> >
> > Here are a summary description of the objects present in ZODB:
> > - 335 pages are written in *ZPT *(Zope Page Template)
> > - 230 pages are still written in *DTML *=> we are (slowly) rewriting them
> > in *ZPT*
> > - 123 javascript (*DTML *Document type) scripts
> > - 919 python scripts
> > - 421 *ZSQL *scripts => we are (slowly) moving SQL queries on server side
> >
> > Moreover, we use *ZOPE Extensions* to call *external *services that are
> > - called through XML/RPC protocol
> > - 80% provided by a python business application server
> > - 20% provided by a java-tomcat business application server
> >
> > Since ZOPE is dead, or so it seems (at least as own product),
> > I'm looking for a little-painful-solution to run away from ZOPE.
> >
> > My idea was keeping the 2 business server python and java and porting only
> > the ZOPE stuff in another python framework.
> >
> > I thought that PYRAMID could do the job, expecially if I could port easily
> > the *ZPT *pages to CAMELEON.
> >
> > Can anybody give any suggestion?
> >
> > Thank you very much,
> > Roberto Vivarelli
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "pylons-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to pylons-discus...@googlegroups.com.
> > To post to this group, send email to pylons-...@googlegroups.com.
> > To view this discussion on the web visit https://groups.google.com/d/
> > msgid/pylons-discuss/1483d157-bcca-4530-95e6-f886845d9e6f%
> > 40googlegroups.com
> > <https://groups.google.com/d/msgid/pylons-discuss/1483d157-bcca-4530-95e6-f886845d9e6f%40googlegroups.com?utm_medium=email&utm_source=footer>
> > .
> > For more options, visit https://groups.google.com/d/optout.
> >
>
>
>
> --
> Mikko Ohtamaa
> http://opensourcehacker.com
> http://twitter.com/moo9000
>
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
> To post to this group, send email to pylons-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAK8RCUv8okEsC7_YBBw8kceuzYCy6P7m7X8x2_soBKRy7ky-_Q%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

--
Brian Sutherland

Christian Ledermann

unread,
Sep 20, 2017, 5:40:08 AM9/20/17
to pyramid
may be a little OT here, still worth a read in this context
https://www.martinfowler.com/bliki/StranglerApplication.html
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/20170919141011.gdhmxqhqs2fzylcf%40mobilista.local.
> For more options, visit https://groups.google.com/d/optout.



--
Best Regards,

Christian Ledermann

Newark-on-Trent - UK
Mobile : +44 7474997517

https://uk.linkedin.com/in/christianledermann
https://github.com/cleder/


<*)))>{

If you save the living environment, the biodiversity that we have left,
you will also automatically save the physical environment, too. But If
you only save the physical environment, you will ultimately lose both.

1) Don’t drive species to extinction

2) Don’t destroy a habitat that species rely on.

3) Don’t change the climate in ways that will result in the above.

}<(((*>

Jonathan Vanasco

unread,
Sep 20, 2017, 12:36:44 PM9/20/17
to pylons-discuss
+1 to the advice above on a gradual migration via failovers or  "strangler"

One method that once worked well for me in the past: viewing everything as a Service Oriented Architecture and extending the old system with new routes that enabled it to be the Auth/Login component for the new system. That let the old system act as-is with no change.  When everything got migrated over to the new system, the auth endpoints were switched over to the new system too.

An example flow:

* User visits NEW page.  NEW redirects to OLD for auth.
* User logs in on OLD, which now has an auth callback info (e.g. oauth).
* * OLD handles login and sets it's own cookies/session.
* * OLD redirects to NEW auth-in endpoint
* NEW sets it's own sessions/info based on the auth-in token and background data exchange.





Jens W. Klein

unread,
Sep 21, 2017, 8:04:21 AM9/21/17
to pylons-...@googlegroups.com
On 2017-09-14 18:12, rober...@gmail.com
wrote:
> Hello to everybody,
> I have an alive application running in (on) ZOPE 2.13.
...
> Since ZOPE is dead, or so it seems (at least as own product),
> I'm looking for a little-painful-solution to run away from ZOPE.

I do not think Zope is dead. There is a community pushing Zope forward,
porting it to Python 3. There were several sprints happening the last
years, the last one ended just a few days ago.

Zope 4.0 beta1 was released after this sprint.

For more information consult
https://zope.readthedocs.io/en/latest/changes.html

You should consider looking at it, as it may save you lots of work.

Jens
--
Klein & Partner KG, member of BlueDynamics Alliance

Reply all
Reply to author
Forward
0 new messages