You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Soumadeep <so...@infravio.com> on 2006/02/16 15:24:02 UTC

IRC-Log..16-02-2006

	-->|	YOU have joined #apache-synapse
	===	#apache-synapse [freenode-info] if you need to send private messages,
please register: http://freenode.net/faq.shtml#privmsg
	-->|	Hariharasudhan (n=hari@220.225.137.194) has joined #apache-synapse
	Hariharasudhan	hi guys ..
	Hariharasudhan	no one's around .. what's the topic for today ?
	-->|	paulfremantle (n=paulfrem@user-168-236-151-83.e7even.com) has joined
#apache-synapse
	Soumadeep	Hi Paul
	paulfremantle	hi!
	Hariharasudhan	hi paul
	-->|	pvikas (n=p_vikas@220.225.137.194) has joined #apache-synapse
	pvikas	so, what is today's agenda?
	Soumadeep	Paul you have any?
	Soumadeep	We can discuss about the multiproject stuff... which saminda
proposed
	paulfremantle	yes please
	Soumadeep	Should we wait for Saminda? or carry on.
	paulfremantle	lets wait 5 mins
	Soumadeep	ok
	-->|	ant_ (n=torntrou@host81-146-61-240.btremoteinternet-dsl.bt.net) has
joined #apache-synapse
	-->|	saminda (n=saminda@222.165.177.51) has joined #apache-synapse
	ant_	hi
	paulfremantle	hey
	paulfremantle	nice to see you ant
	saminda	Hi Paul
	saminda	Hi Ant
	saminda	Hi guys
	Soumadeep	Hi
	paulfremantle	hi saminda
	Soumadeep	Saminda... actually we were waiting for you... :-)
	saminda	Sorry guys
	Soumadeep	Good stuff... the multiproject thingy
	Soumadeep	We will be needing different src dirs... going ahead...
	saminda	if i get the green light, will like to move the current stuff
according to the multiproject structure
	Soumadeep	+1 from my end... if it makes a difference...
	pvikas	+1 from my side...
	Hariharasudhan	+1
	saminda	+1
	-->|	chinthaka (n=chatzill@222.165.177.51) has joined #apache-synapse
	saminda	paul, shell we go ahead with the multiproject structure
	paulfremantle	hey chinthaka
	paulfremantle	welcome
	ant_	+1 from me
	chinthaka	hi all :)
	paulfremantle	I'm +1 too
	chinthaka	Saminda, +1 :)
	saminda	hi chinthaka
	paulfremantle	so go for it :-)
	chinthaka	I told this to Paul sometime back, he was not convinced ;)
	paulfremantle	:)
	-->|	Rajesh_Koilpilla (n=chatzill@220.225.137.194) has joined
#apache-synapse
	paulfremantle	but i think (maybe i'm wrong)
	saminda	will start on it asap
	paulfremantle	that saminda is proposing keeping the core at a higher level?
	chinthaka	will give help if Saminda require any help from me
	paulfremantle	is that right?
	paulfremantle	that was my only concern
	saminda	thank you
	paulfremantle	i like multiprojects
	paulfremantle	but i also like a beginner to find the main code easily!
	saminda	core is at module/core
	chinthaka	yes, only if the project is not complex with source everywhere
	chinthaka	s/source/sources
	saminda	what is available at higher level is modules, repository, etc
	pvikas	guys, I was trying to use the SynapseObject in some of the mediators
that i am writing, need to host its jar somewhere to get a full maven based
build, any thoughts?[i am using a local maven repo now]
	paulfremantle	seems like it should be one of the extensions
	pvikas	until we go for the multi-module mode, can i use the scratch?
	saminda	yes i feel so
	pvikas	that way, others would get it too...
	paulfremantle	yes please vikas
	chinthaka	vikas : if you explain a bit perhaps I can shed some lights on
that
	chinthaka	hmm, Saminda if vikas uses the scratch you are in trouble :(
	pvikas	me and soumadeep had proposed a SynapseObject concept, its to hold
the config xmls in memory and has many utility methods...
	chinthaka	you may lose some of the history
	chinthaka	ok then lets have it in cvs.apache.org/java-respository/synapse
	pvikas	[chinthaka]oh..i am not aware of that
	chinthaka	but some one has to manually upload the jar there, for each and
every change
	chinthaka	Vikas : yes
	saminda	then we should make the mutiproject structure asap :)
	Soumadeep	SynapseObject is basically a utility for searching and handling
Configuration objects , it's in memory so that the mediators can lookup
values easily...
	chinthaka	yes, What I do is, freeze the code for some time
	chinthaka	and do this kinds of refactorings
	pvikas	we can wait till we go multiproject...
	pvikas	will stick to my local repo until then :-)
	-->|	Deepal (n=Miranda@222.165.174.109) has joined #apache-synapse
	-->|	chinthaka__ (n=chatzill@222.165.174.109) has joined #apache-synapse
	=-=	chinthaka__ has changed the topic to “Apache Synapse”
	chinthaka__	sorry I was kicked out from the list :(
	paulfremantle	welcome back anyway :-)
	paulfremantle	Soumadeep..... perhaps you can talk about the benefits of the
Synapse Object
	paulfremantle	Personally I am happy using AXIOM
	paulfremantle	or ADB
	paulfremantle	to access XML data objects
	-->|	saminda_ (n=saminda@222.165.174.109) has joined #apache-synapse
	paulfremantle	but I know you guys have some use cases
	Soumadeep	:-) well, it's just that while writing the mediators...
SynapseObject makes like much more easy
	chinthaka__	Can I know a bit about SynapseObject ?
	paulfremantle	have you thought about just using ADB to bind to Java objects
	chinthaka__	if its not bothering you :(
	Soumadeep	Like I mentioned... say for instance Consumer Identification, we
need to find the user by ip range...
	|<--	sanjiva_ has left irc.freenode.net (Read error: 113 (No route to
host))
	saminda_	just one more thing, if we use SynapseEnvironment.get(URL); can't
we
	Soumadeep	So what I do is just use a finder method to look up the consumer
	saminda_	achieve the same thing as SynapseObject
	Soumadeep	by giving it the ip value
	saminda_	getting some resources to mediators
	chinthaka__	Soumadeep : can't you do this using AXIOM ? (Just asking )
	Soumadeep	yes you can but then you need to parse it... with SynapseObject
you have a structure
	pvikas	correct me if i am wrong, AXIOM or ADB do not bother about the
xml-format, they work with just any xml??
	Soumadeep	which is more like a composite object
	chinthaka__	Vikas : what is the difference between xml-format and xml ?
	Soumadeep	So you have well form objects derived from the mediator xmls...
	Soumadeep	What Vikas means is that AXIOM is data agnostic
	paulfremantle	but ADB isnt
	paulfremantle	which is that ADB builds Java objects that are typed
	Soumadeep	I agree... but here we are offering a nested object structure
which can handle complex business objects
	paulfremantle	yes so does ADB tho
	Soumadeep	which has search facilities
	paulfremantle	that is interesting
	paulfremantle	!
	Soumadeep	so you can have something like findSOsWith Attribute
valuesStartingwith("192.168")
	Soumadeep	from consumer Identification perspective ... its like giving an
IP range to find a consumer...
	paulfremantle	you know you can also do that with xpath
	Soumadeep	Yeah that's true.. but if the XML changes then... we need to
change the xpath too
	|<--	saminda has left irc.freenode.net (Read error: 113 (No route to host))
	saminda_	Soumadeep, now what <SynapseObject/> is a collection of resources
right
	saminda_	if we use the SE.get(uri) to get a resource from a file system or
someother place
	saminda_	we can use xpath directly right
	Soumadeep	well... you can put it that way... but I would suggest... it's a
collection of complex objects
	saminda_	it's a collection of xml elements
	chinthaka__	:)
	saminda_	we can configure whatever way want
	saminda_	and use xpath to get it
	|<--	chinthaka has left irc.freenode.net (Read error: 110 (Connection timed
out))
	chinthaka__	I always prefer XML over the complex object structure as its
flexible. But it depends on the users who are actually using it
	Soumadeep	well... not exactly true... there is a business binding
associated with the mediator config files..
	saminda_	so we can keep our synapse.xml simple as possible and let the
mediator internals to handle the resources
	paulfremantle	the other way is to write a mediatorfactory that can read the
XML specially
	saminda_	use case pls :-)
	chinthaka__	Paul : just like SOAPModel builder in Axis2 ?
	paulfremantle	i dont know that chinthaka!
	paulfremantle	what is it
	Soumadeep	I mean the data that is present in the mediator config file is
more business centric.. so giving a SynapseObject like stuff... will be more
helpful
	saminda_	paul got point
	Soumadeep	rather than having something at a higher level...
	Soumadeep	which is more generic
	chinthaka__	ok, Soumadeep, lets have a compromise.
	Soumadeep	ok..
	Soumadeep	tell me
	saminda_	but mediator authors know what do with it resources
	saminda_	they are the one who write it
	chinthaka__	Lets read the xml file in to the object structure you have
defined
	chinthaka__	and use it
	saminda_	and synapse gives SyEn.get(uri) to access it
	chinthaka__	this is the same thing I did in Axis2 to give a SOAP face to
raw OMElements
	chinthaka__	Basically, SOAPEnvelope extends OMElement
	Soumadeep	Sure....that's perfectly fine.. but from an usage perspective...
while writing the mediators... I found it pretty useful...
	chinthaka__	yep. Ok ,can I see the object structure of the SynapseObject
here
	chinthaka__	a small fragment ?
	Soumadeep	just a sec
	Soumadeep	<SynapseObject name="ConsumerIdentification">
<SynapseObject name="consumer0">
<Attribute name="CONSUMER_TYPE" type="String">GOLD</Attribute>
<Attribute name="IP_ADDRESS_FROM" type="String">192.167.6.0</Attribute>
<Attribute name="IP_ADDRESS_TO" type="String">192.168.6.255</Attribute>
<Attribute name="HTTP_AUTH_USERNAME" type="String">john</Attribute>
<Attribute name="WS_SEC_USERNAME" type="String">john</Attribute>
<SynapseObject name="assignedService">
<Attribute name="serviceid1" type="String">stockQuote1</Attribute>
</SynapseObject>
</SynapseObject>
<SynapseObject name="consumer1">
<Attribute name="CONSUMER_TYPE" type="String">SILVER</Attribute>
<Attribute name="IP_ADDRESS_FROM" type="String">192.168.6.255</Attribute>
<Attribute name="IP_ADDRESS_TO" type="String">192.167.6.255</Attribute>
<Attribute name="HTTP_AUTH_USERNAME" type="String">mary</Attribute>
<Attribute name="WS_SEC_USERNAME" type="String">mary</Attribute>
<SynapseObject name="assignedService">
<Attribute name="serviceid1" type="String">stockQuote</Attribute>
<Attribute name="ip" type="String">192</Attribute>
</SynapseObject>
</SynapseObject>
</SynapseObject>
	Soumadeep	sorry
	paulfremantle	ok i didnt realise the XML was specific
	paulfremantle	i dont like that!!!
	chinthaka__	well in the first case, this is exploiting of xml ;)
	Soumadeep	This is just a representation...
	paulfremantle	i much prefer the XML to reflect the business data
	chinthaka__	anyway, how abt the methods in your SynapseObject
	chinthaka__	can you please point me to the source file in the svn via
svnweb, please
	Soumadeep	not fully complete though ... but I will give you a few... just a
sec
	pvikas
[chinthaka]https://svn.apache.org/repos/asf/incubator/synapse/trunk/scratch/
infravio/synapse-SO
	Soumadeep	1) Create SynapseObject from SynapseObject-XML
2) Create SynapseObject from any xml using BO xslt
3) SynapseObject can have a SynapseObject (self aggregation)
4) SynapseObject can have 0 or more attributes
5) To set attribute for a SynapseMediatorObject there are setters/getters
methods
such as setString(String name,String value), setLong(String name,String
value) ....etc
eg. SetString(foo,value)
6) SynapseObject has a getXMLFragment method which spits out an xml
representing the BO itself
7) SynapseObject have finder methods based on attribute names, values as
well as businessObjects.
	Soumadeep	this is what it has for now to sum it up
	saminda_	i still can't understand why we can use xpath ?
	chinthaka__	Infravio guys were well strucured from the start, you have
written down all the requirements separately ;)
	Soumadeep	You can... what I meant was that ... if the xml structure
changes... you need to change the xpath to you too
	chinthaka__	ok, you are trying to represent an xml using a hashmap
	chinthaka__	and manipulating within it.
	saminda_	but it's mediator authors consensus
	chinthaka__	well, if you feel confortbale with this, thats ok. But you are
taking some unncessary trouble in manipulating an xml using a hashmap based
techniques
	chinthaka__	so what I suggest is treat the xml as xml
	chinthaka__	YOu can have something like this
	chinthaka__	SynapseObject extends OMElement
	Soumadeep	I am ok with it...
	chinthaka__	you can do all the methods you have defined in the
SynapseObject with the above approach
	Soumadeep	I again reiterate that I am for generic xml manipulation.. but in
a business scenario it becomes really difficult handling pure xml... which I
guess you all will agree
	chinthaka__	Souma : Yes and no
	Soumadeep	So it's just a wrapper...
	chinthaka__	exactly
	chinthaka__	just look at the impl I did for SOAPEnvelope in Axis2
	ant_	Sorry guys, I have to. See you the ML...
	chinthaka__	basically SOAPEnvelope extends OMElement
	paulfremantle	but soumadeep
	<--|	ant_ has left #apache-synapse
	-->|	pvikas_ (n=p_vikas@220.225.137.194) has joined #apache-synapse
	paulfremantle	you can do real business XML and map it straight into Java
	chinthaka__	and and SOAPenvelope has methids like getEnvelope and getHeader
	chinthaka__	I think thats what SOuma is intersted
	chinthaka__	we will have the xml inside
	chinthaka__	but at the same time
	chinthaka__	we have the convenience methods as well
	paulfremantle	but also
	paulfremantle	i think its easier to write XML like this:
	Soumadeep	In fact it's just giving a structure to the config xml...
	Soumadeep	Thta's all I am doing... but if you think there is a better
possible way... I am in...
	chinthaka__	Souma : the problem is you are manipulating the xml on your own
in your class
	chinthaka__	which is the samething AXIOM is for :)
	paulfremantle	<ConsumerIdentification>
	paulfremantle	<type>Gold</type>
	paulfremantle	<IP from="192.167.6.0" to="192.167.6.255"/>
	paulfremantle	<UserName>Paul</UserName>
	paulfremantle	</ConsumerIdentification>
	chinthaka__	Paul : thats what I mentioned that as "exploiting" ;)
	paulfremantle	yes I agree chinthaka
	chinthaka__	this is the correct way it should have been written
	saminda_	and xpath :-)
	Soumadeep	YesThe only difference is that I am differenciating between an
object and it's attribute..
	Soumadeep	Think of in this way.... in the above sample that Paul gave....
how do we handle multiple consumers...
	chinthaka__	<Consumers>
	saminda_	i was just typing it ;-)
	chinthaka__	<ConsumerIdentification/>*
	chinthaka__	</Consumers>
	saminda_	simple ex: see how maven nested its project depended jars
	Soumadeep	Yes... I agree... now for a different mediator... say SLA the
structure will be completely different... just a sec let me pull it up for
you
	Soumadeep	<SynapseObject name="service0">
<Attribute name="url" type="STRING">http://%3c/Attribute>
<SynapseObject name="consumer0">
<Attribute name="identifier" type="STRING">someID</Attribute>
<Attribute name="priority" type="INTEGER">2</Attribute>
</SynapseObject>
<SynapseObject name="consumer1">
<Attribute name="identifier" type="STRING">someID</Attribute>
<Attribute name="priority" type="INTEGER">6</Attribute>
</SynapseObject>
</SynapseObject>
	chinthaka__	thats the exact reason I'm asking you to use an XML structure
	chinthaka__	:)
	chinthaka__	you can define one object structure for that
	chinthaka__	s/can/cannot
	saminda_	yet somadeep, it's mediator specific you can easily use xpath
	Soumadeep	And What I am syaing is that if we standardize the structure..
then it becomes easy to manipulate..
with a wrapper like SynapseObject
	pvikas_	if we go for SynapseObject we generalise it across mediators...
	Soumadeep	That's it
	chinthaka__	IMHO, SynapseObject = OMElement and some util methods :)
	saminda_	here you go :)
	Hariharasudhan	saminda : xpath can't construct and object as such right ?
	chinthaka__	Hari
	chinthaka__	sorry I didn;t get that :(
	Soumadeep	Ok... how about this... we use OM to parse and SYnapseObject as
the wrapper...
	|<--	Rajesh_Koilpilla has left irc.freenode.net (Read error: 110
(Connection timed out))
	chinthaka__	method impls of SynapseObject may need to be changed a bit as
well
	Soumadeep	Ok with it...
	Soumadeep	it was written in a hurry...
	saminda_	but why can't we simply do it with exploiting the xml
	saminda_	mediator author knows what he needs
	<--|	Hariharasudhan has left #apache-synapse
	Soumadeep	Oh sure.... we are exploiting the xml anyway...
	Soumadeep	But your concern is valid too.... the author will know what
he/she is doing...
	chinthaka__	not she. most of the times :D
	chinthaka__	<JustKidding/>
	|<--	pvikas has left irc.freenode.net (Read error: 110 (Connection timed
out))
	Soumadeep	This is just for giving the author a flexibility to focus on the
data... rather then to write a parser and get the value
	saminda_	we can do this with OM level
	saminda_	if mediator get the OM, it's mediators interal is the one should
worry about how to manuipulate it
	saminda_	and i humbly think that we should give that freedom to mediator
authors
	saminda_	mediators are one aspect that is going to grow exponentially
	Soumadeep	We are anyways..... you have this facility... if you don't want
to you... then.. it's upto you...
	|<--	pvikas_ has left irc.freenode.net ("ChatZilla 0.9.61 [Mozilla
rv:1.7.2/20040803]")
	Soumadeep	*use
	Soumadeep	I mean we are not not going to force it down someone's throat...
;-)
	Soumadeep	From the mediators that we are ready with.. we used
SynapseObjects for making our life easy.... rest is upto the folks ...
	saminda_	as paul mentioned earlier, this is gonna be a extension right
	Soumadeep	Yes...
	Soumadeep	Just an utility... ;-)
	Soumadeep	Not a required thingy
	saminda_	still we have SeEn.get(uri); to do our work with OM right
	|<--	paulfremantle has left irc.freenode.net (Read error: 110 (Connection
timed out))
	Soumadeep	That's for just getting the resource...
	Soumadeep	Yes... you are right
	Soumadeep	So what we dealing here is just post fetch !
	saminda_	hey guys gota go now
	Soumadeep	Saminda... your multi thingy is good
	saminda_	when the muti-module structure comes lets go with it
	Soumadeep	sure man...
	saminda_	it should have done ealier :-)
	saminda_	Please be kind enough to post the log
	Soumadeep	ok.. bye guys!



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org