You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by okrische <pu...@ecopatz.de> on 2007/04/05 19:26:45 UTC

Is ServiceMix right for what i want to do?

Hello everyone,

i am trying out servicemix for several days, i try the examples, some work,
some dont, 
but anyhow i dont get along with it. I have the feeling, that i am missing
some important point.

I have a bunch of computers with several applications on it, one is in java,
one is in perl,
 one is in php. And i want to enable these applications to deal with each
other indirectly, 
since they dont know each other.

For example, my java application creates a file. It connects to the bus and
uploads the file. 
The service who handles file uploads will forward the file to a service,
which will save files 
in a central location. The php application asks a known service, if there
are new files 
and will download them if wanted.

I installed servicemix with all its services on one server somewhere in the
network.

But what do i have to implement within my java application? Do i have to
write a proprietary client, 
which connects to a binding component on the servicemix server, so i can
send or receive files?  
And the binding component sends it to the bus?

And on the php side i have to do the same?

And how can i connect two servicemix servers on different locations in this
world?

Hm.

Thank you in advance for spending some time on my questioning.

Olaf Krische
-- 
View this message in context: http://www.nabble.com/Is-ServiceMix-right-for-what-i-want-to-do--tf3532719s12049.html#a9859804
Sent from the ServiceMix - User mailing list archive at Nabble.com.


RE: Is ServiceMix right for what i want to do?

Posted by Owen Thomas <ot...@wcg.net.au>.
Hello Olaf

I haven't been using ServiceMix for all that long. My knowledge might be
marginally (if at all) better than your own, so I think I could offer
some enlightenment.

> For me it would be more clear, if servicemix would say:

> - this is a servicemix-http component. 
>   You can use it to implement a service unit. 
>   This service unit will be reachable by HTTP.

That's about right.

I think the HTTP Service Unit (SU) is complete in itself. However, some
of the SU implementations actually provide as much customisation as
possible to leave a smaller piece of functional code for you to write.

I have been having fun with such an SU - servicemix-jsr181 which
(theoretically at least) allows one to wrap a POJO of one's choosing
inside an SU. It promises ease of development, but that objective has
yet to be realised by me.

> - on the other hand, there is an adapter, a client. 
>   you can use it to connect to a servicemix-http component

I think the servicemix-jsr181 SU I have just described is one example of
such a beast as you desire here. Read on for information about how I
think this is done.

> - the adapter and the servicemix-http component talk with each other
>   by HTTP

Via a Service Assembly (SA), which, I yet again believe, contains the
instructions that the NMR needs for message exchange.

> - the adapter/client offers an inbox and an outbox

I think that depends on the message exchange pattern (MEP) your SU
implements. The HTTP SU is complete, and is rather fixed as a
request-repsonse MEP, but other adaptors where you have to supply the
final bit of custom code (jsr181 for example), you can elect to have
either one-way or request-response communication. That's up to you.

I think I could be wrong about the HTTP SU, but I hope at least to have
illuminated the theory of what is going on.

> - write the defined messages into the outbox and it will be uploaded
>   to the SU

> - if something arrived from the SU, i
>   can read it from the inbox

Hmmm... not quite. Say, for instance, you have a simple Service Assembly
that manages two service units. One of the SU's acts as an adaptor to
whatever internal legacy system you have information on, and the other
is an HTTP SU that you expose to the outside world so that one can proxy
requests between the internal system and the outside world using this
service.

> But thats my own picture. And still i can not get rid of it.
> I do not find access to your picture, yet!

The whole SA, and ServiceMix instance it is deployed on acts as an
adaptor to get information from your internal system out as a web
service.

> To me it seems, i have to write something on my own 
> to be able to talk with my SU, which just extends/uses
servicemix-http.

> The servicemix-http component just helps me to talk with this SU, 
> it is just something like a little webserver?

You still need the Service Assembly (SA).

> But how i will talk to the SU, what i will talk on top of HTTP, this
> will be my own business?

> I am not sure, if iam on the right way. Am i close?

> Thanks a lot in advance again. :)

> Olaf Krische

The key you appear to be looking for is the SA. It ties everything
together.

Additionally, I think you are looking to locate your ServiceMix
installation on one host, and have this single host talk over the wire
to all your internal systems as though it were the centre of a star
network. If this is true, I think there is a better way to go than this.

I think it is better to have an instance of ServiceMix on all the
machines that host internal systems. You then deploy SA's that get what
is on those internal systems out into a web services format. Then,
through the magic of federation, you can tie all these services together
into what is known as an ESB, and incorporate BPEL and other goodies to
your federation.

I like the fact that ServiceMix appears to implement only what is
necessary (WSDL and SOAP) to give one only what one needs, and no more
than that. You might like to host the bulk of your BPEL processing on a
web server, but at the moment, I am of the opinion that ServiceMix might
also be able to host some BPEL for subroutines that involve co-hosted
internal systems, so you can distribute your BPEL for speed and network
management too.

Anyway, this has given me a chance to rabbit on about what I have in my
head regarding an SOA. If anyone has a differing opinion or wants to
clarify, or even wants me to clarify, I'd welcome the chance to be
corrected, to receive clarification, or to clarify if I can.

Have a good day,

  Owen.

Re: Is ServiceMix right for what i want to do?

Posted by okrische <pu...@ecopatz.de>.
Hello again,

thanks for your reply. Nonetheless it is still not clear to me.


bsnyder wrote:
> 
> On 4/5/07, okrische <pu...@ecopatz.de> wrote:
>> But what do i have to implement within my java application? Do i have to
>> write a proprietary client,
>> which connects to a binding component on the servicemix server, so i can
>> send or receive files?
>> And the binding component sends it to the bus?
> 
> To get started, you will need to allow an application to connect to
> the JBI container via one of the supported protocols (e.g., HTTP, FTP,
> etc.). To achieve this, you will need to create a JBI service unit
> (SU) that contains a configuration for the JBI component you would
> like to use. Then the SU needs to be wrapped up in a JBI service
> assembly (SA) in order to be deployed to the JBI container. I'd
> suggest reading through these two FAQ items to get started on these
> two tasks:
> 


What i understand so far, i have to create a SU and a SA. 
The SU provides in the ServiceMix world some kind of endpoint. 
And my application talks to this SU in my application world. 

But to me it is still not clear, how my application will talk to this SU. 
And how does the SU talk with my application?

Lets say, my application sends the file. It must talk with the SU 
to be able to upload the file. On the other hand, when the SU has a file, 
i must download the file from the SU.

I have several ways to talk with the SU. If i use servicemix-http 
within my SU, my application can talk to this SU by HTTP. 

Simple as that?

Or is there something on top of that? Another protocol?

For me it would be more clear, if servicemix would say: 

- this is a servicemix-http component. 
  You can use it to implement a service unit. 
  This service unit will be reachable by HTTP.
- on the other hand, there is an adapter, a client. 
  you can use it to connect to a servicemix-http component
- the adapter and the servicemix-http component talk with each other by HTTP
- the adapter/client offers an inbox and an outbox
- write the defined messages into the outbox and it will be uploaded to the
SU
- if something arrived from the SU, i can read it from the inbox

But thats my own picture. And still i can not get rid of it.
I do not find access to your picture, yet!

To me it seems, i have to write something on my own 
to be able to talk with my SU, which just extends/uses servicemix-http.

The servicemix-http component just helps me to talk with this SU, 
it is just something like a little webserver?

But how i will talk to the SU, what i will talk on top of HTTP, this will be
my own business?

I am not sure, if iam on the right way. Am i close?

Thanks a lot in advance again. :)

Olaf Krische
-- 
View this message in context: http://www.nabble.com/Is-ServiceMix-right-for-what-i-want-to-do--tf3532719s12049.html#a9888484
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Is ServiceMix right for what i want to do?

Posted by Bruce Snyder <br...@gmail.com>.
On 4/5/07, okrische <pu...@ecopatz.de> wrote:
>
> Hello everyone,
>
> i am trying out servicemix for several days, i try the examples, some work,
> some dont,
> but anyhow i dont get along with it. I have the feeling, that i am missing
> some important point.
>
> I have a bunch of computers with several applications on it, one is in java,
> one is in perl,
>  one is in php. And i want to enable these applications to deal with each
> other indirectly,
> since they dont know each other.
>
> For example, my java application creates a file. It connects to the bus and
> uploads the file.
> The service who handles file uploads will forward the file to a service,
> which will save files
> in a central location. The php application asks a known service, if there
> are new files
> and will download them if wanted.
>
> I installed servicemix with all its services on one server somewhere in the
> network.
>
> But what do i have to implement within my java application? Do i have to
> write a proprietary client,
> which connects to a binding component on the servicemix server, so i can
> send or receive files?
> And the binding component sends it to the bus?

To get started, you will need to allow an application to connect to
the JBI container via one of the supported protocols (e.g., HTTP, FTP,
etc.). To achieve this, you will need to create a JBI service unit
(SU) that contains a configuration for the JBI component you would
like to use. Then the SU needs to be wrapped up in a JBI service
assembly (SA) in order to be deployed to the JBI container. I'd
suggest reading through these two FAQ items to get started on these
two tasks:

http://incubator.apache.org/servicemix/what-is-a-jbi-su-and-how-do-i-create-one.html
http://incubator.apache.org/servicemix/what-is-a-jbi-sa-and-how-do-i-create-one.html

> And on the php side i have to do the same?

For the PHP application to access the JBI container, you can use the
PHP STOMP API for ActiveMQ:

http://activemq.apache.org/php.html

> And how can i connect two servicemix servers on different locations in this
> world?

This takes place by configuring an ActiveMQ network of brokers:

http://activemq.apache.org/networks-of-brokers.html

Because ServiceMix sits on top of ActiveMQ, all remote ServiceMix
instances are networked together using the ActiveMQ network of brokers
concept.

Bruce
-- 
perl -e 'print unpack("u30","D0G)U8V4\@4VYY9&5R\"F)R=6-E+G-N>61E<D\!G;6%I;\"YC;VT*"
);'

Apache Geronimo - http://geronimo.apache.org/
Apache ActiveMQ - http://activemq.org/
Apache ServiceMix - http://servicemix.org/
Castor - http://castor.org/