ObjectStream: Difference between revisions

From Bitpost wiki
(New page: While this is almost standing on its own legs now, I may want to consider integration with boost::serialization... ObjectStream up and running! Cool! Needs a bit of refactoring.....)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 39: Line 39:
  replace Node/Nodefile/TNode with a serialization archive class?
  replace Node/Nodefile/TNode with a serialization archive class?
  
  
  rewrite and rename anything ripped from Parody (TNode, Key, NodeFile, etc.)
  rewrite and rename any concepts originally from Parody (TNode, Key, NodeFile, etc.)
  
  
  
  
Line 56: Line 56:
  node4
  node4
  object1 data3
  object1 data3
serialization enhancement
boost::serialization already includes a version number
this is related to a LINEAR HISTORY of the object
this tells you the serialization format - EXACTLY which fields to expect, in what order
it should also include a variation number
a variation of 1 means use "the full object" serialization format
each larger variation number should identify an ALTERNATIVE subset of fields, and order
note that the full set of variations will have to be maintained across versions, if old variations are to be supported
===========================================================
this is ABSOLUTELY NECESSARY in a message-driven SOA world,
if OO patterns are to survive, and be agile and compact
===========================================================

Latest revision as of 15:31, 27 April 2010

While this is almost standing on its own legs now, I may want to consider integration with boost::serialization...

ObjectStream up and running! Cool! Needs a bit of refactoring...

added BaseDatabase sample, fully compiling!

// Adding the following to the project... // BaseDatabase/ // BaseDatabase.* // Persistent.* // NodeFile.* // Btree.* // Node.* // DatabaseArray.* // Key.* // TNode.* // ..\..\Reusable\Win32\MFC\Crypto\blowfish.(h/cpp/dat) #include <BaseDatabase/BaseDatabase.h>

only added 16k to HangTheDJ.exe

now, I need to...

x rename ObjectStream object to BaseDatabase remove encryption implementation remove use of ObjectRefs - only classnames

create a second class, named ObjectDatabase derive from BaseDatabase incorporate ObjectReferences incorporate blowfish encryption include default keys for header and object

refactor/rewrite! replace btree with an LGPL version or boost version replace NewObject with something from boost replace Persistent and Read()/Write() (or use serialization in it) replace Node/Nodefile/TNode with a serialization archive class?

rewrite and rename any concepts originally from Parody (TNode, Key, NodeFile, etc.)


DESIGN NOTES

----- database file ---- header node1 object1 header object1 keys object1 data1 node2 object1 data2 node3 object1 data4 node4 object1 data3

serialization enhancement

	boost::serialization already includes a version number
		this is related to a LINEAR HISTORY of the object
		this tells you the serialization format - EXACTLY which fields to expect, in what order
	it should also include a variation number
		a variation of 1 means use "the full object" serialization format
		each larger variation number should identify an ALTERNATIVE subset of fields, and order
		note that the full set of variations will have to be maintained across versions, if old variations are to be supported

		===========================================================
		this is ABSOLUTELY NECESSARY in a message-driven SOA world, 
		if OO patterns are to survive, and be agile and compact
		===========================================================