Go Back   ZeroC Forums > Help Center

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 03-02-2008
sly596 sly596 is online now
Registered User
 
Name: Pete Sylvester
Organization: Coconaut Studios
Project: iPhone/iPod Game
 
Join Date: Feb 2008
Posts: 13
Publisher and Subscriber

I'm building an IceStorm app where every Ice object is both a publisher and subscriber to a topic.

Is there a way to stop the subscriber from receiving the events published from the same object?

I could be going about this totally wrong because I just started working with Ice.

Thanks,
Pete
Reply With Quote
  #2 (permalink)  
Old 03-02-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,061
There is currently no way to do that. This would be a form of event filtering, a feature which is quite common to event publishing systems. If you are interested in sponsoring the addition of such a feature to IceStorm please contact sales@zeroc.com.

Without event filtering one way to do what you want is to put some piece of metadata in the event context -- such as the sender object id. In the subscriber you then look at the data, and throw out the event if the object-id matches your own object id.
Reply With Quote
  #3 (permalink)  
Old 03-02-2008
sly596 sly596 is online now
Registered User
 
Name: Pete Sylvester
Organization: Coconaut Studios
Project: iPhone/iPod Game
 
Join Date: Feb 2008
Posts: 13
I wish I could sponsor it. I'm just a poor college kid though, haha. Sorry guys.

I knew that I could just do it on the application side, but I wanted to avoid that expensive operation all together. If the publisher and subscriber reside in the same app, is Ice smart enough to not send the data over the network and instead use the loopback or some other means?

This event filtering functionality will be necessary for the application we're building. Do you see this coming anytime in the near future?

Thanks,
Pete

Last edited by sly596 : 03-02-2008 at 11:09 PM.
Reply With Quote
  #4 (permalink)  
Old 03-03-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,061
Quote:
I knew that I could just do it on the application side, but I wanted to avoid that expensive operation all together. If the publisher and subscriber reside in the same app, is Ice smart enough to not send the data over the network and instead use the loopback or some other means?
Ice does have collocation optimization, by which calls on "local" Ice objects (that is, Ice objects hosted by the same communicator as the proxy used to call on the Ice object) are directly dispatched, instead of first marshaled, sent over the wire, read and dispatched. However, in this case the collocation optimization cannot be applied since you are sending through an another service (in this case, IceStorm).

Quote:
This event filtering functionality will be necessary for the application we're building. Do you see this coming anytime in the near future?
Without a sponsor, event filtering will not be added in the near future.
Reply With Quote
  #5 (permalink)  
Old 03-04-2008
sly596 sly596 is online now
Registered User
 
Name: Pete Sylvester
Organization: Coconaut Studios
Project: iPhone/iPod Game
 
Join Date: Feb 2008
Posts: 13
Quote:
Originally Posted by matthew View Post
Without a sponsor, event filtering will not be added in the near future.
If we decide to use IceStorm for our event channel needs, we will be implementing our own event filtering system to IceStorm. If you'd like to sponsor this and a promising medical project, feel free to contact me at sylvester_peter@dwc.edu.

Pete
Reply With Quote
  #6 (permalink)  
Old 08-13-2008
hughwar hughwar is offline
Registered User
 
Name: Warren Hughes
Organization: Synthetic Equity Trading (DB)
Project: ETF MM
 
Join Date: Aug 2008
Posts: 1
Application is a publisher and subscriber to a topic(s)

Hi ZeroC Staff /Pete,

I have just started using Ice/IceStorm yesterday and am a total middleware novice. I'm looking to build a working prototype system where by every process is both a publisher and a subscriber, possibly on different topics.

I am using C# and have tried to get this approach working but am not having much luck.

both my subscriber and publisher classes make use of the same slice output file and inherit from Ice.Application and reside within the same namespace. Further i 'new' these objects from within their own threads from the application main but Im not getting the results I expect.

Is there a preferred or known way to organize the classes that inherit from Ice.Application so they can both publish and subscribe, or is there an alternative mechanism/technique that can be used?

Thanks very much
Warren
Reply With Quote
  #7 (permalink)  
Old 08-13-2008
xdm's Avatar
xdm xdm is online now
ZeroC Staff
 
Name: José Gutíerrez de la Concha Martínez
Organization: ZeroC, Inc.
Project: Ice Developer
 
Join Date: Sep 2003
Location: La Coruña, Spain
Posts: 292
Hi Warren,

Ice.Application is a convenient class for creating Ice applications, in resume it takes care of initialize Ice runtime when the application start and cleanup it when the application finish, you can get more details of Ice.Application in Ice manual, note that Ice.Application does not affect to your subscriber or publiser roll with IceStorm, being a publisher or a subscriber is only a matter of use the convenient IceStorm mechanism, You should read IceStorm chapter of Ice manual and look IceStorm demos to check the details.

If after revise these materials you still have problems with use IceStorm, you can ask here your concrete problem and we will happy to help you.

Note that for use IceStorm you don´t need to use Ice.Application but most of the time you want to use it as it simplified the task of initialize the Ice runtime, but you still could initialize/cleanup the runtime in your code if that is more convenient for your concrete use case.

Regards,
José

Last edited by xdm : 08-13-2008 at 05:22 PM.
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
Can subscriber be activated by publisher on demand? delloby Help Center 4 08-08-2007 10:19 AM
about Subscriber and Publisher terminate Help Center 1 04-27-2007 01:44 PM
about publisher/subscriber rellik78 Help Center 1 09-15-2006 04:34 AM
IceStorm publisher and subscriber in the same process istvan Help Center 2 05-25-2005 05:26 AM
minimal subscriber/publisher demo zhaiyl Help Center 1 03-29-2004 06:32 AM


All times are GMT -4. The time now is 02:23 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.