Problems, need help? Have a tip or advice? Post it here.
12 posts Page 1 of 2

Come across a situation where users will input information daily into a data base. In order for the information to be private and users specific the fields should go into userindex. but how to avoid writing thousands of lines to store all the days data for years so it can be reviewed.


everyday someone wants to input how many cookies they ate.

Thank you.

Would it be like a "thousands of lines" (i.e. records or pages in Couch) per day?

Please elaborate over the context more - how many maximum users expected, how many expected to be concurrently logged-in, how may pages expected to be created per day etc.

Also how would the stored data be utilized? - would you need complex reports where the records are aggregated, averaged etc?

To start with 500 users. Each user will input 20 lines of data a day. most fields would be numbers of no more then 3 words.

The data will be called on for review and tracked to see monthly yearly analysis, in different ways.

Max users online adding data, really unknown at this point. For now at a extreme max say 100 users at this point.

Is there limitations to user base size? Or just different approaches?

Thanks KK

OK, so we are looking at creating 10,000 pages per day (if we go the Couch way and create a cloned page for each record).
That would amount to several million pages per year.

Theoretically, Couch should have no problem in allowing the creation of these number of pages.
However, your primary purpose for inputting those pages in not displaying them on the frontend - rather it is to use them for analysing their data and creating reports, This would be a bottleneck as Couch, out of the box, is not geared for this.

As a possible workaround, you'll have to retrieve the inputted data (it is in EAV form so will take some effort), repopulate them into denormalized star tables to make the data fit for analysis.

So, all in all, I'd say Couch would not be a good fit for this and you should go with a PHP framework like Laravel or Symfony.

Hope the answer helps.

Thanks for your response. the data would be reviewed by the user rather then a mass collection. Its for the user to monitor there data on the front end.

They may be admin or mentors who we view the users info also. I want to avoid leaving couch at all costs.
I want to avoid leaving couch at all costs

A good trial is better than any discussion here. Generate some random data in Excel for, say, 100 users + 100 days and upload it to the CMS. Then use some online tool to simulate user activity, sit back and relax :)
Have you already ordered a 4-core dedicated server? ;)
Will get back to you on this. with a more detailed understanding, i think i need to hire on this one start to go outside my depth.
I think you could use couch for the input, then output json and use some ajax and js (like vue.js) for displaying reports and so on.

Thanks that sounds interesting have you set that up before?

yes I use vue.js and axios.js for calling and filtering couch json data. For some functions (I have yet to start working on) I need to visualize some data in charts and probably going to use this as a starting point. As you can see from that example by using vue.js and vue-chartjs you only need about 15 line of code to display some data in a chart.

In short you need:

- a couch file that generate data in json format
- vue.js for client side handling, data display and filtering
- axios.js for calling the data when needed
- vue-chart.js for charts if needed.
12 posts Page 1 of 2

Who is online

In total there are 5 users online :: 0 registered, 0 hidden and 5 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 5 guests