<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'><br>Thank you Norman, <div>it is really more than sufficient answer. </div><div><span style="font-size: 12pt;">since i am still new with Geonde it may early to give an advise</span><span style="font-size: 12pt;">, </span>regarding to the book ,it is an amazing effort ( i went through few parts of it since yesterday), but do you think that it will be better to include some more code examples. what i mean is making the book as reference to "how to develop in Genode". </div><div><br></div><div>thank you again for your answering. </div><div>best. </div><div><br><div>> Subject: Re: RPC parameters<br>> To: genode-main@lists.sourceforge.net<br>> From: norman.feske@...1...<br>> Date: Thu, 14 Jan 2016 12:09:30 +0100<br>> <br>> Hello,<br>> <br>> On 14.01.2016 11:52, Bilal ma wrote:<br>> > Thank you for the examples, does it make difference if i don't pass my<br>> > input-output POD struct by reference since it need to be copied to the<br>> > server side, and later from the server to the client. <br>> > from the point view of performance which one is the best if we add the<br>> > option of placing my POD in shared memory. <br>> <br>> the RPC mechanism always copies data. It does not use shared memory.<br>> Please review Section 8.12.2. "Transferable argument types" to get a<br>> picture how different argument types are handled.<br>> <br>> If a reference is passed as argument, the following steps are taken:<br>> <br>> 1. The argument is copied into the message to be sent to the server.<br>> <br>> 2. The server instantiates a temporary object of the argument type<br>> and copies the argument from the message to the temporary object.<br>> <br>> 3. The server-side RPC method is called with a reference to the<br>> temporary object as argument.<br>> <br>> 4. Once the server-side RPC method returns, the new content of the<br>> temporary object is copied to the reply message buffer.<br>> <br>> By using the temporary object instance, it looks like you pass a<br>> reference. But under the hood, the server operates on a different object.<br>> <br>> You mentioned performance. If you need to transfer large amounts of bulk<br>> data between components, you may consider shared memory. For a<br>> description of how to set up shared memory between components, please<br>> refer to Section 3.6.3. "Shared memory" in [1].<br>> <br>> That said, I recommend you to think twice about introducing a new<br>> session interface. Maybe an existing interface would do the job just<br>> fine when looking at your problem from a slightly different angle? To<br>> cite the intro of Chapter 4:<br>> <br>> "The versatility of a component-based system does not come from<br>> the existence of many components alone. Even more important is<br>> the composability of components. Components can be combined only<br>> if their interfaces match. To maximize composability, the number<br>> of interfaces throughout the system should be as low as possible,<br>> and all interfaces should be largely orthogonal to each other."<br>> <br>> Whereas it is a nice exercise to design a custom RPC interface, I mostly<br>> advise against it. In particular, if your interface is just a bunch of<br>> getters and setters, the existing ROM and Report session interfaces may<br>> accommodate you quite well.<br>> <br>> [1] http://genode.org/documentation/genode-foundations-15-05.pdf<br>> <br>> Cheers<br>> Norman<br>> <br>> -- <br>> Dr.-Ing. Norman Feske<br>> Genode Labs<br>> <br>> http://www.genode-labs.com · http://genode.org<br>> <br>> Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden<br>> Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth<br>> <br>> ------------------------------------------------------------------------------<br>> Site24x7 APM Insight: Get Deep Visibility into Application Performance<br>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month<br>> Monitor end-to-end web transactions and take corrective actions now<br>> Troubleshoot faster and improve end-user experience. Signup Now!<br>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140<br>> _______________________________________________<br>> genode-main mailing list<br>> genode-main@lists.sourceforge.net<br>> https://lists.sourceforge.net/lists/listinfo/genode-main<br></div></div> </div></body>
</html>