Hi Sanjit,

Now I understand the semantic of creating "parental controlled"
namespaces, ;-) but still don't quite get the reason when I shall use
it.  This may have nothing to do with the API changes per se but I'd
be very careful to add new concepts to the system.  If there are
something we can learn from the history of new technology adoption, it
is the thinking of making the revolutionary concept as
"backward-compatible" as possible. When I tried to explain Hypertable
to others, I usually say "hey, this hypertable thing isn't that
different from MySQL,  It's just another storage engine with limited
SQL support. Just like the ARCHIVE engine".  With all the NoSQL
implementations out there, the MongoDB team has done a pretty good job
masquerading themselves as "easiest replacement for MySQL". About year
and half ago, they intentionally did a overhaul to make their
interface more like MySQL.  Given the rapid adoption rate, I think
their strategy pays off quite handsomely.

So why call it namespace instead of database? Why introduce parent
concept if all the existing MySQL users are happy with database+table
structure? (Maybe they are not happy but I guess people won't care
either.)

Just my two cents.
Alex

On Tue, Aug 3, 2010 at 7:34 AM, Sanjit Jhala <[email protected]> wrote:
> Hi Alex,
>
> Regarding your points:
>
> 1. My choice of words might have been misleading. The word parent merely
> reflects that the first parameter is relative to the second and lies in the
> namespace specified by it.
>
> For example: suppose I have the namespace "sanjit/" open (and pointed to by
> the object my_namespace) and I want to create a sub-namespace called
> "sanjit/test" then I could say:
> create_namespace("sanjit/test") or equivalently create_namespace("test",
> my_namespace). Similarly for other namespace related calls you can refer to
> the desired namespace either via an absolute path ("sanjit/test") or via a
> relative path ("test", my_namespace). The reason for providing the relative
> API is so that at when we add authentication, the "parent" namespace object
> can simply forward authentication details.
>
> 2. Ignore this method. I suspect its not being used and isn't needed.
>
> -Sanjit
>
> On Mon, Aug 2, 2010 at 4:16 PM, Alex Dong <[email protected]> wrote:
>>
>> This is a great move. A couple of things I don't quite understand:
>>
>> 1. The parent namespace concept. When shall we use it? What's the
>> relationship between child and parent here? What's the specific
>> problem you're trying to solve? Does dropping the parent mean
>> recursively removing all child namespaces?
>>
>> 2. Hyperspace::SessionPtr. What's this one for?  The methods listed
>> above don't seem to use this one?
>>
>> Alex
>>
>> On Aug 3, 5:05 am, Sanjit Jhala <[email protected]> wrote:
>> > In order to support namespaces, the Client API needs some modification.
>> > Namespaces are intended to work much like "databases" in MySql
>> > terminology.
>> > As in MySql, all table operations will occur within the context of a
>> > namespace and so the API has to change accordingly.
>> >
>> > Here's a summary of the proposal:
>> >
>> > 1. We will have a new "Namespace" class. Many of the existing client API
>> > methods will be moved into this class (create table, drop_table etc).
>> > 2. The Client API will have new methods to operate on namespaces
>> > (create_namespace, drop_namespace etc.)
>> > 3. Clients will have an additional "open_namespace" call before
>> > accessing
>> > tables/scanners/mutators etc. For example, to write to Hypertable:
>> >     a. create Client
>> >     b. open Namespace (via Client object) <-- additional step
>> >     c. open Table  (via Namespace object)
>> >     d. create TableMutator (via Table object)
>> > 4. The Client API get_tables method will be replaced by the Namespace
>> > API
>> > get_listing method. Each returned Listing will contain a name and flag
>> > indicating whether it is a table or a namespace.
>> > 5. The ThriftClient API will also have to be changed accordingly.
>> >
>> > In more detail the new Client API will look like:
>> >
>> > *- Namespace*open_namespace(const String &namespace, Namespace
>> > parent=NULL)
>> > . If "parent" Namespace is non-null then treat "namespace" as relative
>> > to
>> > "parent"
>> > - void create_namespace(const String &namespace_name, Namespace
>> > parent=NULL)
>> > - void drop_namespace(const String &namespace, Namespace parent=NULL)
>> > - void close()
>> > - void shutdown()
>> > - Hyperspace::SessionPtr& get_hyperspace_session()
>> > - HqlInterpreter *create_hql_interpreter()*
>> >
>> > The Namespace API will have most of the methods in the current Client
>> > API:
>> >
>> > *- void create_table(const String &name, const String &schema)
>> > - void alter_table(const String &name, const String &schema)
>> > - Table *open_table(const String &name, bool force = false)
>> > - void refresh_table(const String &name)
>> > - bool exists_table(const String &name)
>> > - SchemaPtr get_schema(const String &name)
>> > - String get_schema_str(const String &name, bool with_ids=false)
>> > - void get_listing(std::vector<Listing> &listing)
>> > - void drop_table(const String &name, bool if_exists)
>> > - void get_table_splits(const String &name, TableSplitsContainer
>> > &splits)*
>> >
>> > -Sanjit
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Hypertable Development" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/hypertable-dev?hl=en.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Hypertable Development" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/hypertable-dev?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Hypertable Development" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hypertable-dev?hl=en.

Reply via email to