What if corelinux provided a mechanism to specify what logical memory and processor a class should be run under? Perhaps this could be done by a combination of templates, inheritance, and an overloaded new operator. The default context would be for a class to be stored on the heap and executed in the thread of the class's creator.
Doing this would provide lots of flexibility. For instance, let's say that a class needs to hold sensitive data. We could create a class called EncryptedMemory that acts as a decorator to other types of memory, like Heap. Now you just specify a decorated Heap as the storage medium for your new class's context, and all the class's data will be stored in an encrypted format in ram!
What if we want to run the class on another machine over the network and use RPC? Just create a class representing a logical processor that uses RPC and create any class within that context!
Does this sound at all possible? What drawbacks does this approach incur?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
jackster,
The first requirement is the basis of C++ so it is not a hard requirement to fill. We just need to provide the base classes that work together regardless of their derived behavior.
So you have a Heap a Memory Class and a Memory Factory. Derive EncryptedMemory from Memory and EncryptedMemoryFactory from MemoryFactory. Therefore if the behavior of the Heap is to manage Memory, then any Memory object should work.
The second one should be invisible to the local process, but the objects used locally are proxies to RPC, CORBA, JAVA, etc instances somewhere. I think this is outside of corelinux because it is already built. It would be up to the user to have the local proxy overide the methods that should be distributed. But I don't see a problem with it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
What if corelinux provided a mechanism to specify what logical memory and processor a class should be run under? Perhaps this could be done by a combination of templates, inheritance, and an overloaded new operator. The default context would be for a class to be stored on the heap and executed in the thread of the class's creator.
Doing this would provide lots of flexibility. For instance, let's say that a class needs to hold sensitive data. We could create a class called EncryptedMemory that acts as a decorator to other types of memory, like Heap. Now you just specify a decorated Heap as the storage medium for your new class's context, and all the class's data will be stored in an encrypted format in ram!
What if we want to run the class on another machine over the network and use RPC? Just create a class representing a logical processor that uses RPC and create any class within that context!
Does this sound at all possible? What drawbacks does this approach incur?
jackster,
The first requirement is the basis of C++ so it is not a hard requirement to fill. We just need to provide the base classes that work together regardless of their derived behavior.
So you have a Heap a Memory Class and a Memory Factory. Derive EncryptedMemory from Memory and EncryptedMemoryFactory from MemoryFactory. Therefore if the behavior of the Heap is to manage Memory, then any Memory object should work.
The second one should be invisible to the local process, but the objects used locally are proxies to RPC, CORBA, JAVA, etc instances somewhere. I think this is outside of corelinux because it is already built. It would be up to the user to have the local proxy overide the methods that should be distributed. But I don't see a problem with it.