473,386 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

REST based XML API

Hi!
We are planning to do an in-house system offering data to various departments.
The data will be held in a database (oracle) in a conventional database schema
with tables, triggers, integrity constrains and whatnot.
Now, we don't want to give the whole company full access to the database
and we want the minimum software requirements, so using ODBC or
such is out of the question.
Therefore we settled on offering the data as XML data via http.

The database maintains parts data. Initially we think of less than
5000 parts (each part having various attributes and associated data)
but we don't want the system to become unusable if it turns out we
host 100.000 parts because some other department decides to use
our system too.

However, we don't know much about this and I'd like to put up our
ideas for discussion.

The plan so far looks like this:
The database has multiple "root" tables so there will be multiple
paths to the data objects. For instance, you can look up a part
and ask it for the safety instructions or you can look up a document
and ask it for the part(s) it is supposed to describe.

The clients will connect to the apache in front of the database,
and get authenticated there.

As a first idea we plan to do data read access to be XPATH-based:
"get
http://ourdatabase/datastore?XPATH=/parts/part[@name="PART_NAME"]/datasheet/@format"
should return an XML document with the nested nodes (containing
nothing more than the path information in the xpath expression)
and the format name in it:
<parts>
<part name="PART_NAME">
<datasheet format="US-LETTER"/>
</part>
</parts>
The idea here is to make it possible to select more than one node
by using wildcards.
If a whole node is to be returned, we plan do return the attributes,
the node data and any child nodes as references. Does XML have things
like <href...too?
Is there a better way?
Non-XPATH would probably work too, but we hesitate to offer
just single node access and a full listing. And we don't want
to reinvent our own search parameters (match/regexp/whatever).
The whole thing should be intuitively usable by anyone being
able to read a XML book and the only thing we want to publish
as documentation is a poster with the hierarchy.

For DELETE, XPATH is realistic too, IMHO, even if dangerous.

For put and post, XPATH doesn't make sense, does it?
Should we insist on replacing complete nodes only? I think that's realistic
as a client can easily request a node, do a small modification and then
put up the result. But I see that we here use conventional URIs
and for querying XPATH expressions.
Is there any way to get this symmetrical?
Also, while posting and putting, the database has to do a few sanity
checks and translate this into one or many update statements into
tables.

Is using XPATH expressions RESTful at all?
Or should we totally forget about XPATH, do the hierarchies and that's it?
Maybe add wildcards to the URIs? But the return values for single node
access and node set access are IMHO very different. I can't return several
independent text blocks, can I?

We don't have any specific customer requests so we try to maximize
"cleanliness" of design while still trying to keep the whole thing
scalable in case it catches on.

Also, when doing a request like get "http://.../xxx/yy/" the idea is to
return the nodes http://.../xxx/yy/* . What would a RESTful system
return? All nodes or just an array of href's?

Lots of Greetings!
Volker
--
For email replies, please substitute the obvious.
May 30 '07 #1
0 1629

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Jeremy Jones | last post by:
Does anyone know if there exists a Python REST (web services) framework? I've googled and come up short. I don't think it should be that hard to do if one doesn't exist (famous last words). I...
30
by: Reinhold Birkenfeld | last post by:
Hello, I know that there are different YAML engines for Python out there (Syck, PyYaml, more?). Which one do you use, and why? For those of you who don't know what YAML is: visit...
1
by: jkdufair | last post by:
I'm looking for advice. I have been playing with Konfabulator which embeds SpiderMonkey (apparently using the JavaScript 1.5 api) for scripting "widgets" - various bits of eye candy that sit on...
0
by: R. Rajesh Jeba Anbiah | last post by:
REST by design is stateless <http://www.answers.com/Representational%20State%20Transfer>. I have also read that session is irrelevant as every message uses HTTP Authenication...
1
by: Seasanctuary | last post by:
I want to make sure that someone mentions that Generics will allow the ..NET framework Array and other similarly interfaced collections to implement .Head() and .List() methods to return the first...
0
by: creed1 | last post by:
I have been asked to create a new web service using the REST architectural style, but I haven't been able to find any examples or really good resources to help me understand how to go about writing...
1
by: ryanh | last post by:
The subject's a little misleading... I see how REST would be helpful in my environment (in my code too -- sorry, bad joke), but i don't see how I can really implement it in a useful way. Given...
2
by: bschaeffer | last post by:
Thanks to these forums I have learned how to make a list of check boxes visible/not visible based on the value of another check box. However, the purpose of this is to save room on the form. ...
1
by: mazdotnet | last post by:
Hi guys, I need some architecture design verification. We have a site on shared hosting so I can not use ISAPI filters to do any URL redirecting..etc. We need to allow our end users to access...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.