Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Default interfaces
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Felix Böhm  
View profile  
 More options Jun 30 2012, 7:50 am
From: Felix Böhm <felixboeh...@googlemail.com>
Date: Sat, 30 Jun 2012 04:50:40 -0700 (PDT)
Local: Sat, Jun 30 2012 7:50 am
Subject: Default interfaces

Hello,

after reading the Database API thread<https://groups.google.com/forum/#!topic/nodejs/9a15xYx28Yc>,
I was wondering if there was any interest in building a set of default
interfaces for node packages. The most compelling advantages:

   - *Libraries are interchangeable*: You can use a file-based database
   while developing (eg. SQLite) and switch to another solution (with more
   space, better performance etc.) by changing a single require statement.
   - *Libraries only need to implement a subset of functionality*: Escaping
   SQL queries is a common task for SQL libraries. This could be done by the
   interface package, so that any implementing package only needs to provide a
   function for running raw SQL statements (with a well-known name). When the
   database has a more efficient way of performing a task, the library can
   simply overwrite the provided functions.

This is not limited to databases: Another cool area would be file-access. A
single interface providing a couple of asynchronous methods could be used
to not only access the local file-system, but also FTP & WebDAV servers,
Dropbox, iCloud & GDrive accounts and even Bittorrent files.

Someone implementing a module for syncing files could rely on that
interface and allow users to simply throw in two instances of the interface
and do it's job without caring about any underlying architecture. The
interface would abstract eg. watching for changes.

Of course, the library can add special behavior for more efficient
transfers (eg. between FTP servers using FXP<http://en.wikipedia.org/wiki/File_eXchange_Protocol>),
but that's only optional.

I imagine interfaces to be similar to ES6's proxies: Functions that aren't
provided directly are provided using the other functions, as long as that's
possible. Besides, they can use util.inherits (or, for CS users, the extendskeyword), so that they can be implemented by adding a dependency and
inheriting from it.

Of course, this concept needs to be promoted and I'm definitely not the
right guy for that task (living in Germany, using node only for fun, never
attended a conference etc.), but I would love to work on some of the
default interfaces (especially the two mentioned above).

Any thoughts?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Caswell  
View profile  
 More options Jul 3 2012, 5:16 pm
From: Tim Caswell <t...@creationix.com>
Date: Tue, 3 Jul 2012 14:16:23 -0700
Local: Tues, Jul 3 2012 5:16 pm
Subject: Re: [nodejs] Default interfaces

I am working on such a file system interface.  See it at
http://github.com/c9/vfs.  We use it internally in the new cloud9 version.

On Sat, Jun 30, 2012 at 4:50 AM, Felix Böhm <felixboeh...@googlemail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »