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 use multi database #571

Closed
julsbreakdown opened this issue Jan 16, 2023 · 13 comments
Closed

How to use multi database #571

julsbreakdown opened this issue Jan 16, 2023 · 13 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@julsbreakdown
Copy link
Contributor

Hello.
How would you proceed to use multiple Postgis databases? In our setup, we can have up to 3dbs.

  • can baremaps studio be the solution ?
  • load multiple instances of baremaps?
  • or can that be a feature // evolution ?

Thanks

@bchapuis
Copy link
Member

I would say that it depends on the use case. I think you could already use baremaps with several databases when importing data (see the workflows). Given a few minor modifications, it should be possible to configure the Hikari connection pool to connect to replicas of the same database (this would be a great addition to the project). Finally, given more important modifications, it may be possible to generate vector tile layers coming from different databases. Could you provide more information about what you want to achieve?

@julsbreakdown
Copy link
Contributor Author

We would like to serve one or more vector tiles that can be from one or more databases

ATM we are using :
pathtobaremaps/baremaps/bin/baremaps map serve --database "${JDBC_URL}" --tileset "${TILESET_PATH}" --style "${STYLE_PATH}"

What we would like is to have one instance of baremaps severing n vector tiles from n databases.

@bchapuis
Copy link
Member

I see, this is an interesting use case. The current architecture revolves around the cli and the idea was to start one process per service. We could evolve toward an architecture where all the services are managed by a process, but I guess that this would require to develop an admin interface to register and configure tilesets (e.g. geoserver). Do not hesitate to further describe your idea or to add exemples. I guess this is something which is difficult to get right.

@julsbreakdown
Copy link
Contributor Author

@bchapuis
Thanks for the feedback
I will try and send you a short document with examples, workflows and such.
Have a great evening

@bchapuis bchapuis added enhancement New feature or request help wanted Extra attention is needed labels Mar 5, 2023
@bchapuis
Copy link
Member

The current configuration format for workflows allows to use databases. What is missing is the ability to create vector tiles from several databases. @julsbreakdown if this is something you need, I suggest to log another issue That describes this use case.

@julsbreakdown
Copy link
Contributor Author

@bchapuis
Sorry, did not see your response..
So is it possible to have multiple tilesets on one instance?

@bchapuis
Copy link
Member

bchapuis commented Apr 8, 2024

@julsbreakdown It is not possible to have multiple tilesets or multiple databases on a single instance yet. It should be straightforward to implemnet, but I'm a bit worried about having multiple connection pools in the same JVM. Have you concidered starting several processes?

@julsbreakdown
Copy link
Contributor Author

Yes we have considered it, but starting several instances of Baremaps seemed kinda of overkill. But if you think it is better of, we will probably go this way

@bchapuis
Copy link
Member

bchapuis commented Apr 9, 2024

I think we can open a new issue and discuss the feature and its implementation.

@bchapuis
Copy link
Member

bchapuis commented Apr 9, 2024

Not sure how to interpret the laugh emoji ;)

The discussion has spanned over a long period of time, and I have a limited understanding of your use case. My current impression is that you'd like to serve several tilesets, each of which may involve one or more databases and may potentially be associated with one or more stylesheets. This scenario is not as simple as it sounds, and things could go sideways. I'd love to break things down and, for instance, start by implementing multi-database support with a single tileset or multi-tileset with a single database. Does this make sense? What would be your priority.

@julsbreakdown
Copy link
Contributor Author

It was meant to be 'joy' !

@julsbreakdown
Copy link
Contributor Author

And yes you are correct.

@bchapuis
Copy link
Member

Cool, I created #845 to discuss the single tileset with multiple databases case and #846 for the ability to serve multiple tilesets.

BTW, the voting process to release apache baremaps 0.7.3-rc1 just started and you are welcome to check the release artifacts and add you vote.

https://lists.apache.org/thread/cvz3y3rqsnv37zqx8b7vo65f6lpbtjm6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants