Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FeatureRequest: use cache-layer before filtering #88

Closed
haed opened this issue Nov 28, 2011 · 3 comments
Closed

FeatureRequest: use cache-layer before filtering #88

haed opened this issue Nov 28, 2011 · 3 comments

Comments

@haed
Copy link
Contributor

haed commented Nov 28, 2011

The cache-layer (BroadcasterCache) must handle with already transformed/filtered objects (by BroadcastFilter). In our scenario (and i think also in some other scenarios) the api is working with high-level message instances which must be finally transformed to a streamable representation (e.g. via BroadcastFilter). But it would be nice if a BroadcasterCache is able to use also this higher-level objects to have more possibilities for cache-optimizations (e.g. using an incremental long counter). Also in our scenario we are sharing identical messages in between multiple broadcaster, so in the current approach each BroadcasterCache is caching an own identical instance (if they don't use a global share instance, but this is hard to implement, because the cache is working with "low-level" objects).

The workaround in haed.notification is to transform the higher-level message instance to a string before broadcast to optimize cache sizes in the cache layer. It would be nicer if we could use BroadcastFilter for this.

@jfarcand
Copy link
Member

Fixed

  (https://github.com/Atmosphere/atmosphere/commit/b9e5c3a84d6443f9c3bfce7f725163bb87061a79)

@jfarcand
Copy link
Member

All you need to do is to add, in web.xml, org.atmosphere.cpr.BroadcasterCache.strategy=beforeFilter . That will cache message before they get filtered.

@haed
Copy link
Contributor Author

haed commented Nov 30, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants