Skip to content

Refactor/dev user ns#77

Closed
bplatz wants to merge 10 commits intomainfrom
refactor/dev-user-ns
Closed

Refactor/dev user ns#77
bplatz wants to merge 10 commits intomainfrom
refactor/dev-user-ns

Conversation

@bplatz
Copy link
Contributor

@bplatz bplatz commented Jul 22, 2024

This adds some simple REPL startup back to the user namespace, and fixes the http-api calls namespace used for issuing/debugging http calls to the server from the REPL.

I wanted to make sure how this is done makes sense to everyone.

The query-server config has to get re-tested with the changes, and I plan to add a config to startup a query-server only. I don't think anyone has tried that in a while and it doesn't appear the config as it stands is current for that purpose.

I also plan to have a 3-server raft config out of the box startup function similar to what we used to have.

@bplatz bplatz requested a review from a team July 22, 2024 21:15
dev/src/user.clj Outdated
:fluree/connection {:method :remote
:servers "http://localhost:58090"}
:fluree/consensus {:consensus-type :none}})
(defn load-config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of this functionality will be added in the config branch when it's ready. I'm working on validation now, but I hope to be able to open a pr today.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, happy to adjust. Just working on REPL setup with the recent changes, and making sure multi-server raft is still working well, which is the more complex REPL setup.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #78 to store config in JSON. It might be easier to base this work off of that branch. It's also easier to do merges of configs because we don't have to worry about dissocing irrelevant keys (if you want to replace standalone with raft, for example). though that code isn't there yet, it will be easy to add when we need it.

(def server-3 "/ip4/127.0.0.1/tcp/62073")
(def servers-str (str/join "," [server-1 server-2 server-3]))

(def raft-single-server
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this stuff could be stored in resource files on the classpath, just like we do the main config. We could add a development resource path under dev/resources and call those files dev-server-1.edn (and hopefully very soon ".json"), etc and build out functions to merge or override configs in the fluree.server.system (and, hopefully very soon, the fluree.server.config) namespace. That would make it more robust and also more like what we'll do in production.

@bplatz bplatz mentioned this pull request Jul 24, 2024
@bplatz bplatz closed this Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants