On Friday, November 13, 2015 at 11:01:45 AM UTC-5, Samuel Sowah wrote: > > I need to register users, then keep track of the connections that users > make, and be able to tell the shortest path between two users based on the > connections they make, and then also be able to tell if they don't connect > in anyway at all. The DAL has convenience methods for auth stuff which the > third-party graph db APIs don't provide and i'm not ready to be writing > auth methods, that's just a long route that will delay my project (not that > i have a deadline or anything, it's a personal project and it's just going > to take too much time writing auth methods. it's almost senseless seeing as > i'm working with web2py and web2py already has an abstraction layer with > methods to deal with all that). Currently I'm basically replicating > registered accounts in the sqlite db as nodes in the graph db, and then > replicating memberships as relationships in the graph db. Doing this cos I > need to authenticate users before they can access the app. >
Got it. Unfortunately, it's probably not worthwhile to add a whole new set of abstractions to the DAL just so Auth can be made to work with graph databases (particularly since each one is different). Instead, I would just add ._after_insert, ._after_update, and ._after_delete callbacks to the db.auth_user table (and possibly db.auth_membership if needed) that automatically do the necessary inserts/updates/deletions in the graph database whenever there is a new user or profile change. This shouldn't be too complicated. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

