Apache + Erlang for dynamic web content
21st Century Code WorksBest of Erlang - noreply@blogger.com (Benjamin Nortier) - March 05, 2008It dawned on me this morning that there is a way of using Apache (or any other web server for that matter) with Erlang to create dynamic web content…
How? Use FUSE. There is an implementation of FUSE for Erlang by the Dukes of Erl, called fuserl. If you haven’t heard of FUSE, it’s a way to make anything you want look like a file system. By using fuserl, you can make an Mnesia database (just one example) look like a file system. You can map queries to directories, and the files that are “listed” can contain the rows of your tables. But you can structure your filesystem in any way you want!
Take for example YoutubeFS: “YoutubeFS enables you to browse your favorite Youtube videos locally on your desktop without going to the youtube website. Just create a youtube account and add videos to your playlists, favorites list or subscribe to different channels. YoutubeFS then enables you to automatically load these videos to a local folder on your desktop. You can then view these videos (using a browser) as if they are local files.”
If you extend this idea, you can imagine that you can point your Apache server to a FUSE filesystem location which generates the “contents” of the file system dynamically. To Apache it looks like it’s serving normal files, but behind the scenes you can have a distributed Erlang system generating content for you…
This wouldn’t work so well if you actually want to use parameters in your http queries, but then I would use Yaws with an appmod if that’s what you need.
P.S. You don’t have to use Erlang either, you can write FUSE file systems in many other languages…
Categories: Blogs 21st Century Code Works Best of Erlang
Comments
This forum ndeeed shaking up and youÂve just done that. Great post!
Posted by Cheyanne on 05 May 2011 at 17:04
Add comment
Erlang on Twitter
» HornedKavu (Max Riveiro): RT @shwars: Вчера в докладе career.ru на #itedu были озвучены новые востреб.профессии на IT-рынке: Haskell-, Lisp- и Erlang-программист!
» phyrexianengine (Vasily K.): RT @shwars: Вчера в докладе career.ru на #itedu были озвучены новые востреб.профессии на IT-рынке: Haskell-, Lisp- и Erlang-программист!
» Erlang_ABNIC (Erlangga .A): @cjerikho829 selamat shooting ♈o kak.. Nitip salam buat kak @Bellaudya829.. ☺ Semangat (งˆヮˆ)ง
» dessyrosalia (♡pesek mancung♥ ): Erlang ke rumahku donk kangen nih
» si_erlang (Erlangga Adhitya): 75% dalane jahanam
» GeekDani (Dani Kim): @charsyam 그렇군용. :-) 여긴 서늘한데. 크크. Erlang Meetup 준비는 잘 하시나요. ㅋㅋ
» syahlafatimahA (LalaTik(ʃ⌣ƪ) ): Waaa?! Si erlang suka cherrybelle(?) wkwkwkwk ngakak aih xD
» yosukehara (Yosuke Hara): I’ll be a simple test for benchmarking JSX and Jiffy together. #erlang
» Debbyvheumen (Debby van Heumen): @elisaaa15 @kleingeld_ haha okee succes :) blijven jullie erlang
» ovatsus (Gustavo Guerra): RT @martintrojer: Just *blogged “Distributed Actors in Clojure” on http://t.co/WcKBpNBR #Clojure #Akka #Erlang #in
Statistics
Number of aggregated posts: 10498
Number of comments: 2115
Most recent article: May 15, 2012
Latest comments
» cheap soccer jerseys on Memory Models in Erlang vs Java: Nice discussion here,you are doing a great job. i was looking for this information. i found it on your page…
» mandesejohn on Couchbase Meetup at new HQ: Thanks for sharing experience. It should be really a great post. It should be knowledgeable and informative. Keep it up. flower delivery columbus ohio
» vermaseo on Scale means Skills: I’m surprised people are still commenting about this. George has been moved on to bigger and better things with the president for awhile now.ledikanten