Go Back   ZeroC Forums > Comments

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 04-30-2008
kwaclaw kwaclaw is offline
Registered User
 
Name: Karl Waclawek
Organization: Toronto Star Newspapers Ltd.
Project: Proof of concept
 
Join Date: Sep 2004
Location: Oshawa, Canada
Posts: 128
Best practices: using ICE with object containers

This relates to my last question regarding ICE and EJBs.

I am wondering if there are any best practices for how one should expose existing container managed objects (like EJBs or Spring beans, or objects managed by some IoC container) through an ICE API.

It seems that with ICE favouring one approach to concurrency control and life-cycle management, and the container having its own ideas about the same issues, there is some mismatch that seems hard to resolve.

Are there some special techniques that are helpful?

Karl
__________________
Karl Waclawek
The Toronto Star - http://www.thestar.com
Reply With Quote
  #2 (permalink)  
Old 04-30-2008
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,027
Hi Karl,

I'm not really sure what problems you are encountering. Perhaps if you expressed the question in more concrete terms, it would be easier to help you. For example, what lifecycle does the container impose, and why can't you similarly match the Ice object's lifecycle.
Reply With Quote
  #3 (permalink)  
Old 05-01-2008
kwaclaw kwaclaw is offline
Registered User
 
Name: Karl Waclawek
Organization: Toronto Star Newspapers Ltd.
Project: Proof of concept
 
Join Date: Sep 2004
Location: Oshawa, Canada
Posts: 128
Quote:
Originally Posted by matthew View Post
Hi Karl,

I'm not really sure what problems you are encountering. Perhaps if you expressed the question in more concrete terms, it would be easier to help you. For example, what lifecycle does the container impose, and why can't you similarly match the Ice object's lifecycle.
I may not have expressed myself clearly, as things are not clear in my head.

For instance, if the application server receives a call for an object (EJB), it gets (or instantiates) the object from the container (factory) and dispatches the call to it. I don't see how ICE comes into the picture, as it would have to do what the application server does.

Obviously I can write a separate ICE process that calls into the application server as a client (through remoting), but that adds a level of complexity.

EJB containers support calling EJBs through IIOP without such a proxy server. So, I assume proper ICE support would have to be built into the application server itself.

Now, given a framework like Spring, which does not necessarily require an application server, things look more hopeful, as ICE can assume the role of the server. But is still more cumbersome compared to the built-in Spring remoting which allows for declaratively exposing a bean as a remote service. See for instance here: Chapter 17. Remoting and web services using Spring


Just trying to find an elegant way to get ICE inserted.

Karl
__________________
Karl Waclawek
The Toronto Star - http://www.thestar.com
Reply With Quote
  #4 (permalink)  
Old 05-07-2008
joshmoore joshmoore is offline
Registered User
 
Name: Josh Moore
Organization: Glencoe Software, Inc.
Project: OMERO, http://trac.openmicroscopy.org.uk/omero
 
Join Date: Feb 2007
Location: Germany
Posts: 53
Our initial implementation of the OMERO server was a Spring context within a JBoss server. We currently support both a JBoss and an Ice-based server, which was relatively straight-forward using Ice's tie classes and the Spring interceptors which were already in place within JBoss.

If you have JBoss with Spring, I can explain how to go about this.

If not, keep things simple. Using Ice and Spring together is really no issue at all. The only way to get Ice and JBoss to work together short of significant work on the JBoss remoting library is to have the Ice thread pool active "symbiotically" within JBoss. This works and we've done it, but it's not really sensible.
Reply With Quote
  #5 (permalink)  
Old 05-07-2008
kwaclaw kwaclaw is offline
Registered User
 
Name: Karl Waclawek
Organization: Toronto Star Newspapers Ltd.
Project: Proof of concept
 
Join Date: Sep 2004
Location: Oshawa, Canada
Posts: 128
Thank you for your feedback.
Quote:
Originally Posted by joshmoore View Post
Our initial implementation of the OMERO server was a Spring context within a JBoss server. We currently support both a JBoss and an Ice-based server, which was relatively straight-forward using Ice's tie classes and the Spring interceptors which were already in place within JBoss.

If you have JBoss with Spring, I can explain how to go about this.
Actually, I am in the position of recommending how to structure the application server. So far, I am kind of fixed on Spring, but as I may have to expose some services as web services, something beside ICE may have to be used as server. It could be JBOSS (or similar) or it could be a SOAP/web service wrapper for the ICE-based application.

Quote:
If not, keep things simple. Using Ice and Spring together is really no issue at all. The only way to get Ice and JBoss to work together short of significant work on the JBoss remoting library is to have the Ice thread pool active "symbiotically" within JBoss. This works and we've done it, but it's not really sensible.
Violates the KISS principle...
Just curious, If you have an ICE-based OMERO server, why do you also offer a JBOSS based version?

Karl
__________________
Karl Waclawek
The Toronto Star - http://www.thestar.com
Reply With Quote
  #6 (permalink)  
Old 05-15-2008
joshmoore joshmoore is offline
Registered User
 
Name: Josh Moore
Organization: Glencoe Software, Inc.
Project: OMERO, http://trac.openmicroscopy.org.uk/omero
 
Join Date: Feb 2007
Location: Germany
Posts: 53
Quote:
Originally Posted by kwaclaw View Post
Just curious, If you have an ICE-based OMERO server, why do you also offer a JBOSS based version?
Karl
JBoss is what we shipped first, and so there are already clients written to the RMI interface which must be supported.

As for your architecture, if I were in your position I'd suggest coming up with a stable Ice server, using Spring internally. When it comes time for web services, you can either:
  • have a Java web container act as a client to Ice
  • use Ice's PHP bindings to build a REST interface
  • start a second Ice.Communicator within the web/app server using co-location.

Hope that's of some use.
~Josh.
Reply With Quote
  #7 (permalink)  
Old 05-15-2008
kwaclaw kwaclaw is offline
Registered User
 
Name: Karl Waclawek
Organization: Toronto Star Newspapers Ltd.
Project: Proof of concept
 
Join Date: Sep 2004
Location: Oshawa, Canada
Posts: 128
Quote:
Originally Posted by joshmoore View Post
As for your architecture, if I were in your position I'd suggest coming up with a stable Ice server, using Spring internally. When it comes time for web services, you can either:
  • have a Java web container act as a client to Ice
  • use Ice's PHP bindings to build a REST interface
  • start a second Ice.Communicator within the web/app server using co-location.

Hope that's of some use.
~Josh.
Yes, I was already contemplating the first option, but possibly with ASP.NET.

Thank you very much,

Karl
__________________
Karl Waclawek
The Toronto Star - http://www.thestar.com
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
HA-icestorm and icestormmigrate tool best practices dhogan Help Center 1 04-23-2008 06:38 PM
Object* add(Object servant, Identity id),can the servant be static object? russule Help Center 2 06-23-2007 07:19 AM
About Ice Best Practices:What is the best way to client locating the servant? sgsoft Help Center 2 06-04-2007 01:54 AM
How to pass complex C++ containers in ICE? jvme Help Center 1 08-04-2005 05:30 PM
Object Factories and object initialisation Nis Baggesen Help Center 1 09-30-2004 07:40 AM


All times are GMT -4. The time now is 12:42 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.