Why are there 2 interfaces called Storage?

14 views
Skip to first unread message

John Tipper

unread,
Sep 18, 2019, 12:44:50 PM9/18/19
to Grafeas Developers
Please can someone explain the rationale behind there being 2 interfaces called Storage (project.Storage and grafeas.Storage)?

I'm looking at #380 and it would be nice to be able to have a trivially small main implementation that could be copied from one project to another in order to support multiple storage types.  It's made more difficult because we seem to have 2 interfaces that actually do the same sorts of thing (they both interact with the storage implementation: one manages projects, the other nots & occurrences).

Many thanks,

John

Aysylu Greenberg

unread,
Sep 18, 2019, 2:17:22 PM9/18/19
to John Tipper, Grafeas Developers
Hi John,

Thanks for your question. The reason is the 2 APIs, Grafeas (notes and occurrences) and Project. The reason for the separate Project API is that internal implementation of Grafeas on GCP uses the concept of projects, so this is made available externally for the hybrid cloud users. Each of the existing storage bindings implements the concept of projects with notes and occurrences differently, which is why we have the separate project.Storage interface. I'm definitely open to ideas on how we may be able to combine these storage interfaces, assuming we keep in mind that some implementations may not want to conform to the project-based structure.

Cheers,
Aysylu

--
You received this message because you are subscribed to the Google Groups "Grafeas Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grafeas-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grafeas-dev/b3453c17-2bde-4697-a703-78bda7ab759f%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages