Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set Amazon Neptune write/read endpoint in configuration #132

Open
codingalone opened this issue Nov 24, 2022 · 1 comment
Open

How to set Amazon Neptune write/read endpoint in configuration #132

codingalone opened this issue Nov 24, 2022 · 1 comment

Comments

@codingalone
Copy link
Contributor

codingalone commented Nov 24, 2022

It's rather a question:

I'm using Grumlin with Amazon Neptune and facing a problem in the title.

In my current code, Grumlin.configure is called only once in a startup script, so I cannot use write/read instances accordingly. Now I only use the write instance for read queries too.

Is there any good way to configure both write and read endpoint in a single server instance?

@zhulik
Copy link
Contributor

zhulik commented Feb 6, 2023

Hey, sorry for such a huge delay, Grumlin currently does not support separate read/write instances as I don't have a cluster with read instances and haven't investigated a possibility of adding this feature.

Do you have any ideas on implementation? We could have separate configuration options for this, something like

Grumlin.configure do |config|
  config.url = "ws://localhost:8182/gremlin" # keep it url for backwards compatibility
  config.read_url = "ws://localhost:8182/gremlin"
end

A new middleware could check what steps are used and if there are no mutating steps it could route the query to the read instance, what do you think? Could you help me with testing it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants