Sorry for my poor English...
I am in developing a huge network system. We use ICE as our network
component library. Some component in our system is distributed among
sever computers. Components who work extensively requiring each
other couple tightly in one process for reaching maximun speed. I track
the example calling path for local request in ICE:
1 . Invoking the proxy call 'op'
-------------------------------------------------------------------
::IceInternal::Handle< ::IceDelegate::Ice::Object> __delBase =
__getDelegate();
::IceDelegate::Filesystem::Node* __del =
dynamic_cast< ::IceDelegate::Filesystem::Node*>(__delBase.get()) ;
return __del->name(__ctx);
-------------------------------------------------------------------
2 . Calling to __getDelegate()
-------------------------------------------------------------------
Handle< ::IceDelegate::Ice::Object> delegate;
if(_reference->getCollocationOptimization())
{
ObjectAdapterPtr adapter = _reference->getInstance()->
objectAdapterFactory()->findObjectAdapter(this);
if(adapter)
{
Handle< ::IceDelegateD::Ice::Object> d = __createDelegateD();
d->setup(_reference, adapter);
delegate = d;
}
}
-------------------------------------------------------------------
3 . In delegate method
-------------------------------------------------------------------
::IceInternal:irect __direct(__current);
::Filesystem::Node* __servant = dynamic_cast< ::Filesystem::Node*>
(__direct.servant().get());
if(!__servant)
{
::Ice::OperationNotExistException __opEx(__FILE__, __LINE__);
__opEx.id = __current.id;
__opEx.facet = __current.facet;
__opEx.operation = __current.operation;
throw __opEx;
}
try
{
return __servant->name(__current);
}
---------------------------------------------------------------------
4 . Get Direct Object , find the servant on the fly.
---------------------------------------------------------------------
ServantManagerPtr servantManager = adapter->getServantManager();
assert(servantManager);
try
{
_servant = servantManager->findServant(_current.id, _current.facet);
---------------------------------------------------------------------
5 . Do actual calling on the servant.
The calling path is very clear and straight forward. BUT there
is no optimization at all for local object locating except the
marshaling processing.
I look the COM model . COM M has local method invoking
accelaration. So the in process server is fast enough to replace
some old style C++ DLL Library for maximun flexibility.
Could ICE adds some mechanism for fast local object request??
We need your help.

irect __direct(__current);
Reply With Quote