Just checked the readme, and TBH I wouldn't be too enthusiastic about
the deep nesting of chained operations (basically each follow-up
operation requires further level of nesting). Is that the way async
handlers are usually written in JS?
Last few weeks I am working with Gatling and the syntax to describe
scenarios = chained operations is quite nice (though it's Scala). Would
it be possible to have a syntax like this?
connected
.then(function(client) {
client.put('key', 'value');
.then(function(client) {
client.get('key').use(function(value) {
console.log(':get(`key`) = ' + value);
}).save('p0'); // this would be the same as use(function(value)
{ client.save('p0') })
}.
.then(function(client)) {
client.remove('key', client.load('p0')).use(function(success) {
console.log(':remove(`key`) = ' + success);
});
}).exec();
Note that I've used conditional remove to demonstrate load of previously
saved value. Also, I am mixing the concept of client = cache and
session, but maybe these could go to single object.
Just my 2c
Radim
On 02/18/2016 12:04 PM, Galder ZamarreƱo wrote:
Hi,
Following on Tristan's anouncement, we've also released Infinispan Javascript
client version 0.1.0. You can read all about it here:
http://blog.infinispan.org/2016/02/infinispan-javascript-client-010-is-ou...
Cheers,
--
Galder ZamarreƱo
Infinispan, Red Hat
_______________________________________________
infinispan-dev mailing list
infinispan-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/infinispan-dev
--
Radim Vansa <rvansa(a)redhat.com>
JBoss Performance Team