473,386 Members | 1,773 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Data Storage, Interface and Design

(if this is the wrong place to ask this, please let me know where the right
place is)

I've been attempting to come up with a sane, and relatively simple design
for a set of objects that separate the storage, and interface/access to
that data. So far I've had no luck coming up with something I'm happy with.

The data being stored will typically be groups of double floating point
numbers, and integers, groups will tend to have 2 to 4 items per.

Access to the groups and to the individual items in each group is required,
and should be relatively "fast" (ah, love that premature optimization, but
I _know_ it will become a bottleneck at some point)

Also the amount of data being stored will vary depending on the number
of "objects" that access the interface, and the number of data points each
object has.

As an extension, each object will need several types of "data", each with
varying numbers of items and groups.

A simple example would be like a 3D object:

Object {
Vertex {
Point -> double[3]
Normal -> double[3]
Color -> uint8_t[4]
}[N]
}

* where N is the number of vertexes an object has.

Now why don't I just store them in a form like I just laid out? Because Its
SLOW, and can't take advantage of certain acceleration that 3d APIs
provide.

Basically I need to store each of the data types in a separate contiguous
chunk of memory (technically they could be concatenated and stored in the
same chunk, but that won't allow for decent times when appending to each
data type).

So far I haven't been able to come up with a simple, yet extendable/flexible
interface.

--
Thomas Fjellstrom
Jul 1 '06 #1
4 1710
* Thomas Fjellstrom:
(if this is the wrong place to ask this, please let me know where the right
place is)


Don't know, because you're not concrete enough that I can infer what the
problem is, much less whether it has anything to do with C++.

However, since the answer to /any/ programming problem is indirection,
note that C++ has pointers and references.

If that doesn't make you happy, try the Mentos+Diet Coke experiment?

--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
Jul 1 '06 #2
Alf P. Steinbach wrote:
* Thomas Fjellstrom:
(if this is the wrong place to ask this, please let me know where the
right place is)
Don't know, because you're not concrete enough that I can infer what the
problem is, much less whether it has anything to do with C++.


The problem is that I want to separate the data storage from the interface,
and provide several storage implementations as well as several interface
implementations, and mix them up a bit if needed.
However, since the answer to /any/ programming problem is indirection,
note that C++ has pointers and references.
Yup, I'm not _that_ simple ;)
If that doesn't make you happy, try the Mentos+Diet Coke experiment?


Don't have any mentos :(

--
Thomas Fjellstrom
Jul 1 '06 #3
how about use BerkeleyDB for your storage, fast access
sleepycat.com

Jul 1 '06 #4
happyvalley wrote:
how about use BerkeleyDB for your storage, fast access
sleepycat.com
that could be one option, or sqlite.. but the immediate types of storage
I'll be using is a vector like object with OpenGL VertexBufferObject
replication.

--
Thomas Fjellstrom
Jul 2 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
9
by: cryptic_blade | last post by:
I am working on the design for a new application and want to make the program fully object oriented. I have built and used C++ classes before, but never with a database driven application. Should...
2
by: Mike | last post by:
Hi I have been tasked with converting my pulp and paper mills weekly projected and actual contractor hrs excel spreadsheet into a an Access 97 database. So far my design has been to use a...
2
by: Victor Fees | last post by:
I have a general question for which I would like to get some general input from the online community. I'm building an asp.net web application that will make extensive use of a SQL Server 2K...
41
by: laimis | last post by:
Hey guys, I just recently got introduced to data mappers (DTO mapper). So now I have a SqlHelper being used by DTOMapper and then business layer is using DTOMapper when it needs to persist...
1
by: Diane Yocom | last post by:
I'm still very new to ASP.Net, so wanted to get some advice on how to solve the following design problem (sorry my explanation is so long): I'm developing an ASP.Net intranet app (using VB.Net...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
3
by: olduncleamos | last post by:
Hi all, What is, in general, the preferred practice to transfer data between business objects and the data layer? To be more specific, I have a couple of business objects with state data that...
18
by: Jens | last post by:
I'm starting a project in data mining, and I'm considering Python and Java as possible platforms. I'm conserned by performance. Most benchmarks report that Java is about 10-15 times faster than...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.