What would be a cool persistence?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
19 messages Options
Reply | Threaded
Open this post in threaded view
|

What would be a cool persistence?

sebastianconcept
Hi guys,

What is cool persistence to you these days?

This is more like a brainstorm here.
Before deciding what my cool persistence would sound like, I wanted to listen what you guys think.

Whatever the stack, so the backend or final storage, let's say you have some contraints:
  1. mobile-first design
  2. latency compensation
  3. local storage
  4. JSON
How would you wish to persist your models in an Amber app if you where starting today and could choose anything?

sebastian

o/

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

Darius Clarke
Keep it all in memory in redundant servers. Well, that's the only one that would be "cool" to me. ;-)

- Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

sebastianconcept
Redis can do that kind of thing, right?

And what about local in browser storage?

would you use it?





On Mar 22, 2013, at 3:55 PM, Darius Clarke wrote:

Keep it all in memory in redundant servers. Well, that's the only one that would be "cool" to me. ;-)

- Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

Darius Clarke



On Fri, Mar 22, 2013 at 12:03 PM, sebastian <[hidden email]> wrote:
Redis can do that kind of thing, right?

There may be many ways to do this with current libraries. But the cool way would be for the hardware itself to make it just appear as a larger memory space to the compiler, with the garbage collector knowing if it's shared still. 

And what about local in browser storage?
would you use it?

I'd use local storage, but for session info, device info, cacheing non-volatile media content, and possibly some user info if it's not privacy sensitive. But that's mundane use. Not as cool. 

- Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

sebastianconcept
I though about using local session storage for caching models, yeah...

What I don't have clear yet is how to invalidate that cache without creating a PITA

WebSockets might help with that but still..

Any thoughts about that?






On Mar 22, 2013, at 4:14 PM, Darius Clarke wrote:




On Fri, Mar 22, 2013 at 12:03 PM, sebastian <[hidden email]> wrote:
Redis can do that kind of thing, right?

There may be many ways to do this with current libraries. But the cool way would be for the hardware itself to make it just appear as a larger memory space to the compiler, with the garbage collector knowing if it's shared still. 

And what about local in browser storage?
would you use it?

I'd use local storage, but for session info, device info, cacheing non-volatile media content, and possibly some user info if it's not privacy sensitive. But that's mundane use. Not as cool. 

- Darius

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

Darius Clarke

Not much thought on that myself. To me, like with Google, business enterprise apps, and stews ... data becomes more valuable when it's mashed together and shared, hence servers for the model.

- Darius 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

xekoukou
In the future I would like to experiment with indexedDB and application cache for data stored in the browser.

I would use the application cache so that the web app is only downloaded once and then I would serve content with websockets or ajax/comet etc.

For the server it depends on the application, isnt it? For me it would be a graph database that speaks json.


2013/3/22 Darius Clarke <[hidden email]>

Not much thought on that myself. To me, like with Google, business enterprise apps, and stews ... data becomes more valuable when it's mashed together and shared, hence servers for the model.

- Darius 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

gokr
In reply to this post by sebastianconcept
Hey!

On 03/22/2013 05:37 PM, Sebastian Sastre wrote:
> Hi guys,
>
> /What is cool persistence to you these days?/
>
> This is more like a brainstorm here.
> Before deciding what my /cool persistence/ would sound like, I wanted to
> listen what you guys think.

Disregarding your constraints :) my current "fav" is HyperDex. I am
working on a NBFFI binding to it in my spare time. Super fast - beats
MongoDB.

Riak is of course a "solid work horse".

I tend to want a solid server backend and then do cacheing etc in the
clients. The Oak project in Pharo is also very nice since it turns Riak
into an OODBish thing, not sure how it could be ported/blended with Amber.

regards, Göran

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

sebastianconcept
Hey Goran,

How do you manage the caching in the client? using local or session html5 store?

If so, what do you do to keep consistence?


sebastian

o/

On 24/03/2013, at 06:41, Göran Krampe <[hidden email]> wrote:

> Hey!
>
> On 03/22/2013 05:37 PM, Sebastian Sastre wrote:
>> Hi guys,
>>
>> /What is cool persistence to you these days?/
>>
>> This is more like a brainstorm here.
>> Before deciding what my /cool persistence/ would sound like, I wanted to
>> listen what you guys think.
>
> Disregarding your constraints :) my current "fav" is HyperDex. I am working on a NBFFI binding to it in my spare time. Super fast - beats MongoDB.
>
> Riak is of course a "solid work horse".
>
> I tend to want a solid server backend and then do cacheing etc in the clients. The Oak project in Pharo is also very nice since it turns Riak into an OODBish thing, not sure how it could be ported/blended with Amber.
>
> regards, Göran
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

gokr
Hey!

On 03/24/2013 02:50 PM, sebastian wrote:
> Hey Goran,
>
> How do you manage the caching in the client? using local or session html5 store?
>
> If so, what do you do to keep consistence?

I will be honest and tell you that I haven't had the chance yet to build
a proper Amber client to *any* system. ;) Although I am just about to
start, but I think I will "cheat" and try to reuse a lot of the
SmalltalkHub code.

Last year I participated in a HTMTL5 app in which we used REST calls to
server and had a cacheing "repository abstraction" in the HTML5 client,
code turned IMHO a bit ugly (callback spaghetti).

On a related note: I do know Nico has some slick client/server framework
that I am hoping he will be able to release soon - but you will have to
bug him about it! :)

But I think I would try to keep the client "light" - not sure I would
bring over "domain objects" to the client at all, perhaps just send over
JSONish data. Yeah, I know, hardly beautiful OO - but... in practice it
may be an easier approach.

regards, Göran

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

sebastianconcept
Interesting Göran, thanks for sharing.

Today I've ported Mapless to Amber 1.0 so I have a 1:1 OO-ish thing on the server and client side already.

My question is more about what policy to use if one decides to use the local storage feature specially about handling conflicts (or when to refresh the data from the server at all).

So far I've found these links of interest:
  1. http://www.quora.com/localStorage
  2. https://www.facebook.com/help/330525367015217 and!
  3. http://engineering.linkedin.com/mobile/linkedin-ipad-using-local-storage-snappy-mobile-apps  <-- quite interesting
sebastian

o/


On Monday, March 25, 2013 5:07:33 AM UTC-3, Göran Krampe wrote:
Hey!

On 03/24/2013 02:50 PM, sebastian wrote:
> Hey Goran,
>
> How do you manage the caching in the client? using local or session html5 store?
>
> If so, what do you do to keep consistence?

I will be honest and tell you that I haven't had the chance yet to build
a proper Amber client to *any* system. ;) Although I am just about to
start, but I think I will "cheat" and try to reuse a lot of the
SmalltalkHub code.

Last year I participated in a HTMTL5 app in which we used REST calls to
server and had a cacheing "repository abstraction" in the HTML5 client,
code turned IMHO a bit ugly (callback spaghetti).

On a related note: I do know Nico has some slick client/server framework
that I am hoping he will be able to release soon - but you will have to
bug him about it! :)

But I think I would try to keep the client "light" - not sure I would
bring over "domain objects" to the client at all, perhaps just send over
JSONish data. Yeah, I know, hardly beautiful OO - but... in practice it
may be an easier approach.

regards, G�ran

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

xekoukou
In gereral, you cant avoid having old cache in the client. So one has to deal with that.

How can one have consistency on a resource/object that can be changed by many clients?
You simply version that object. You always do a read before a write and on each write you provide the version of the object(that you think it has) to the database.
If the version is different the database rejects the write.

Of course, this only works if there is small congestion for that object, otherwise it might require more complex methods.

2013/3/26 Sebastian Sastre <[hidden email]>
Interesting Göran, thanks for sharing.

Today I've ported Mapless to Amber 1.0 so I have a 1:1 OO-ish thing on the server and client side already.

My question is more about what policy to use if one decides to use the local storage feature specially about handling conflicts (or when to refresh the data from the server at all).

So far I've found these links of interest:

o/


On Monday, March 25, 2013 5:07:33 AM UTC-3, Göran Krampe wrote:
Hey!

On 03/24/2013 02:50 PM, sebastian wrote:
> Hey Goran,
>
> How do you manage the caching in the client? using local or session html5 store?
>
> If so, what do you do to keep consistence?

I will be honest and tell you that I haven't had the chance yet to build
a proper Amber client to *any* system. ;) Although I am just about to
start, but I think I will "cheat" and try to reuse a lot of the
SmalltalkHub code.

Last year I participated in a HTMTL5 app in which we used REST calls to
server and had a cacheing "repository abstraction" in the HTML5 client,
code turned IMHO a bit ugly (callback spaghetti).

On a related note: I do know Nico has some slick client/server framework
that I am hoping he will be able to release soon - but you will have to
bug him about it! :)

But I think I would try to keep the client "light" - not sure I would
bring over "domain objects" to the client at all, perhaps just send over
JSONish data. Yeah, I know, hardly beautiful OO - but... in practice it
may be an easier approach.

regards, G�ran

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

mass data handling

SebastianHC
Hi list,

I need to descide how to go on with my amber app.

I know that I'll need to partly allow the upload of very very big files
(up to 1GB if not more).
I also know that I could make such data smaller by preprocessing it in
amber (precalculation / filter / join / reduce / ...)

For such tasks it would be awesome to use parallel processing.

Did anybody on this lists ever try to access webworkers or even WebCL
from amber?
WebCL is currently only available for firefox, but this is no problem in
my case.

Is there another approach I could investigate in?

Thanks,
Sebastian

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: What would be a cool persistence?

sebastianconcept
In reply to this post by xekoukou
good point Apostolis.

Versioning sounds like good enough for most cases.

Appealing to use as a first approach 


On Mar 26, 2013, at 11:18 AM, Apostolis Xekoukoulotakis wrote:

In gereral, you cant avoid having old cache in the client. So one has to deal with that.

How can one have consistency on a resource/object that can be changed by many clients?
You simply version that object. You always do a read before a write and on each write you provide the version of the object(that you think it has) to the database.
If the version is different the database rejects the write.

Of course, this only works if there is small congestion for that object, otherwise it might require more complex methods.

2013/3/26 Sebastian Sastre <[hidden email]>
Interesting Göran, thanks for sharing.

Today I've ported Mapless to Amber 1.0 so I have a 1:1 OO-ish thing on the server and client side already.

My question is more about what policy to use if one decides to use the local storage feature specially about handling conflicts (or when to refresh the data from the server at all).

So far I've found these links of interest:

o/


On Monday, March 25, 2013 5:07:33 AM UTC-3, Göran Krampe wrote:
Hey!

On 03/24/2013 02:50 PM, sebastian wrote:
> Hey Goran,
>
> How do you manage the caching in the client? using local or session html5 store?
>
> If so, what do you do to keep consistence?

I will be honest and tell you that I haven't had the chance yet to build
a proper Amber client to *any* system. ;) Although I am just about to
start, but I think I will "cheat" and try to reuse a lot of the
SmalltalkHub code.

Last year I participated in a HTMTL5 app in which we used REST calls to
server and had a cacheing "repository abstraction" in the HTML5 client,
code turned IMHO a bit ugly (callback spaghetti).

On a related note: I do know Nico has some slick client/server framework
that I am hoping he will be able to release soon - but you will have to
bug him about it! :)

But I think I would try to keep the client "light" - not sure I would
bring over "domain objects" to the client at all, perhaps just send over
JSONish data. Yeah, I know, hardly beautiful OO - but... in practice it
may be an easier approach.

regards, G�ran

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Sincerely yours, 
     Apostolis Xekoukoulotakis

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: mass data handling

Nicolas Petton
In reply to this post by SebastianHC
Hi!

I think you should be able to use web workers out of the box with Amber:

NativeFunction constructor: 'Worker' value: 'foo.js'

Since Worker() is a native function, it's not available as a BlockClosure from within Amber. That's why you would have to use the NativeFunction wrapper class.

HTH,
Nico


On Mar 26, 2013, at 3:27 PM, Sebastian Heidbrink <[hidden email]> wrote:

> Hi list,
>
> I need to descide how to go on with my amber app.
>
> I know that I'll need to partly allow the upload of very very big files (up to 1GB if not more).
> I also know that I could make such data smaller by preprocessing it in amber (precalculation / filter / join / reduce / ...)
>
> For such tasks it would be awesome to use parallel processing.
>
> Did anybody on this lists ever try to access webworkers or even WebCL from amber?
> WebCL is currently only available for firefox, but this is no problem in my case.
>
> Is there another approach I could investigate in?
>
> Thanks,
> Sebastian
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Nicolas Petton
http://www.nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.


Reply | Threaded
Open this post in threaded view
|

Re: mass data handling

Manfred Kröhnert
Some time ago I found the following JS library which aims to make provide a highlevel interface to WebWorkers:


Best,
Manfred

On Tue, Mar 26, 2013 at 5:23 PM, Nicolas Petton <[hidden email]> wrote:
Hi!

I think you should be able to use web workers out of the box with Amber:

NativeFunction constructor: 'Worker' value: 'foo.js'

Since Worker() is a native function, it's not available as a BlockClosure from within Amber. That's why you would have to use the NativeFunction wrapper class.

HTH,
Nico


On Mar 26, 2013, at 3:27 PM, Sebastian Heidbrink <[hidden email]> wrote:

> Hi list,
>
> I need to descide how to go on with my amber app.
>
> I know that I'll need to partly allow the upload of very very big files (up to 1GB if not more).
> I also know that I could make such data smaller by preprocessing it in amber (precalculation / filter / join / reduce / ...)
>
> For such tasks it would be awesome to use parallel processing.
>
> Did anybody on this lists ever try to access webworkers or even WebCL from amber?
> WebCL is currently only available for firefox, but this is no problem in my case.
>
> Is there another approach I could investigate in?
>
> Thanks,
> Sebastian
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Nicolas Petton
http://www.nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: mass data handling

SebastianHC
Thank you guys,

I'll have a look at those possibilities. Last time I checked parallel.js it looked a lot different.... great.

Another projekt I found is
https://github.com/RiverTrail/RiverTrail

As soon as I might have done something in that direction, I'll prepare an amber example for sure.

Sebastian

Am 26.03.2013 10:31, schrieb Manfred Kröhnert:
Some time ago I found the following JS library which aims to make provide a highlevel interface to WebWorkers:


Best,
Manfred

On Tue, Mar 26, 2013 at 5:23 PM, Nicolas Petton <[hidden email]> wrote:
Hi!

I think you should be able to use web workers out of the box with Amber:

NativeFunction constructor: 'Worker' value: 'foo.js'

Since Worker() is a native function, it's not available as a BlockClosure from within Amber. That's why you would have to use the NativeFunction wrapper class.

HTH,
Nico


On Mar 26, 2013, at 3:27 PM, Sebastian Heidbrink <[hidden email]> wrote:

> Hi list,
>
> I need to descide how to go on with my amber app.
>
> I know that I'll need to partly allow the upload of very very big files (up to 1GB if not more).
> I also know that I could make such data smaller by preprocessing it in amber (precalculation / filter / join / reduce / ...)
>
> For such tasks it would be awesome to use parallel processing.
>
> Did anybody on this lists ever try to access webworkers or even WebCL from amber?
> WebCL is currently only available for firefox, but this is no problem in my case.
>
> Is there another approach I could investigate in?
>
> Thanks,
> Sebastian
>
> --
> You received this message because you are subscribed to the Google Groups "amber-lang" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
Nicolas Petton
http://www.nicolas-petton.fr

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.



--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

parallelJS anyone?

SebastianHC
Hi,

I already asked for some ideas on handling large tasks in Amber quite
some time ago.
Unfortunately I was held back to go on with this.

Now I tried it again and I fail again ;-)

In paralleJS one has to provide named functions as method arguments and
I struggle to accomplish that in Amber.

Did anybody already implement something with parallelJS?

Here is an example.

     var p = new Parallel([40, 41, 42]),
     log = function () { console.log(arguments); };

     // One gotcha: anonymous functions cannot be serialzed
     // If you want to do recursion, make sure the function
     // is named appropriately
     function fib(n) {
     return n < 2 ? 1 : fib(n - 1) + fib(n - 2);
     };

     p.map(fib).then(log);



Thanks Sebastian

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: parallelJS anyone?

SebastianHC
Oh two things that I forgot about is:

If you dabble around with this you will need to:
use the constructor including the evaljs Path:

p = new Parallel([2, 3, 3], { evalPath: 'js/eval.js' });

and one might also have to set amber as a prerequisite:

p.require('lib/amber.js')


Sebastian


Am 17.01.2014 08:51, schrieb Sebastian Heidbrink:

> Hi,
>
> I already asked for some ideas on handling large tasks in Amber quite
> some time ago.
> Unfortunately I was held back to go on with this.
>
> Now I tried it again and I fail again ;-)
>
> In paralleJS one has to provide named functions as method arguments
> and I struggle to accomplish that in Amber.
>
> Did anybody already implement something with parallelJS?
>
> Here is an example.
>
>     var p = new Parallel([40, 41, 42]),
>     log = function () { console.log(arguments); };
>
>     // One gotcha: anonymous functions cannot be serialzed
>     // If you want to do recursion, make sure the function
>     // is named appropriately
>     function fib(n) {
>     return n < 2 ? 1 : fib(n - 1) + fib(n - 2);
>     };
>
>     p.map(fib).then(log);
>
>
>
> Thanks Sebastian
>

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.