Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 20 of 41 total
Thread 1000 Databases With 64 Datasets Each Crashes The EWB Server
Wed, Aug 8 2018 11:42 AMPermanent Link

Frederick Chin

Uli,

/*
If you have several databases defined in EDB, this would be a possible
approach:
*/

This is how I envisioned EWB server should work, i.e. store the database definitions in a table and refer to them when I set the DatabaseName in the EWB application. Currently, all the database definitions are stored in an INI file which is then loaded entirely to memory. This is causing the GB memory consumption with my 1,000 databases.

/*
But generally I doubt that it's the right way to create 1.000 databases.
Why not use just one database and uses a CustomerID to query the
database in a secure way? What are the security issues you mentioned?
*/

I don't plan to use a single database to store accounting data from multiple clients because of the huge volume of records and slowness of filtering out records. Security is not so much an issue as confidentiality. It is unlikely that clients are comfortable knowing that their data is mixed with other people's data and some programming error caused their data to be viewed by others.

--
Frederick
Wed, Aug 8 2018 11:50 AMPermanent Link

Uli Becker

Frederick,

> This is how I envisioned EWB server should work, i.e. store the database definitions in a table and refer to them when I set the DatabaseName in the EWB application. Currently, all the database definitions are stored in an INI file which is then loaded entirely to memory. This is causing the GB memory consumption with my 1,000 databases.

You didn't read well what I wrote: no database definition necessary in
EWB when you use a module.

> I don't plan to use a single database to store accounting data from multiple clients because of the huge volume of records and slowness of filtering out records. Security is not so much an issue as confidentiality. It is unlikely that clients are comfortable knowing that their data is mixed with other people's data and some programming error caused their data to be viewed by others.

I think you are wrong with this. Do you really think that companies with
big databases like Spotify or Facebook with millions of users are using
millions of databases? Smile

Uli
Wed, Aug 8 2018 6:33 PMPermanent Link

Frederick Chin

Uli,

/*
You didn't read well what I wrote: no database definition necessary in
EWB when you use a module.
*/

Based on your example, would I have to write a function for each of the 64 datasets that I have?

/*
I think you are wrong with this. Do you really think that companies with
big databases like Spotify or Facebook with millions of users are using
millions of databases? Smile
*/

These guys probably have server farms and industrial-strength databases to handle that number of users. In addition, they are unlikely to have to stop use of their data so that month and year-end processing can be carried out. Coding accounting systems is a bit different.

My current VPS has 600MB free memory and 8GB of available disk space. I'd like to see if EWB can pass muster with this kind of specifications.

--
Frederick
Thu, Aug 9 2018 4:14 AMPermanent Link

Matthew Jones

Frederick Chin wrote:

> Security is not so much an issue as confidentiality.

What is the difference in programming terms? The key to me is that you seem to be having the client be able to specify which database set it is going to access. That's just an open door to anyone. Without the complete control at the server level, I think you are going to be unable to achieve a confidential or secure system. Maybe I'm wrong though, but the database connection decsion must be under the control of the server at all times.

--

Matthew Jones
Thu, Aug 9 2018 5:02 AMPermanent Link

Uli Becker

Frederick,
 
> Based on your example, would I have to write a function for each of the 64 datasets that I have?

?? I just showed how to modify the databasename of a database using a module by receiving the (encrypted) CustumerID from the client. Once the databasename has been modified, the module returns records of this database. Thus you need just one database instance within your module and change its "database" property according to the CustomerID. That has nothing do to with your 64 datasets.

> My current VPS has 600MB free memory and 8GB of available disk space.

Hmmmm....

Uli
Thu, Aug 9 2018 5:07 AMPermanent Link

Frederick Chin

"Matthew Jones" wrote:

/*
What is the difference in programming terms? The key to me is that you seem to be having the client be able to specify which database set it is going to access. That's just an open door to anyone. Without the complete control at the server level, I think you are going to be unable to achieve a confidential or secure system. Maybe I'm wrong though, but the database connection decsion must be under the control of the server at all times.
*/

I dunno. The current EWB server is doing a great job telling the EWB application where the data directory is when I set the DatabaseName of the Database to a different database name. Since it is the server doing the job, it appears to be secure.

I will be a happy camper if it can do so without consuming 1.6GB of memory for 1,000 databases and without me having to write a module to do the same job it is doing now.

--
Frederick
Thu, Aug 9 2018 5:51 AMPermanent Link

Matthew Jones

Frederick Chin wrote:

> when I set the DatabaseName of the Database to a different database name. Since it is the server doing the job, it appears to be secure.

If your description is accurate, it does indeed seem to be okay. Now you just need to be able to specify the path for it.

--

Matthew Jones
Thu, Aug 9 2018 11:45 AMPermanent Link

Frederick Chin

Uli,

/*
?? I just showed how to modify the databasename of a database using a module by receiving the (encrypted) CustumerID from the client. Once the databasename has been modified, the module returns records of this database. Thus you need just one database instance within your module and change its "database" property according to the CustomerID. That has nothing do to with your 64 datasets.
*/

Thanks. I'll give it a short. Will this work with DBISAM?

/*
Hmmmm....
*/

What can I say? I am a sucker for punishment. Smile

So far, EWB is holding up but the record and user count is still light.

--
Frederick
Thu, Aug 9 2018 5:45 PMPermanent Link

Raul

Team Elevate Team Elevate

On 8/9/2018 11:45 AM, Frederick Chin wrote:
>
> Thanks. I'll give it a short. Will this work with DBISAM?
>

Sure - nothing really changes here except your module dynamically
connects to appropriate database on the backend (invisibly to EWB).

Raul
Fri, Aug 10 2018 10:44 AMPermanent Link

Frederick Chin

Raul wrote:

/*
Sure - nothing really changes here except your module dynamically
connects to appropriate database on the backend (invisibly to EWB).
*/

Thanks. I'll try to code the web module and see if I can get it to work. (I haven't done this before)

--
Frederick
« Previous PagePage 2 of 5Next Page »
Jump to Page:  1 2 3 4 5
Image