Am 09.03.2013 22:25, schrieb ArtemGr:
> Tommi Mäkitalo <tommi@...> writes:
>> Am 06.03.2013 00:51, schrieb ArtemGr:
>>> ArtemGr <artemciy@...> writes:
>>>> Tommi,
>>>> could you make it easier to get the component from the Tntnet?
>>> What I need is `tnt::Worker::comploader` (in framework/common/tnt/worker.h)
>>> to be public.
>>>
>> You have a method "fetchComp" in tnt::EcppComponent, which is the base
>> class of your component. You can just call fetchComp("comp <at> lib") in
>> ecpp. You get a reference to the component then. Do that help?
> Yeah, I've seen it, but fetchComp is not a static method, AFAIK one could only
> run it from a EcppComponent and one can only call EcppComponent
> via synchronous TCP/IP of Tntnet.
> What I'm doing is calling EcppComponent from inside an asynchronous stack
> (it would've be much easier to do everything the Tntnet way,
> but Tntnet currently lacks support of asynchronous request handling).
>
Ah ok. I wanted to answer, that there may be multiple instances of 
tntnet objects in a process but there is just one single comploader. I 
just checked in a static public accessor 
tnt::Worker::getComponentLoader(), which returns a reference to the 
Comploader object.

I would really like to understand, how you do this asynchrounous thing. 
I just think about, what I would do different, when I would start from 
scratch. It may be an option to re implement the kernel of tntnet if it 
is a big win. The assumptions in http communication, which were true 10 
years ago, when I started with tntnet are not all true today. 
Asynchronous requests using websockets is one thing. Also this new 
google http extension spdy changes the way a http server implementer has 
to think about sockets. It was true, that one connection can handle 
exactly one request in one time and hence can be bound to a single 
thread. But it is not true with spdy. So a tntnet reboot may be an option.

Tommi

------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to