[Y-devel] Access control

Andrew Suffield asuffield at debian.org
Fri Mar 5 20:48:07 GMT 2004


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:
> > > > I joined the mailining list only two days ago, so I beg your pardon if I state 
> > > > already solved problems.
> [..]
> > > I asked about that problem on irc yesterday and mark told me that the
> > > module manager does not support intermodule dependencies and alike. He
> > > would apreciate if someone would try to write a better one which
> > > supports things like (as i understand the problem):
> > > - reference counting
> > > - dependency resolution
> > 
> > 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.

> > > [- 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,
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.

> > > 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.

> 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.

> (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.

> (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.

> (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.

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.

-- 
  .''`.  ** Debian GNU/Linux ** | Andrew Suffield
 : :' :  https://www.debian.org/ |
 `. `'                          |
   `-             -><-          |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://www.y-windows.org/pipermail/y-devel/attachments/20040305/b5324b4d/attachment-0001.bin


More information about the Y-devel mailing list









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