Hello all,
I just wanted to have everyone’s opinion on the idea I will describe below. As many of you may know it is possible to cluster the session scope and store it in a sessionstore which can be either a database, a cache or the file system. Now often people have applications in a cluster that need to stay in “synch”. So for instance if you reinit an application on one server, you should initialize all others in the cluster too. So Micha and I discussed already a while ago what options (back then for Railo) are available.
I just wanted to throw out the following ideas:
- Cluster the complete application scope just in the same way the session scope is clustered
in the Application.cfc one would write:
this.applicationstorage = “cache|datasource|file|memory”;
this.applicationcluster = true|false;
o Pros
§ Easy to implement as a user
§ A pointer from the session scope to the application scope would be possible again
o Cons
§ Singletons are serialized as well so they have to be deserialized for every request (if applicationcluster is set to false)
§ Values are not immediately available if a request sets a value, but only if the request has finished and the value has been rewritten to the storage
§ Serialization and deserialization can be time consuming, since people tend to store a lot in the application scope
- Cluster a subKey of the application scope. This means that the application.cfc could look like this;
this.applicationstorage = “cache|datasource|file|memory”;
this.applicationstorageKey = ‘cluster’; // means that the application.cluster key and all values below are stored in the applicationstorage
this.applicationcluster = true|false;
o Pros
§ The higher performance would be useable for the non-clustered part of the application scope
§ No serialization necessary
§ Since only a subset is clustered, the performance can be enhanced by not overloading the clustered key with data.
§ The complete application scope would still be clusterable if the key is set to “”.
o Cons
§ None that I can see
A general con is, that variables set on one server in a clustered application scope are not immediately available to any other server, until the next request on any other server might read the application scope from the storage.
Obviously the keys in the clustered parts of the application scope are only allowing serializable values.
This idea is lingering with us for a while already and we could have used it in many occasions. I am very intrigued by it and I would appreciate your thoughts.
Sincerely
Gert Franz
RASIA GmbH
Spittelgasse 7
5103 Moeriken-Wildegg
Email: ge...@rasia.ch
Skype: gert.franz
Phone Switzerland: +41 76 5680 231
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/015a01d052ae%2446d166e0%24d47434a0%24%40rasia.ch.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/54F0A3DC.6080409%40lucee.org.
For more options, visit https://groups.google.com/d/optout.
Pretty sure I made a feature request for this back in the railo days. definitely sub keys rather than whole scopes.
Also id be interested in whether a sync of data similar to how elastic search does it should be used rather than external cache store. I'd be worried about Latency for app scope. Also I think its fair to say that typically for most people app scope it's read many write far less where as session is far more down to the app.
Cheers
A
Sent from my phone
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAMaJE6sfk_j2YT9-R94s-XETfPcycifvM67D0-_YvN_N1dKJ2w%40mail.gmail.com.
I wonder whether a mysql style binary log could be the approach or actually just making events that could be listened for by individual nodes to know that certainly keys in the scope are dirty and need to be reinited rather than worrying about how to deal with complex objects. To me events would go along way with this
A
Sent from my phone
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAFrbJ5Vmqk8VJrwrD-YgEV5vf%3D7nApGyAwRn9G10F5diy1%3D2DA%40mail.gmail.com.
-1
a special key in the application scope that does something magical, but also behaves differently from the rest of the scope as it won't accept an unserializable value.. that's a horrible idea.
What happened to the idea of keeping the core trim and lean and providing extra functionality as extensions?
This would be much better implemented as an extension that provides a cluster scope, with pluggable transports.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/bbf21c87-3c20-48f3-8a66-d94545013546%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/399e50a9-712e-4ffa-af55-354e5397274e%40googlegroups.com.
-1
a special key in the application scope that does something magical, but also behaves differently from the rest of the scope as it won't accept an unserializable value.. that's a horrible idea.
This would be much better implemented as an extension that provides a cluster scope, with pluggable transports.
--
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/09e38341-5fe0-4e23-a109-71ba48f15f8a%40googlegroups.com.
|
|
CONFIDENTIAL AND PRIVILEGED - This e-mail and any attachment is intended solely for the addressee, is strictly confidential and may also be subject to legal, professional or other privilege or may be protected by work product immunity or other legal rules. If you are not the addressee please do not read, print, re-transmit, store or act in reliance on it or any attachments. Instead, please email it back to the sender and then immediately permanently delete it. Pixl8 Interactive Ltd Registered in England. Registered number: 04336501. Registered office: 8 Spur Road, Cosham, Portsmouth, Hampshire, PO6 3EB |
Arbitrary scopes though, that are implemented with some standard interface and that can be written as extensions sounds like a potentially good abstraction for this sort of thing though (presumably the cluster scope is written in this way??)