You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by frank <hy...@cheercode.com> on 2008/01/22 05:30:08 UTC

Re: [!! SPAM] Re: how to communicate between different tomcat servers

Thank you chris for your reply.
I try to arrange all the services on one webserver, anyway if it need to be devided into several servers, I have to find a way to communicate between the servers, and I may use JMS or RMI to implement this. How about the diffierence between JMS and RMI?

Thanks a lot




frank
2008-01-22



发件人: Christopher Schultz
发送时间: 2008-01-18 01:51:45
收件人: Tomcat Users List
抄送: 
主题: [!! SPAM] Re: how to communicate between different tomcat servers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank,

印华 wrote:
| In my design, I
| [have divided] the server side into several separate logic parts, and each
| part is deployed on a separate Tomcat server. e.g. the first tomcat
| server is to process login request, second tomcat server is to
| calculate user data, the third tomcat server is to store all the user
| information. It is a [distributed] architecture, and I hope in this way,
| this system can be extended by adding tomcat server when the
| application load on one Tomcat server is big enough.

I'm not sure you need all that complexity... most people just run the
whole application on a single server. When the load gets too high for
one server, you duplicate the web app onto a second server (and so on)
and then load balance between them. There's no reason to have physically
separated login, calculation, and data storage mechanisms.

| So currently, I meet a problem of how to
| communicate between the tomcat servers, I think http or webservice
| can do this work simply, but the efficiency is not good, and I don't
| know whether JMS is a good choice for this.

JSM isn't really any better or worse than SOAP, REST, or other
"standard" forms of communication.

| I wonder if there is any
| other way to communicate between the tomcat server?

Servers can communicate in lots of ways:
1. Records through a database
2. Binary or text data through a socket
3. Binary or text data through a named pipe (on a shared filesystem)
4. Objects through JNDI
5. Objects through RMI

| Any help and suggestion will be welcome.

Honestly, the best thing to do would be to put everything into a single
web app and just load balance between (identical) Tomcat servers. I
don't see any advantage of the separation you have created.

If you need sessions to be replicated in a cluster, you can simply turn
on "distributable" sessions and configure the Tomcat instances to
participate in the cluster. If you can tolerate the loss of information
resulting from a Tomcat instance going down while a user is logged-in,
then you don't even have to do that.

Less complexity results in easier maintenance. Hardware is cheap.
Manpower is expensive.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkePj6kACgkQ9CaO5/Lv0PCp8QCgirMzuuO3iuUgh0Ql3tZZ7qUZ
tEYAmgMFDz227mn6yf/wYQsITodDJIVU
=93Cr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

Re: [!! SPAM] Re: how to communicate between different tomcat servers

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David,

David Brown wrote:
| Hello, are talking about between TC instances or one or more
| applications (dot).war deployed under one or more TC instances?

The OP indicated that separate Tomcat instances were involved.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkeWjE8ACgkQ9CaO5/Lv0PAPMwCgq/T8jROI9nHVXHZYasIR4x1+
wbsAn2ps6RZyQWM6W/RXGfHctAgF/Bmo
=4lux
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [!! SPAM] Re: how to communicate between different tomcat servers

Posted by David Brown <da...@davidwbrown.name>.
Hello, are talking about between TC instances or one or more applications (dot).war deployed under one or more TC instances?

Christopher Schultz wrote ..
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Frank,
> 
> frank wrote:
> | I try to arrange all the services on one webserver, anyway if it need
> | to be devided into several servers, I have to find a way to communicate
> | between the servers, and I may use JMS or RMI to implement this. How
> | about the diffierence between JMS and RMI?
> 
> RMI is used for passing objects (and issuing remote method calls), while
> JMS is used more for passing "messages". JMS can be used to bridge
> between Java and other languages, since IIRC the messages can be
> transformed to some other format (like MQ, etc.). With RMI, you're stuck
> with Java.
> 
> RMI has always seemed to be a PITA to me. I don't think either of these
> technologies are the way you really want to go.
> 
> I think the best thing for you to do is either store the information in
> a shared database (or not) and then trade keys (or whole data sets)
> through SOAP or REST-based services.
> 
> - -chris
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.8 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> 
> iEYEARECAAYFAkeWEEUACgkQ9CaO5/Lv0PBOWwCeM3SI4hwm4sN2x318YnT/6xD+
> xjMAmwcyH2S98z592er4TsBsadMedcRg
> =PFle
> -----END PGP SIGNATURE-----
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [!! SPAM] Re: how to communicate between different tomcat servers

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank,

frank wrote:
| I try to arrange all the services on one webserver, anyway if it need
| to be devided into several servers, I have to find a way to communicate
| between the servers, and I may use JMS or RMI to implement this. How
| about the diffierence between JMS and RMI?

RMI is used for passing objects (and issuing remote method calls), while
JMS is used more for passing "messages". JMS can be used to bridge
between Java and other languages, since IIRC the messages can be
transformed to some other format (like MQ, etc.). With RMI, you're stuck
with Java.

RMI has always seemed to be a PITA to me. I don't think either of these
technologies are the way you really want to go.

I think the best thing for you to do is either store the information in
a shared database (or not) and then trade keys (or whole data sets)
through SOAP or REST-based services.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkeWEEUACgkQ9CaO5/Lv0PBOWwCeM3SI4hwm4sN2x318YnT/6xD+
xjMAmwcyH2S98z592er4TsBsadMedcRg
=PFle
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [!! SPAM] Re: how to communicate between different tomcat servers

Posted by frank <hy...@cheercode.com>.
Thank you chris for your reply.
I try to arrange all the services on one webserver, anyway if it need to be devided into several servers, I have to find a way to communicate between the servers, and I may use JMS or RMI to implement this. How about the diffierence between JMS and RMI?

Thanks a lot




frank
2008-01-22



发件人: Christopher Schultz
发送时间: 2008-01-18 01:51:45
收件人: Tomcat Users List
抄送: 
主题: [!! SPAM] Re: how to communicate between different tomcat servers

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank,

印华 wrote:
| In my design, I
| [have divided] the server side into several separate logic parts, and each
| part is deployed on a separate Tomcat server. e.g. the first tomcat
| server is to process login request, second tomcat server is to
| calculate user data, the third tomcat server is to store all the user
| information. It is a [distributed] architecture, and I hope in this way,
| this system can be extended by adding tomcat server when the
| application load on one Tomcat server is big enough.

I'm not sure you need all that complexity... most people just run the
whole application on a single server. When the load gets too high for
one server, you duplicate the web app onto a second server (and so on)
and then load balance between them. There's no reason to have physically
separated login, calculation, and data storage mechanisms.

| So currently, I meet a problem of how to
| communicate between the tomcat servers, I think http or webservice
| can do this work simply, but the efficiency is not good, and I don't
| know whether JMS is a good choice for this.

JSM isn't really any better or worse than SOAP, REST, or other
"standard" forms of communication.

| I wonder if there is any
| other way to communicate between the tomcat server?

Servers can communicate in lots of ways:
1. Records through a database
2. Binary or text data through a socket
3. Binary or text data through a named pipe (on a shared filesystem)
4. Objects through JNDI
5. Objects through RMI

| Any help and suggestion will be welcome.

Honestly, the best thing to do would be to put everything into a single
web app and just load balance between (identical) Tomcat servers. I
don't see any advantage of the separation you have created.

If you need sessions to be replicated in a cluster, you can simply turn
on "distributable" sessions and configure the Tomcat instances to
participate in the cluster. If you can tolerate the loss of information
resulting from a Tomcat instance going down while a user is logged-in,
then you don't even have to do that.

Less complexity results in easier maintenance. Hardware is cheap.
Manpower is expensive.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkePj6kACgkQ9CaO5/Lv0PCp8QCgirMzuuO3iuUgh0Ql3tZZ7qUZ
tEYAmgMFDz227mn6yf/wYQsITodDJIVU
=93Cr
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org