[Grok-dev] megrok.rdb

1 view
Skip to first unread message

Paul Sephton

unread,
Mar 9, 2017, 3:10:29 AM3/9/17
to Grok Development
Hi;

I have been using megrok.rdb for a while, but found previously that although it worked well it only worked while pinned to versions < 0.7.0 of SQLAlchemy.

I finally got irritated enough to go find what the problem was.  It turns out its something really stupid and innocuous.

sqlalchemy.orm.collections.collection implements a decorator called on_link(fn).  Megrok.rdb traps on_link() to force an ILocation interface compliance for linked tables.  In sqlalchemy 0.7.0, the name of this method was changed from on_link() to just link().

I just wish devs would recognise the far reaching consequences of changing public API's that are already in use!

Anyway, having done a quick search through github, it seems that megrok.rdb is not amongst the projects held there, so there's no easy way for me to do a pull request.  The package owner in the pypi repository is listed as faassen, kteague.   Faassen, I know, has moved on to the bigger and better world of morepath.

I would like to submit a patch to megrok.rdb to enable compatibility with more recent versions of SQLAlchemy, and simultaneously drop support for versions of SQLAlchemy < 0.7.0.  The patch is simply:

 components.py components_new.py
--- components.py    2017-03-09 09:39:30.670965306 +0200
+++ components_new.py    2017-03-09 09:38:22.010966138 +0200
@@ -59,8 +59,8 @@
             keyfunc = default_keyfunc
         MappedCollection.__init__(self, keyfunc=keyfunc)
 
-    @collection.on_link
-    def on_link(self, adapter):
+    @collection.link
+    def link(self, adapter):
         if adapter is not None:
             self.__parent__ = adapter.owner_state.obj()
             self.__name__ = unicode(adapter.attr.key)

I have no idea who is really maintaining this module, if anyone, but could whoever it is please take a look.



Paul Sephton

unread,
Mar 9, 2017, 4:13:42 AM3/9/17
to Christopher Lozinski, Grok Development
Hi, Chris,

I have to say that I share your concern about the maintenance of the Zope Toolkit, but with one caviat- the ZTK is still reasonably actively used by Pyramid as a foundation.

There certainly is little or no excitement among Python devs that I can discern for web development in general, outside of the relatively few folks in the Django camp.  And frankly, I have great trouble working up any sort of enthusiasm for Django myself.  Having tasted the component oriented approach to web development, I find anything else poor faire.

The problem is that Grok is confusing, especially to newcomers.  Morepath does not do a significantly better job of selling itself than Grok did to start with, I'm sad to say.  PHP devs take one look at it and say "whut???".  For better or for worse, PHP is still the most prevalent (easily the most hated) web dev tool, and even though I think server side Javascript is a ghastly concept, it seems to have taken off with a wild abandon I could only have hoped to see in the Python world.

Ask any two arbitrary Python devs what Grok is though, and you have around a 1% chance of either of them knowning what you're talking about.  Assuming you hit a jackpot with the vanishingly fading chance that both have heard of it, their answers will be wildly varying:  For example, you and I have completely different approaches to using Grok.

The above being the case, I don't blame you for getting that "nagging feeling".  However, I don't think it's fair to assume that the ZTK activity is dead just because we're not in the same room as the ZTK devs:  a quick look at ZopeFoundation projects on github show as of this time, ZConfig & z3c.coverage updated 17 hours ago, zope.container, persistent & Products.LongRequestLogger updated 21 hours ago, and zc.FileStorage updated a day ago.  That's quite a bit of activity in my book!

...and Grok is just a relatively thin layer over ZTK.

Even Zope2 updated only 12 days ago.

In my opinion, it's sad that Grok is associated closely with Plone, and that the only time it gets head room is in the context of Plone development.  Plone has huge competition in a shrinking space in the real world, and I cannot see it lasting for ever.

From my experience, Grok is a big boy able to stand on it's own two feet without needing Plone as a crutch.   I have built some pretty enormous systems based on ZTK technology, using little more than Eclipse, PyDev & Postgres, and the only reason I can maintain it all on my own is because of the component based approach to scaling the system.

Very nice to hear from you again, and cheers!


On Thu, Mar 9, 2017 at 10:22 AM, Christopher Lozinski <lozi...@freerecruiting.com> wrote:
 Great to hear from you.  

One of my biggest worries is that this whole stack of software is not actively used nor maintained.  

I am perfectly happy with what I am using, but a little voice in the back of my head is worried.  

They PyCon web conference in Berlin is coming up .  Call for papers deadline in March 15th.  I am tempted to submit something, but sadly there is no business model behind anything. 

In the meantime ioscompanies.info is doing great.  

I hope that all is well with you. 

Warm Regards
Chris



Christopher Lozinski

unread,
Mar 9, 2017, 6:46:46 AM3/9/17
to Paul Sephton, Grok Development
On Mar 9, 2017, at 10:13 AM, Paul Sephton <prse...@gmail.com> wrote:

From my experience, Grok is a big boy able to stand on it's own two feet without needing Plone as a crutch.   I have built some pretty enormous systems based on ZTK technology, using little more than Eclipse, PyDev & Postgres, and the only reason I can maintain it all on my own is because of the component based approach to scaling the system.


Well that is the critical piece of information.  Thank you.  That makes two of us who have built substantial systems single handedly.    

My competitors Zeef.com and GLX.com both spent millions of Euros.  Zeef only has a two or three level hierarchy.   They have multiple overlapping Python directories.  GLX is not even up and running.  At Polish salaries, for 3 years, I calculate 75K Euro invested in my software.  

Who are your competitors?  How much did they invest?

Any other interesting case studies on this mailing list?  I can aggregate our stories.  

 I am out telling the world about it.  That includes talks to Venture Capitalists. 

Pretty irresistible from a VC’s perspective to cut your investment by a factor of 40.  

Warm Regards
Chris

Christopher Lozinski

unread,
Mar 9, 2017, 10:26:47 AM3/9/17
to Paul Sephton, Grok Development
I changed the title to help people who are just visiting this mailing list. 

You said that you built the application by yourself.  And your competitor is 

Mathletics. 

They are owned by 3-P learning, a publicly traded company 


With 33.6 million in Investment. 

How much investment does your company have. 

Now we have a very very interesting story.  Grok way outperforms the competition. 

Warm Regards
Chris

Souheil CHELFOUH

unread,
Mar 9, 2017, 12:10:13 PM3/9/17
to Paul Sephton, Grok Development
Hello guys,

Just a little word, a bit off topic, but to let you know that in 2010 i created a new framework based on Grok, jsut after the last sprint.
As time went by, I dissociated the framework from Grok, then from Zope3 itself, keeping just a few packages from the ZTK.
The framework called Cromlech was started with Martijn Faassen, using Crom and Grokker, very lightweight packages to replace the Martian/zope.component duo.
The Framework is very much alive and used in very big sites and a company based in Germany, called Novareto.
The concepts are very close from Grok and I consider it the successor I always wanted.
it has no bound DB, can be used with SQL, ZODB or Solr, all of them at the same time or none at all.
It runs on python 3.5 and has most of the functionalities Grok had.
It's just a little more DIY, because i've always wanted less magic.

https://github.com/Cromlech

If you're interested, I could help you deploy one and maybe get a feeling out of it.
It's a few men projects, but it's a no non-sense dev oriented project, to do the work and not show off.

- Souheil Chelfouh


_______________________________________________
Grok-dev mailing list
Grok...@zope.org
https://mail.zope.org/mailman/listinfo/grok-dev


Christopher Lozinski

unread,
Mar 9, 2017, 1:54:38 PM3/9/17
to Souheil CHELFOUH, Grok Development, Paul Sephton

> On Mar 9, 2017, at 7:08 PM, Souheil CHELFOUH <trol...@gmail.com> wrote:
>

> i hope I make sense in this mail.
Given that I also live with this stuff, your email made perfect sense.

Software archeology is a bit more difficult. One needs a mentor.

So cromlech.webob looks perfectly reasonable. WebOb is the leading request server. 100% test coverage.
Used by tons of brand names. Okay, fine.

Of course cromlech.webob looks way too small. What did you do with all of that junk in zope.pulisher. I feel naked.

So I searched for “travers”. Nothing. Does cromlech.webob call the traverser? zope.publisher does.

Does cromlech.webob invoke the security mechanisms, and user authentication. I use zope.pluggableauthentication and megrok.login.

And then there is the obvious question. Why not use Pyramid.publisher, or whatever it is called. What is it called?

I should say that I am very dependent on zope.securitypolicy. It gives me everything I need to build a content management system. After ZODB, it is the second jewel in the crown of ZTK.

lozinski

unread,
Mar 10, 2017, 6:38:53 AM3/10/17
to Souheil CHELFOUH, Grok Development, Paul Sephton

On Mar 10, 2017, at 10:51 AM, Souheil CHELFOUH <trol...@gmail.com> wrote:

Thing is, the concepts are what interested me.

That is the key point.  Zope has these wonderful abstractions. 

I could not relocate the following quote on the web.  

"those who have not studied zope are destined to reinvent it." Philip Ebby

Did I get it right?

As one guy said to me at EuroPython: “You are an abstract thinker”.  It turns out most people are not nearly as abstract.   That is what we should be pushing.  The superior abstractions of Zope 3.  That way when they ask us how many users, we can reply, Does your highly used stack support the abstractions you need?

In my marketing talks to Python groups, I am putting together a talk on PyLang concepts. 
PyLang.info most of which are actually zope concepts.  I can share that. 

There really should be a  talk called Zope concepts.   One slide per concept.  

Tittle Slide
Eby Quote
Persistent Python 
Object Publishing 
Traversal                
Views on Objects
Permissions on Views on Objects
 zope.securitypolicy Permission Model
 Zope.interface
Zope.Schema
Z3c.form
Adaptors
 Registration/Lookup. 


Zopache Concepts
     ZMI
    TTW Editing
     Specific Classes
        HTML (Chameleon)
        Javascript  
        CSS
        Jace
        File
        Image 
        Include
        ZClasses
       Acquisition

Blogory Concepts
         Category
         Posting  
         Link
         Video
         
Blogory Business Concepts
          Continent
         Country
         City
         Company
         Job
Conclusion
     History, and resurrection news. 
     Cost comparisons of our companies and competitors
     Websites, and contact info. 

Do you have any other concepts I should mention?  
Do you have any good images I can use in the talk?  

And we should go around our local Python user groups giving talks about it.  Not just the three of us, but create a set of slides and invite people to give that talk all over the world. 

And use that to increase the Zope/Grok/Cromlech market share. 

Would you like to give it somewhere?

PyCon Web call for papers deadline is March 15th. 

I should point out that when zope corporation went bankrupt this whole community died.  But it is getting resurrected.  ZODB mailing list is now crazy active.  There is the Zope Resurrection Sprint.  They were surprised by the turnout.  It is about time that the Grok/Zope 3 world starts to revive.  It is inevitable.   Maybe his discussion is evidence of that happening. 

Warm Regards
Chris





Reply all
Reply to author
Forward
0 new messages