Friday, October 07, 2011

Jari OS RPCv7 and Vnode

I wrote before why IDL failed. And I know that old uni_rpc_t RPC is failed too, it's not flexible, ugly and slow.
I'm working on this system about 5-6 years, well, and there are 6 attempts to create good IPC/RPC chain:
- v1 create a lot of structures and calls and implement it on the microkernel side
- v2 create one generic RPC in microkernel side
- v3 remove it from microkernel
- v4/v5 uni_rpc_t and related, try to assign all operation to the standard POSIX calls
- v6 IDL
None of this approaches are applicable.
I guess it's all about a way to resolve the problem. Each time I was try to solve one problem, not the set of those.
But, let's back to my favorite method of problem solving: divide and solve.
When you have a one big problem, it's better to divide it to many little ones, and solve it - one by one, and finally your big problem will be solved. Simple, isn't it ?
And now, we have a system, with many objects, with many problems, but ... make a guess, all of operations within this complex system is requests to the objects.
In that case, you just need to create the one generic object that may represent anything you want and provide generic interface to this object.
Well, you are welcome to the RPCv7.
Usually you can divide all your operations between several groups, to take a data, to control object and so on. Also, in Jari OS you need to have session with this object. That's all.
All your requests might be described with one generic header, not the data of the requests, not the some specific flags like it was done in v4/v5 versions, the header will describe request only.
struct rpc_signature.
Other stuff, are not RPCv7 stuff, it might be your data, headers and so on.
It was a first small problem solved. The second one is object representation.
And I got it, vnode, all things might be represented as vnode, it might have a memory mapping, set of many specific operations, many IDs, relations ... and RPC callbacks, the standard set
of it.
All you need - just implement this functions and forget about IPC/RPC headache.
And carrier function:

All data going via sbuf, just forget about IPC/RPC chain.

Well, I will write later about this implementation more, but you can always checkout the fresh sources.

No comments: