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

Adding new service to save orders to database #912

Open
luke6Lh43 opened this issue Jun 1, 2023 · 17 comments
Open

Adding new service to save orders to database #912

luke6Lh43 opened this issue Jun 1, 2023 · 17 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@luke6Lh43
Copy link

luke6Lh43 commented Jun 1, 2023

Feature Request

Hello Team.

I've been playing a bit with OpenTelemetry demo and started to think if there is any specific reason why we don't have any database instance (apart from Feature Flag Store)? I believe the easiest way to introduce it would be to create new service which reads orders from queue (Kafka) and save them to Database (e.g. MySQL or MongoDB). Then there could be some additional function added to Accounting Service which reads data from DB and perform some calculation. This additional feature would create additional capabilities to emphasise how great project OpenTelemetry is.

What do you think about this idea?

@luke6Lh43 luke6Lh43 added the enhancement New feature or request label Jun 1, 2023
@puckpuck
Copy link
Contributor

I like this idea, but I wonder if we can use Postgres here as a shared database that can do both the Feature flag service and this new order persistence service.

@luke6Lh43
Copy link
Author

Yes, it should work too :)

Ideally, we should have opportunity to deploy various types of DBs (MySQL, PostgreSQL, MongoDB) and enable them in helm chart, so we could give a user (vendor) opportunity to test/showcase particular DB connection. From the service perspective it shouldn't be a problem as we could use env variable to choose DB which is currently used.

@Kimbohlovette
Copy link

Kimbohlovette commented Mar 18, 2024

Hello @jpkrohling @austinlparker could you assign this issue to me?

@Kimbohlovette
Copy link

Kimbohlovette commented Mar 20, 2024

Hello @puckpuck this is a run down of how I'm going to implement at least for what we want to achieve

  • Add a database service to the docker-compose file called database
  • Create a golang service with the following
    - kafka consumer - api to establish connection with the kafka service and listen to make order messages
    - connection to a postgresql database

Of course we can add options for users to specify other database types to use later on.
What do you think?

@puckpuck
Copy link
Contributor

@Kimbohlovette , I don't think we need a new service for this. The accountingservice is a Go service that already exists as a Kafka consumer for all orders. This should be a good starting point to add logic to connect to a database and read/write some records.

Also please call the database service postgresql or mysql etc.

@julianocosta89
Copy link
Member

@Kimbohlovette and @puckpuck I think we need to discuss further this before starting implementing.

AFAIK accountingservice is about to be replaced by an Elixir service.
And I think @joshleecreates is already looking at it.

@Kimbohlovette
Copy link

@Kimbohlovette , I don't think we need a new service for this. The accountingservice is a Go service that already exists as a Kafka consumer for all orders. This should be a good starting point to add logic to connect to a database and read/write some records.

Also please call the database service postgresql or mysql etc.

Alright thank you I will see to that

@Kimbohlovette
Copy link

Kimbohlovette commented Mar 20, 2024

@Kimbohlovette and @puckpuck I think we need to discuss further this before starting implementing.

AFAIK accountingservice is about to be replaced by an Elixir service. And I think @joshleecreates is already looking at it.

@puckpuck what do we do with respect to this comment?
I think more about this idea of replacing the accountingservice with Elixir was discussed in #1343

@puckpuck
Copy link
Contributor

We should pause to let people return from Kubecon EU and read up on this thread. It doesn't hurt to have mulitle services in different languages talking to a database, but I want to make sure those efforts are coordinated properly.

@Kimbohlovette
Copy link

Alright thanks sir

@julianocosta89
Copy link
Member

From SIG meeting discussion yesterday, the accountingservice will not be replaced.
We can continue with @puckpuck's suggested solution.

@Kimbohlovette
Copy link

Kimbohlovette commented Sep 16, 2024

Hello @julianocosta89 it looks like the accountingservice has been converted to a C# service

@Kimbohlovette
Copy link

So will this issue still work well with the accounting service?

@luke6Lh43
Copy link
Author

Hello everyone,

I initiated this topic a year ago and am excited to resume work on it! I'm comfortable with utilizing the Accounting Service for this purpose. For phase 1, I suggest we start with a single database, such as MySQL, and then expand to other databases in subsequent phases.

@Kimbohlovette, are you C# developer? Will you be working on PR for this?

@Kimbohlovette
Copy link

Hello everyone,

I initiated this topic a year ago and am excited to resume work on it! I'm comfortable with utilizing the Accounting Service for this purpose. For phase 1, I suggest we start with a single database, such as MySQL, and then expand to other databases in subsequent phases.

@Kimbohlovette, are you C# developer? Will you be working on PR for this?

Hello @luke6Lh43 I have not code with C# before

@luke6Lh43
Copy link
Author

I am not a C# developer either, but I am willing to give it a try and see if I can implement this change. Stay tuned!

@Kimbohlovette
Copy link

I am not a C# developer either, but I am willing to give it a try and see if I can implement this change. Stay tuned!

Alright sir

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

No branches or pull requests

5 participants