-
Notifications
You must be signed in to change notification settings - Fork 242
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
Add support for HerdDB database #183
Conversation
@eolivelli Thank you very much. Is it necessary to create a new file herddb-schema.sql for herdDB? is it fully compatible with MySQL? But I threw the following exception when running locally. What do I need to do:
Do I need to change a version? |
932a339
to
3a563a6
Compare
@eolivelli - @tuteng is the expert of Pulsar Manager. He can help review your code change. |
Cool. I still don't have it clear how you a deploying this application. If we start the DB inside the same process you can still run many instances of the backend with HerdDB. Another point: as far as I can see one Pulsar Manager is able to connect to more than one Pulsar cluster, but there is a 'bookie' option, what is that for? If you are managing a single Pulsar cluster, with a ZK cluster and BK cluster you can use that one to support the Herd DB instance The best setup for standalone (single machine) backend I think in HerdDB case is to run the server inside the backend and provide a directory for data, metadata and journal, without Bookkeeper/ZK. |
Pulsar manager comprises of frontend and backend. The frontend is a vuejs application rendering the management and monitoring pages. The backend is a springboot application. You can co-run frontend and backend in one machine or one containerr.
Currently we store very minimal informations in SQL database, plus the collected metrics. Most of the restful requests are forwarded back to the real Pulsar brokers.
Yes.
I am not sure how does it. I would image HerdDB is more like a mysql instance. Then many backend instances will connect to the mysql / herdDB?
a Pulsar cluster is comprised of brokers, bookies, function workers and many other components. The cluster management and monitoring provides the capability to manage and monitor all the components. |
Thanks for your clarification @sijie. I will send links to docs for available deployment options for HerdDB |
@tuteng Do you have time for a review ? |
Ok, no problem. |
- add HerdDB dependency - change queries in order to be compliant with MySQL dialect of Apache Calcite - add example configuration for HerdDB
d176ee6
to
b763af0
Compare
@tuteng this patch is ready for review now. |
@tuteng I did another pass, trying to click on every page of the web application. |
"topic IN <foreach collection='topicList' item='topic' open='(' separator=',' close=')'> #{topic} </foreach>" + | ||
"GROUP BY cluster, persistent, topic" + | ||
"GROUP BY environment, cluster, tenant, namespace, persistent, topic, `timestamp` " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this "group by" clause was incomplete and Apache Calcite wasn't happy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed it here streamnative#190
@tuteng HerdDB standalone, embedded (same process of the backend) can handle big databases as this is its primary usecase in production in other projects. You can evaluate to switch to HerdDB for tests and single instance deployments instead of SQLLite. Supporting PostGre is good as it is widely used by many companies and the license is better than MySQL. HerdDB can again be a good alternative to have a replicated (high availability) database, it is really easy to setup replication if you already have a ZK cluster and you can even use your Bookies from Pulsar |
@sijie I will rebase this patch. |
@eolivelli I have done some tests locally and all the features are running well. Thank you very much for your contribution. However, when I started the service, the log encountered the following errors about HerdDB. I don't know if they have any influence. Can you take a look at them for me? I will consider using it as a test database. Before that, I will first learn about the use of this database. |
The 'ERROR' lines are logged as level SEVERE. |
+1 that's a good idea to start using it as a test database. We can promote HerdDB as one of the databases to use in the documentation. |
@tuteng @eolivelli if this pull request is almost ready, we can probably move forward with it so that we can start using HerdDB in the tests. |
@sijie awesome ! I will rebase today |
Superseded by #194 |
Master Issue: #177
This patch introduces support for HerdDB as storage:
It is possible to boot the server inside the application for persistent storage or even for replication.
In case of replication it uses ZooKeeper and BookKeeper.
Side note:
In order to test this branch: