-
Notifications
You must be signed in to change notification settings - Fork 1
/
NOTES.html
95 lines (93 loc) · 4.35 KB
/
NOTES.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html>
<head>
<title>Institutional Repository Data Management</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu" title="link to Caltech Library Homepage"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="INSTALL.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="search.html">Search Docs</a></li>
<li><a href="about.html">About</a></li>
<li><a href="https://github.com/caltechlibrary/irdmtools">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="notes">Notes</h1>
<h2 id="invenio-rdm">Invenio RDM</h2>
<h3 id="rate-limits">Rate Limits</h3>
<p>The rate limits for OAI-PMH identifier lists is per minute.</p>
<p>The rate limits for OAI-PHM records is per hour.</p>
<p>The rate limits for REST API records appear to be 500 per minute and
5000 per hour with a distant reset.</p>
<h3 id="crossrefdatacite-mapping">CrossRef/DataCite mapping</h3>
<blockquote>
<p>https://doi.org/10.3847/1538-4357/acacf5 ApJ
https://doi.org/10.3847/2041-8213/ac8e5f ApJL
https://doi.org/10.1063/PT.3.5157 Physics Today, Failure to pick up day
https://doi.org/10.1016/j.chemgeo.2022.121272 Article number, Bogus
issue number, fails to pick up art no
https://doi.org/10.1186/s40854-022-00444-4
https://doi.org/10.1038/s41746-022-00738-y No article number, All APS
titles https://doi.org/10.1103/PhysRevD.106.124045</p>
</blockquote>
<h2 id="extending-rdms-json-api-with-postgrest">Extending RDM’s JSON API
with PostgREST</h2>
<p>Invenio RDM is uses Postgres as it’s primary metadata data store.
While RDM’s JSON API is rich it is also significantly rate limited. It
is also undesirable to remove those limits as we may wish to use them
via JavaScript for specific client side interactions.</p>
<p>PostgREST can present an alternative JSON API leveraging RDM’s
current SQL implementation generated by Invenio’s ORM. The primary
challenge is that Postgres powering Invenio RDM in our deployments runs
in a container. We’d need to change the container rules and allow an
external connection to the host environment to make the Postgres content
available via PostgREST. An additional challenge is the PostgREST
documentation shows providing access and control of PostgREST actions
happens via Postgres SCHEME. Invenio RDM uses the global schema as far
as I can tell. Documenting the permission and user settings allowing
PostgREST to function will need to be included in extending Invenio
RDM’s to support an alternative JSON API. Initial experiments using a
copy of RDM’s Postgres database seems to establish this approach is
possible.</p>
<p>A significant about of RDM’s table definitions relies on JSON
columns. SQL Views gives us the option of re-organizing these in to a
traditional table relationship or combine tables JSON columns into
aggregations. Views should allow is a means of easy reference to rich
data structures via JSON API. It also ensures consistent queries through
URL end points (e.g. You don’t have to make sure your app is using the
same “select” query syntax/options if you are retrieving the data via a
view).</p>
<h3 id="reference">Reference</h3>
<ul>
<li><a href="https://postgrest.org">PostgREST</a>, provides a JSON API
“out of the box” for databases hosted in Postgres.</li>
<li>GraphQL Go packages
<ul>
<li><a
href="https://github.com/graph-gophers/graphql-go">graphql-go</a>,
server implementation, focus on easy of use, scheme based approach</li>
<li><a href="https://github.com/andrewwphillips/eggql">eggql</a> an easy
GraphQL server library that can be implemented without schema</li>
<li><a href="https://github.com/99designs/gqlgen">gqlgen</a> a Go
GraphQL generator</li>
</ul></li>
</ul>
</section>
<footer>
<span>© 2023 <a href="https://www.library.caltech.edu/copyright">Caltech Library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span><a href="mailto:[email protected]">Email Us</a></span>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
</footer>
</body>
</html>