[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] When to use libevent?



On 07/05/2010 08:45 PM, Nick Mathewson wrote:
On Sun, Jul 4, 2010 at 10:06 AM, Stef Bon<stefbon@xxxxxxxxx>  wrote:

I'm wondering, when writing a fuse module to get access to an Internet
service like Flickr or a webservice
like a cloud, is libevent required??

As for the question of whether you *should* or *could* use Libevent in
implementing a user-space filesystem... I don't know why you couldn't.
  You can get an intro to what libevent can do for you at
http://www.wangafu.net/~nickm/libevent-book/  .  Only you can decide
whether that functionality is a good fit for your program, though.


Certainly, it can be done;

	http://hg.qmsk.net/evfuse.hg/file/0b92d553400a/src/evfuse.h
	http://hg.qmsk.net/evfuse.hg/file/0b92d553400a/src/evfuse.c

	(fix the code to use your own error handling)

But this requires that you use libfuse's low-level API, since the normal high-level/path-based API is completely synchronous. But if you're willing to work with the asynchronous low-level/inode-based API, it's works very well.

 -- Tero Marttila
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.