From: Bob Smith <bsmith@linuxtoys.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface
Date: Thu, 08 Aug 2013 14:23:06 -0700 [thread overview]
Message-ID: <52040C3A.9090708@linuxtoys.org> (raw)
In-Reply-To: <20130807213325.GB5373@kroah.com>
Greg Kroah-Hartman wrote:>
> You are mixing protocols and bindings and system calls up it seems.
> They are not the same at all.
> How can you control a robot with this code?
> What do you want to do in order to control your robot? What are your
> needs in accessing the hardware? What hardware are you wanting to
> control? And why can't you just access that hardware through the normal
> kernel apis we have today?
Greg
I'll reply again to this message but for now let me try
another explanation that does not mention sysfs, procfs, or
device drivers. This is probably how I should have started.
=============================================================
proxy: a very lightweight alternative to FUSE
Proxy is a simple bidirectional character device that almost
transparently proxies opens, reads, writes, and closes from
one side of the device to the other side.
FUSE is great for giving applications a file system interface
to an application's internal variables and values. If a FUSE
application has an internal variable called "foo" then one way
that variable could be exposed is with a (FUSE) file system
entry. That is, reading and writing foo might appear as:
cat < /fuse_mp/foo
echo 5 > /fuse_mp/foo
An extraordinarily important, and often overlooked advantage
of FUSE applications is that they almost never need language
specific bindings. This is because every single programming
language in Linux supports file IO. You don't need a binding
to do something like this:
open(/fuse_mp/foo)
write(5\n)
close
While the API offered by FUSE is nice and FUSE is really great
for file systems, it has some severe limitations that may have
prevented more widespread use. For most daemon developers the
biggest limitation is that FUSE has its own main() routine.
This makes it difficult or impossible use use FUSE as just an
API in an application that requires select() and IO from other
parts of the system.
Proxy solves this problem. Proxy is intended for application
developers who would like to avoid writing many language specific
binding but who, for one reason or another, can not use FUSE.
Proxy has two sides. One side remains open to clients (like
the FUSE file system entries). The other side is connected to
the application and can be tied into that application's select()
(or other IO multiplexer in the case of node.js, for example).
Just as with FUSE, it is entirely up to the application writer
to format, and give syntax, and meaning to the data that passes
through the proxy device.
Adding proxy to the kernel may make it easier for new types of
daemons and services to appear in Linux since it can help remove
the burden of writing language specific bindings for the daemon.
thanks
Bob Smith
next prev parent reply other threads:[~2013-08-08 21:44 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <51FC5478.40500@linuxtoys.org>
2013-08-03 1:19 ` [PATCH 001/001] CHAR DRIVERS: a simple device to give daemons a /sys-like interface Bob Smith
2013-08-03 1:56 ` Joe Perches
2013-08-03 2:35 ` Greg Kroah-Hartman
2013-08-03 18:12 ` Bob Smith
2013-08-03 22:38 ` Greg Kroah-Hartman
2013-08-04 21:54 ` Bob Smith
2013-08-04 23:19 ` Greg Kroah-Hartman
2013-08-05 23:46 ` Bob Smith
2013-08-06 9:46 ` Greg Kroah-Hartman
2013-08-07 19:02 ` Bob Smith
2013-08-07 19:27 ` Greg Kroah-Hartman
2013-08-07 19:39 ` Bob Smith
2013-08-07 19:51 ` Greg Kroah-Hartman
2013-08-07 19:54 ` Greg Kroah-Hartman
2013-08-07 21:04 ` Bob Smith
2013-08-07 21:33 ` Greg Kroah-Hartman
2013-08-08 21:23 ` Bob Smith [this message]
2013-08-09 21:52 ` Greg Kroah-Hartman
2013-08-09 22:20 ` Bob Smith
2013-08-09 22:14 ` Bob Smith
2013-08-09 23:01 ` Greg Kroah-Hartman
2013-08-09 23:35 ` Bob Smith
2013-08-09 23:46 ` Greg Kroah-Hartman
2013-08-10 20:08 ` Bob Smith
2013-08-10 20:29 ` richard -rw- weinberger
2013-08-10 20:49 ` Bob Smith
2013-08-10 21:43 ` Arnd Bergmann
2013-08-10 22:07 ` Bob Smith
2013-08-13 20:15 ` Arnd Bergmann
2013-08-07 21:28 ` Bob Smith
2013-08-07 21:40 ` Greg Kroah-Hartman
2013-08-07 21:53 ` Bob Smith
2013-08-09 21:54 ` Greg Kroah-Hartman
2013-08-09 22:51 ` Bob Smith
2013-08-09 23:04 ` Greg Kroah-Hartman
2013-08-07 21:38 ` Bob Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52040C3A.9090708@linuxtoys.org \
--to=bsmith@linuxtoys.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox