[Y-devel] Access control

Peter Prohaska pitrp at wg78.de
Fri Mar 5 21:51:26 GMT 2004


On Fri, Mar 05, 2004 at 08:48:07PM +0000, Andrew Suffield wrote:
> On Fri, Mar 05, 2004 at 07:02:01PM +0100, Peter Prohaska wrote:
> > On Fri, Mar 05, 2004 at 04:04:56PM +0000, Andrew Suffield wrote:
> > > On Fri, Mar 05, 2004 at 11:29:58AM +0100, Peter Prohaska wrote:
> > > > On Fri, Mar 05, 2004 at 10:39:21AM +0000, Leonardo Giordani wrote:
[..]
> > > Got those already. Intrinsic in the way DSOs work on an ELF
> > > platform. You don't normally want to do things that way, though.
> > 
> > I know, but a system independent aporach is important i think. If that
> > could be done by delivering / using an ELF lib that does the job would
> > be good enough probably.
> 
> I have no interest in making Y run on AIX or OS/390. I doubt anybody
> does. It's not useful and it just makes the code needlessly
> complicated.

Just switch between Linux, Mac and Windows and you have problems enough.
Maybe you can get all you need using just the system functionality. My
experience is that it leads to problems. That is probably the reason why
so many different approaches of how "modules" are loaded in different
applications exist.

> > > > [- maybe signature verification and checksum verification
> > > 
> > > Can't imagine any scenarios where this would be useful.
> > 
> > Loading modules over the network?
> 
> Insane and impossible. You would need something like java for this,

I definitly do not agree here. If I did, i would probably not install
debian packages on my box via download from the debian server.

> and it's a bad idea anyway; you can just install them on the server
> properly. Furthermore, even if it were a good idea, signatures and
> checksums would not do anything useful.

I disagree on both facts. As a user you often cannot "properly" install
them. By the way, what is that? I would like to be able to drag and drop
a module from my browser showing an ftp or nfs accessed resource, make
sure i trust it and then drop the cool windowmanager module on the
desktop to have it "properly" installed. I'm just lazy.

> > > > My current approach is to clean up the client interface a little and to
> > > > provide an interface for writing "client modules".
> > > > 
> > > > At the moment I have seperated the system into:
> > > > * Listener:
> > > >   - implements a server socket (i.e. tcp/ip, unix, etc.)
> > > >   - On connection request, it spawns a Channel object
> > > > * Channel:
> > > >   - responsible for read()/write()
> > > >   - registering with either the control module or what ever is used to handle
> > > >     sync/async io wakups
> > > >   - buffering
> > > > * ProtocolCodec / MessageCodec:
> > > >   - serialises / deserialises messages / data
> > > > * ProtocolCodecStack:
> > > >   - links a set of ProtocolCodecs together
> > > > * Client:
> > > >   - provides the send message / receive message interface
> > > >   - uses ProtocolCodecStack and Channel objects as backend
> > > 
> > > Sounds like a lot of unnecessary complexity to me. This isn't a
> > > particularly complex problem, there's no need for a headlong dive into
> > > the second system effect.
> > 
> > How would you like that done? Open for comments here.
> > Sure, you could join channel and client but the rest are destinct things.
> > If you choose to also join in the listener (like it is now) you
> > duplicate a lot of code and make it more error prone, i think.
> 
> I don't. I'm not exactly new to this stuff. The current code needs
> work, and I'll get to it, but this is not the solution. What you are
> suggesting would introduce a huge amount of fairly complicated code
> for no real reason.

I cannot see where it adds that much code. It just defines how things
interace a little more precise and eases splitting things up into small
modules. Sure you get binary code overhead due to modularity but i don't
care about that.

> > What i had in mind (in examples):
> > (1) Listener example:
> > I wnat to listen on more then one ip port, currently, that would
> > require loading the listener module two times with different
> > parameters => not possible.
> > So i could introduce some new methods to achieve that but then i think
> > the more natural aproach is to spawn N Listeners of the tcp
> > iplementation.
> 
> It's not. Even if this were a sensible thing to be doing, the right
> way is simply to bind to all the sockets you want. What you describe
> would merely make things complicated.

In what is that different in what i describe but that i give "simply
bind to all the sockets" a name and an interface?

> > (2)Channel example:
> > I want to stop listening for ip connections without terminating
> > existing ones. Currently, i would unload listener and it would destroy
> > all tcp connections. => not possible.
> > So if connection and listener are seperate entities, i just destroy the
> > tcp listeners. (why?... change the port, developing on the module from
> > inside Y)
> 
> I can't think of any reasons why you might want to do this. But you
> should do it via a special command, or by changing the config file and
> sending a SIGHUP like any other daemon. It's going to be a non-issue
> fairly soon, though.

Ok. Agreed. SIGHUP or SIGUSER* is the better aproach.

> > (3) ProtocolCodec:
> > Just reasonable to capsulate a specific implementatino into a module
> > that can be replaced easiely and is inndependent of where data comes
> > from and where it goes to. (Why?... license problems with specific
> > module implementations, code reuse, protocol changes over time may
> > easily be handled without loosing compatibility if needed)
> 
> It would help with none of these things.

If you want to recompile the whole server each time you want to add or
remove something. Ok.

> > (4) ProtocolStack:
> > Since the requirements of different environments / connection methods
> > may differ very much, it is easy to just create different stacks for
> > different uses and easily change which one is used. (Why?... running you
> > laptop at home connected via TX, move to a public library and use wlan,
> > plugging the thing in at work.
> 
> The kernel IP stack handles that. There aren't any interesting
> combinations that you need that can't be trivially handled
> directly. There is no need to rearrange them.

I just do not agree. I do not want to expand this point into a lenghty
discussion because this point depends very much on persanal taste.

> Stripping out the tcp stuff, folding the ipc/unix module into the
> core, and reimplementing remote access as an external daemon is on my
> todo list for next week sometime, when more important stuff is dealt
> with.

Agreed. Reducing the whole client comunication thing into just unix
sockets would be nice. I could move my whole stuff out into sort of a
seperate proxy to Y. That makes much sense. But does that work well
under windows? No clue here.

peter.



More information about the Y-devel mailing list









2026 © www.Y-Windows.Org - All Rights Reserved