airavata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shameera Rathnayaka <shameerai...@gmail.com>
Subject Initiating GSoC Project - JSON support and JSON to XML bidirectional conversion for Airavata
Date Sun, 02 Jun 2013 17:39:02 GMT
Hi All,

Here I am suggesting a way to do JSON to XML bidirectional transformation.
Feel free to express your thoughts on this.

Here are the set of basic requirements that need to be addressed with this
conversion.
1. Converted XML should be identical to the expected XML format of Back-End
(This will lead us to use Back-End as it is without doing any changes).
2. Support XML attributes
3. JSON messages should be more generic.

JSON message
[image: Inline image 1]


XML message
[image: Inline image 2]

Here we have ignored the issue that comes with single value JSON array. It
is easy to support namespace with this conversion. But it isn't a basic
requirement.

There are few libraries which are available to do this conversion. Some of
them are unidirectional therefore they can not be used in this purpose.
Json-lib[1], Jettison[2] and Staxon[3] are some of the libraries which
support both JSON to XML and XML to JSON conversion.

However to use Json-lib, XML message should be in specific format which is
defined by json-lib itself. Hence we have to drop Json-lib from our list.
Here in [4] you will see performance tests with XML STAX (Implementation
shipped with JDK 6) , Jettison and STAXON libraries. According to the
performance analysis Staxon would be a good choice. Staxon is availble
under Apache License 2.0 therefore we won't have any issue. As Staxon
in-beneath uses Jackson [5], a high performance [6] [7] JSON parser, we
will get that feature with STAXON too.

I have mentioned two approaches in my proposal [8] which we can use in
client side (see second last para of 2.2 section). After some discussions,
we (me and my mentor Lahiru) have agreed to use second approach which is,
write a new JSON client API using JavaScript. This makes life easy to
Front-End developers. They can use relevant API to retrieve and store data
to registry and communicate with other Back-End components like workflow
interpreter.

Another requirement is to support Danushka's AMQP implementation with
Rabbitmq for messaging. As I can see there is no any client available for
JavaScript in Rabbitmq client doc [9], But found this "rabbitmq + node.js =
rabbit.js" [10]. Danushka i would like to request your help on this, Can we
use this to consume rabbitmq queues?

[1]  http://json-lib.sourceforge.net/
[2]  http://jettison.codehaus.org/
[3]  https://github.com/beckchr/staxon
[4]  https://github.com/beckchr/staxon/wiki/Benchmark
[5]  http://jackson.codehaus.org/
[6]
http://blog.novoj.net/2012/02/05/json-java-parsers-generators-microbenchmark/
[7]  http://www.cowtowncoder.com/blog/archives/2009/02/entry_204.html
[8]
http://www.google-melange.com/gsoc/proposal/review/google/gsoc2013/shameera/60002
[9]  http://www.rabbitmq.com/clients.html
[10] https://github.com/squaremo/rabbit.js

Best Regards,
Shameera Rathnayaka.

email: shameera AT apache.org , shameerainfo AT gmail.com
Blog : http://shameerarathnayaka.blogspot.com/

Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message