How can i generate report in a micro service project

github logo ・1 min read

Hi all,I am creating a micro service project. now i am creating a report service to generate daily,monthly and yearly sells and profit information for a vendor(from vendor service).
So i need to get the data from vendor service to report service(in vendor service data can change time to time).i am planing to use elastic search to keep the real data in kibana. is it a recommended way ?
please give me idea. thanks in advance.

twitter logo DISCUSS (1)
markdown guide

Hmmm. I have to say, I don't like the sound of this approach unless you really need to use Kibana and Elastic Search? Unless everything needs to be real time. We already know the answer, it can't be when you are doing daily, monthly, and yearly reporting?

I happen to be writing a data publication solution for my property platform right now, which does the following;

  1. Open a library namespace.
  2. Iterate through reflection to return each classes' IEnumerable. (This is not expensive, so please don't say how terrible reflection is). This means I don't care what the data source is (SQL/Oracle/MongoDB)
  3. Save them as JSON.
  4. Publish via FTP.
  5. Send a notification to an end point.
  6. The end point will then invoke loading the publications into cache.
  7. Application/Service end points then have that data available.

We could change these steps, not use FTP etc BUT...
I would rarely take the above approach if I was doing this in an enterprise. I would simply build reports in SSRS and call the report server web service with a request stream. In the above example, I am developing software for a much more specific requirement than described but it is too bespoke for standard staff to support.

I would build a proper data warehouse or reporting database.

It always concerning vendor data can change time to time. This provides a risk of changing grain, meaning the more code you write to produce reports, the more risk there is in terms of maintenance.

My feeling is you need to be very careful not to try and build the solution you are describing just because it satisfies a high degree of technical expertise. There needs to be a genuine reason. Now, nothing is stopping you building a data warehouse or using SSRS to publish to a location where the data can end up in Elastic Search but be careful.

Classic DEV Post from Jan 14

Who's looking for open source contributors? (Jan 14th edition)

Find something to work on or promote your project here. Please shamelessly pro...

kajasumanie profile image
coder now has dark theme. 🌝

Go to the "misc" section of your settings and select night theme

P.S. If you sign up, you can also customize your feed based on technologies and devs you care about.