[Xorp-hackers] Taking benefit of parallel processing in BGP

Simon van der Linden simon.vanderlinden at student.uclouvain.be
Wed Dec 16 06:12:15 PST 2009


On 16/12/09 12:46, Bruce Simpson wrote:
> Simon van der Linden wrote:
>> At first, I thought I could use threads inside the BGP process, but
>> following a few readings and a discussion with Adam Greenhalgh from
>> the UCL, I gave up: the underlying libraries are not thread safe, and
>> making them thread-safe would be enough to complete a master's thesis :-)
>
> Actually, it isn't out of the question -- it just involves working from
> the ground up, and this probably means gaining a lot of low-level
> familiarity with libxipc and libxorp.
>
> Another approach is to consider native C++ shared memory approaches.
> Boost.Interprocess has this capability; it supplies STL-like container
> implementations which can be shared across multiple address spaces.
>
> One of the things that I had slated for the current round of changes,
> was to change over to using Boost.ASIO, which is conceptually similar to
> stuff that's already in libxorp, and was designed to be thread-safe from
> the ground up.
>
> Unfortunately, the changes to migrate to using Thrift as the underlying
> RPC implementation for XRL, are not currently complete -- Thrift itself
> has been ported on top of ASIO, and can integrate with its event loop.

I'm not sure to follow you. On the one hand, you mention 
Boost.Interprocess, to use processes instead of threads. How would 
communication with other processes through XRL work in this case?

On the other hand, you mention Boost.ASIO, which implements features 
similar to what libxorp does but in a thread-safe way. In this case, 
adapting all the XORP stack would be needed.

And eventually, you mention uC++, which provides advanced concurrent 
structures on top of C++. It doesn't seem that those abstractions would 
leverage the need for a thread-safe library to replace current libxorp 
and libxipc though.

Is this correct?

Regarding my thesis, which solution you think would be feasible in a 
4-month timeframe starting next February, keeping in mind that bringing 
threading support in XORP is not the ultimate goal?

Regards,

-- 
Simon van der Linden
Computer Science and Engineering Student
INGI/EPL/UCLouvain



More information about the Xorp-hackers mailing list