gora-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lewis John McGibbney (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GORA-405) Create Gora REST API
Date Tue, 03 Feb 2015 03:25:34 GMT

    [ https://issues.apache.org/jira/browse/GORA-405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14302719#comment-14302719

Lewis John McGibbney commented on GORA-405:

Additionally, to _complete_ the REST API specification documentation we still have a number
of TODO items, namely
bq. The functionality I have neglected to implement so far includes the following list. Please
keep reading after this list as there is more content on my own criticisms of the current
API as defined in the documentation.
void close()
//Close the DataStore.

Result<K,T> execute(Query<K,T> query)
//Executes the given query and returns the results.

void flush()
//Forces the write caches to be flushed.

BeanFactory<K,T> getBeanFactory()
//Returns the BeanFactory used by the DataStore

Class<K> getKeyClass()
//Returns the class of the keys

List<PartitionQuery<K,T>> getPartitions(Query<K,T> query)
//Partitions the given query and returns a list of PartitionQuerys, which will execute on
local data.

Class<T> getPersistentClass()
//Returns the class of the persistent objects

void initialize(Class<K> keyClass, Class<T> persistentClass, Properties properties)
//Initializes this DataStore.

K newKey()
//Returns a new instance of the key object.

T newPersistent()
//Returns a new instance of the managed persistent object.

Query<K,T> newQuery()
//Constructs and returns a new Query.

void setBeanFactory(BeanFactory<K,T> beanFactory)
//Sets the BeanFactory to use by the DataStore.

void setKeyClass(Class<K> keyClass)
//Sets the class of the keys

void setPersistentClass(Class<T> persistentClass)
//Sets the class of the persistent objects
bq. If we wish to implement any of the above then i am happy to do so, but my understanding
is that these are all taken care of programmatically within the server side code execution.
The exceptions to this comment are possibly close and flush. I have some concerns here, these
have mainly to do with the current design of the DataStore API and the limitations it poses
for us when implementing a clean and intuitive REST API, namely:
bq.    * Once I've created a schema within the DataStore how do I delete one or more schema(s)
when the method call to void [deleteSchema()|https://github.com/apache/gora/blob/master/gora-core/src/main/java/org/apache/gora/store/DataStore.java#L98]
does not permit me to define which schema I wish to delete?
bq.    * The same goes for getting one or more schema(s) information for one particular schema(s)
bq.    * The same exists for determining if one or more particular schema(s) exist
bq.    * The same exists for truncating data which exists under one or more schema(s)

bq. The above questions are my main pain points right now as I feel that extending the DataStore
API in order to address such requirements is quite a major step seeing as DataStore is THE
main Gora API! I have recently been tracking a very promising project called [schema-repo|https://github.com/schema-repo/schema-repo]
which is described as "...a RESTful web service for storing and serving mappings between schema
identifiers and schema definitions." This may help us out for storing schema information which
may be potentially leveraged to reduce direct impact on the Gora Datastore API but this is
still slightly unclear to me right now.

> Create Gora REST API
> --------------------
>                 Key: GORA-405
>                 URL: https://issues.apache.org/jira/browse/GORA-405
>             Project: Apache Gora
>          Issue Type: Improvement
>          Components: gora-compiler, gora-core
>            Reporter: Udesh Liyanaarachchi
>            Priority: Minor
>             Fix For: 0.7
> As to the discussion [~lewismc]  initiated 
> [Mail list thread|https://www.mail-archive.com/dev@gora.apache.org/msg05444.html] we
need to implement a REST API for GORA.
> This is the initial proposal documentation for the [GORA REST API|http://docs.apachegoraapi.apiary.io/].
> The plan will be to implement the API with  [Apache CXF |http://cxf.apache.org] using
[CXF's JAXRS |http://cxf.apache.org/docs/jax-rs.html] implementation.

This message was sent by Atlassian JIRA

View raw message