Re: [akka-user] Re: Distributed Event Network design pattern?

2014-08-17 Thread Patrik Nordwall
On Mon, Aug 18, 2014 at 1:04 AM, Glenn Grant  wrote:

> Thanks for the pointers Patrik. Already read through most of them before,
> but the distributed pub/sub one was new to me :)
>
> I'm thinking as always there isn't necessarily going to be an 'easy
> solution', just read the docs and play around to see what works best :p
>

Sounds like a great plan!
Cheers,
Patrik


>
> Cheers
>
> - Glenn / devalias
>
> Cheers,
>
> Glenn 'devalias' Grant
>
> White Label Personal Clouds / Welcomer
> ___
> gl...@welcomer.me
> LinkedIn   |  Twitter
> 
>
>
> On 15 August 2014 17:27, Patrik Nordwall 
> wrote:
>
>> Some pointers into the documentation...
>>
>>
>> On Thu, Aug 14, 2014 at 4:46 AM, Greg Flanagan 
>> wrote:
>>
>>> I'm not qualified to address your questions directly but I find a good
>>> place to start when looking for akka patterns is the typesafe activator.
>>> Here  is one on
>>> a clustered subpub. might be interesting for you.
>>>
>>> On Wednesday, August 13, 2014 4:07:15 PM UTC-7, Glenn / devalias wrote:

 Heya,

 I was wondering if someone on the list might be able to help me out.
 Trying to figure out what the best 'design pattern' would be to approach
 the following (and with my currently limited akka knowledge it'd bending my
 mind a little :p) :

 * A 'container' (actor system?). Initially there will be one, but this
 concept will likely expand to multiple disparate containers, not
 necessarily controlled by the same person (so secret cookie stuff wouldn't
 be useful between them)

>>>
>>
>> http://doc.akka.io/docs/akka/2.3.5/java/remoting.html#Secure_Cookie_Handshake
>>
>>
>>>  * Inside the container there are unique nodes (actors?). Each node
 needs to be addressable directly (routed from it's container?), but will
 handle entirely different things.
 * Ideally the nodes will be able to be communicated with directly
 (actor selection or akka http?)
 * For each node, there should be a guardian/receptionist as the single
 'channel of contact'. This will consume the messages, check any required
 auth, and then send them into a protected internal system (second actor
 system running inside the guardian actor? or is there a better pattern?) I
 don't think there is a need for the internal 'protected' actors to reply
 directly (as they could just send a new fire/forget event to the guardian
 on the other node), but if they wanted to, how would that fit in with the
 'guardian' pattern?

>>>
>> trusted-selection-paths
>> http://doc.akka.io/docs/akka/2.3.5/java/remoting.html#Untrusted_Mode
>>
>>
>>>
 Essentially i'm trying to conceptualise a distributed event network,
 where any node is capable of sending events to any other node, and each
 node can process those received events as it deems necessary (or ignore
 them if it so chooses)

 Also, does akka support a 'distributed' Pub/Sub (across disparate actor
 systems), or does it only work locally to a single actor system?

>>>
>> http://doc.akka.io/docs/akka/2.3.5/contrib/distributed-pub-sub.html
>>
>>
>>>
 As an aside, are there any good books/sites that have a bunch of
 different akka design patterns? (aside from the ones scattered through the
 docs/etc)

>>>
>> http://doc.akka.io/docs/akka/2.3.5/additional/books.html
>>
>> Regards,
>> Patrik
>>
>>
>>>
 Thanks heaps!!

 - Glenn / devalias

>>>  --
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ:
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >> Search the archives:
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+unsubscr...@googlegroups.com.
>>>
>>> To post to this group, send email to akka-user@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe  -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>>  --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Akka User List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/akka-user/tEVpMg0xJlg/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> akka-user+un

Re: [akka-user] Akka microkernel parameters

2014-08-17 Thread Patrik Nordwall
Looks like something similar was answered in this thread:
https://groups.google.com/d/msg/akka-user/6hyDUn4RHOE/6UFsM-Gm4VwJ

/Patrik


On Sun, Aug 17, 2014 at 7:20 AM, Shawn  wrote:

> Patrik, would you kindly elaborate on why akka-sbt-plugin was retired?
> sbt-native-packager is more general and powerful but I don't recall it
> having anything built-in to support Akka.
>
> So, prior to 2.3.x we had an relatively easy and documented way for a
> *newbie* to deploy an Akka app with the microkernel - it even created a
> nice little folder structure and launch scripts and config files all in
> their tidy little places.
>
> Are you saying newer versions of Akka takes a step backwards in this
> regard, or is there some replacement that makes Akka deployment even
> simpler for newcomers?
>
>
> On Wednesday, June 11, 2014 2:13:50 PM UTC-7, Patrik Nordwall wrote:
>
>> You can define several Bootable classes, but a Bootable doesn't take
>> parameters. One way is to define the properties in a configuration file
>> that each bootable reads from.
>>
>> Be aware of that akka sbt dist is discontinued in version 2.3.x and
>> sbt-native-packager  is the
>> recommended tool for creating distributions of Akka applications when using
>> sbt.
>>
>> Regards,
>> Patrik
>>
>>
>> On Wed, Jun 11, 2014 at 11:20 AM, Axel Poigné 
>> wrote:
>>
>>> Hello,
>>>
>>> I like to distribute a Akka microkernel  to a cluster using
>>> akka-sbt-plugin. I have several boot classes, some of which do need a
>>> parameter. The situation is best compared with the
>>> akka-sample-cluster-scala factorial example where we have a main
>>>
>>> object FactorialApp {
>>>   def main(args: Array[String]): Unit = {
>>> // starting 3 backend nodes and 1 frontend node
>>> FactorialBackend.main( Seq( "2551" ).toArray )
>>> FactorialBackend.main( Seq( "2552" ).toArray )
>>> FactorialBackend.main( Array.empty )
>>> FactorialFrontend.main( Array.empty )
>>>   }
>>> }
>>>
>>> where different ports are provided to the FactorialBackend. In my case,
>>> however, the FactorialBackend should be a Bootable that is distributed to a
>>> cluster but with different parameters (here port names). I am aware of
>>>
>>> http://stackoverflow.com/questions/15888579/get-
>>> command-line-arguments-when-running-an-akka-microkernel
>>>
>>> which does not provide a solution.
>>>
>>> I would like to stick to using sbt dist for convenience, but there might
>>> be other ways to proceed.
>>>
>>> Any help would be welcome.
>>>
>>> Axel
>>>
>>> --
>>> >>  Read the docs: http://akka.io/docs/
>>> >>  Check the FAQ: http://doc.akka.io/docs/akka/
>>> current/additional/faq.html
>>> >>  Search the archives: https://groups.google.com/
>>> group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>>
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>>
>> Patrik Nordwall
>> Typesafe  -  Reactive apps on the JVM
>> Twitter: @patriknw
>>
>> 
>>
>>   --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Will Akka Persistence Store Take Lots of Disk Space and Grow Faster Rate(Highly OLTP)?

2014-08-17 Thread Patrik Nordwall
On Fri, Aug 15, 2014 at 5:50 PM, Prakhyat Mallikarjun  wrote:

> Hi patrik,
>
> Glad you understood my point.
>
> Thanks for your suggestions and point of view. It will help me.
>
> If old stock of events are removed it will save lot of disk space.
>
> But I am curious,
> How taking snapshot will get rid of old events? When framework takes
> snapshots does it delete old events? Correct me if I am wrong.
>

Saving a snapshot will not automatically delete events.

To delete all messages (journaled by a single persistent actor) up to a
specified sequence number, persistent actors may call the deleteMessages
 method.


>
> Also why is it important to know how the system reached a particular
> state? As the application or data ages, knowing how the system reached
> particular state will become less significance. Why is it so important in
> architecture or design?
>

It is not always important, but for some applications it is.
Event sourcing concepts:
https://github.com/eventstore/eventstore/wiki/Event-Sourcing-Basics
http://martinfowler.com/eaaDev/EventSourcing.html
http://martinfowler.com/bliki/CQRS.html

I also recommend watching this presentation by Duncan DeVore:
http://www.parleys.com/play/53a7d2cce4b0543940d9e55c

/Patrik


>
> -prakhyat m m
>
> --
> >>  Read the docs: http://akka.io/docs/
> >>  Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>  Search the archives:
> https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] sbt dist with version 2.3.2

2014-08-17 Thread Patrik Nordwall
I agree, but I would like to add that as described in the migration guide
the old 2.2.x akka dist plugin can be used to package akka 2.3.x
applications.

/Patrik


On Sun, Aug 17, 2014 at 9:20 PM, Konrad Malawski  wrote:

> Sure, agreed – feel free to add this requirement to the issue and we'll
> get to it eventually (or someone of the community might give a helping hand
> here).
>
>
> On Sun, Aug 17, 2014 at 6:33 PM, Shawn  wrote:
>
>> Konrad, I don't see how simply linking to sbt-native-packager helps with
>> the original question.
>>
>> As I mentioned, sbt-native-packager has nothing akka specific about it,
>> whereas akka-sbt-plugin was akka-aware and *did* akka-specific things.
>>
>> What the documentation needs is an example built.sbt or instructions on
>> how to achieve at least the same capability as akka-sbt-plugin but using
>> sbt-native-packager.
>>
>>
>> On Sunday, August 17, 2014 6:08:12 AM UTC-7, Konrad Malawski wrote:
>>>
>>> Hi guys,
>>> Have you seen the http://www.scala-sbt.org/
>>> sbt-native-packager/index.html sbt plugin?
>>> The sbt guys are pouring loads of effort into making apps easily
>>> packagable using that plugin.
>>> So instead of having a custom akka plugin we’d rather recommend that one.
>>>
>>> I created an issue for linking to the native packager in the docs
>>> https://github.com/akka/akka/issues/15677
>>>
>>> Cheers!
>>>
>>> --
>>> Konrad 'ktoso' Malawski
>>> hAkker @ typesafe
>>> http://akka.io
>>>
>>  --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Cheers,
> Konrad 'ktoso' Malawski
> hAkker @ Typesafe
>
> 
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Difference between ClusterReceptionistExtension(system).registerService and DistributedPubSubMediator.Put

2014-08-17 Thread JasonQ
Hello, 

Per my understanding after going through AKKA document,  if I want to use 
mediator to send message to some actor in the cluster , I need 
use DistributedPubSubMediator.Put.  When using ClusterClient.send, there's 
sample code using registerService in the doc instead of 
DistributedPubSubMediator.Put. Function wise, is there any difference 
between ClusterReceptionistExtension(system).registerService and 
DistributedPubSubMediator.Put? 

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Distributed Event Network design pattern?

2014-08-17 Thread Glenn Grant
Thanks for the pointers Patrik. Already read through most of them before,
but the distributed pub/sub one was new to me :)

I'm thinking as always there isn't necessarily going to be an 'easy
solution', just read the docs and play around to see what works best :p

Cheers

- Glenn / devalias

Cheers,

Glenn 'devalias' Grant

White Label Personal Clouds / Welcomer
___
gl...@welcomer.me
LinkedIn   |  Twitter



On 15 August 2014 17:27, Patrik Nordwall  wrote:

> Some pointers into the documentation...
>
>
> On Thu, Aug 14, 2014 at 4:46 AM, Greg Flanagan 
> wrote:
>
>> I'm not qualified to address your questions directly but I find a good
>> place to start when looking for akka patterns is the typesafe activator.
>> Here  is one on
>> a clustered subpub. might be interesting for you.
>>
>> On Wednesday, August 13, 2014 4:07:15 PM UTC-7, Glenn / devalias wrote:
>>>
>>> Heya,
>>>
>>> I was wondering if someone on the list might be able to help me out.
>>> Trying to figure out what the best 'design pattern' would be to approach
>>> the following (and with my currently limited akka knowledge it'd bending my
>>> mind a little :p) :
>>>
>>> * A 'container' (actor system?). Initially there will be one, but this
>>> concept will likely expand to multiple disparate containers, not
>>> necessarily controlled by the same person (so secret cookie stuff wouldn't
>>> be useful between them)
>>>
>>
>
> http://doc.akka.io/docs/akka/2.3.5/java/remoting.html#Secure_Cookie_Handshake
>
>
>> * Inside the container there are unique nodes (actors?). Each node needs
>>> to be addressable directly (routed from it's container?), but will handle
>>> entirely different things.
>>> * Ideally the nodes will be able to be communicated with directly (actor
>>> selection or akka http?)
>>> * For each node, there should be a guardian/receptionist as the single
>>> 'channel of contact'. This will consume the messages, check any required
>>> auth, and then send them into a protected internal system (second actor
>>> system running inside the guardian actor? or is there a better pattern?) I
>>> don't think there is a need for the internal 'protected' actors to reply
>>> directly (as they could just send a new fire/forget event to the guardian
>>> on the other node), but if they wanted to, how would that fit in with the
>>> 'guardian' pattern?
>>>
>>
> trusted-selection-paths
> http://doc.akka.io/docs/akka/2.3.5/java/remoting.html#Untrusted_Mode
>
>
>>
>>> Essentially i'm trying to conceptualise a distributed event network,
>>> where any node is capable of sending events to any other node, and each
>>> node can process those received events as it deems necessary (or ignore
>>> them if it so chooses)
>>>
>>> Also, does akka support a 'distributed' Pub/Sub (across disparate actor
>>> systems), or does it only work locally to a single actor system?
>>>
>>
> http://doc.akka.io/docs/akka/2.3.5/contrib/distributed-pub-sub.html
>
>
>>
>>> As an aside, are there any good books/sites that have a bunch of
>>> different akka design patterns? (aside from the ones scattered through the
>>> docs/etc)
>>>
>>
> http://doc.akka.io/docs/akka/2.3.5/additional/books.html
>
> Regards,
> Patrik
>
>
>>
>>> Thanks heaps!!
>>>
>>> - Glenn / devalias
>>>
>>  --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to akka-user+unsubscr...@googlegroups.com.
>>
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
>
> Patrik Nordwall
> Typesafe  -  Reactive apps on the JVM
> Twitter: @patriknw
>
>  --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Akka User List" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/akka-user/tEVpMg0xJlg/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
>>  Read the docs: 

Re: [akka-user] What would it take to make actors in another language/platform

2014-08-17 Thread Glenn / devalias
It's been a while since i've looked into pi/etc, but from memory there were 
arduino shields that you could add onto it, giving you the best of the 
power of pi, with the better I/O support of arduino. Not sure how easy it 
is to get going/cost/etc, but might fit your solution?

Alternately, I would probably look at the possibility of running an actor 
on the closest 'powerful' node to your arduino, and then use a streamlined 
process to communicate with it/watch it directly (a bit more complex, but 
you would be able to stick to native arduino/etc)

/2c

- Glenn / devalias

On Thursday, 14 August 2014 12:15:46 UTC+10, Josh Powers wrote:
>
> Thanks all for the replies, I didn't see them until just now.  I assumed I 
> would get notified by groups when one came.  
>
> At any rate, I am still quite interested in this as a possibility, for my 
> purposes an arduino or propeller (paralax) solution would be much more 
> inline with my goals, rather than a pi, mostly because the pi doesnt have a 
> ton of io, where the application I am considering would need that.  Also I 
> am not intending to have the actors on the devices be standalone, they 
> would need to communicate to a proper set of jvm based akka actors.  
>
> I will look into other options but also I will likely look into the pi and 
> see if I can make it fit my needs, it is nice that it can just run the jvm. 
>  On the topic of the pi what options would I have for communication, 
> specifically would it be able to communicate over serial, or even better 
> could I feed it my own class for communication?  (likely going to be using 
> xbee radios in api mode / doing zigbee mesh, really akka is ideal for this 
> sort of situation just need to figure out how to get it working in my world 
> :).)
>
> Thanks again.
> Josh
>
> On Monday, August 4, 2014 3:10:23 AM UTC-7, Konrad Malawski wrote:
>>
>> Hi Josh,
>> We didn't yet publish/document our actor / cluster protocols very 
>> explicitly.
>> We'd like to do this at some point, so perhaps other impls could talk to 
>> an akka cluster – no plans on when this might happen though.
>> This plays into an interesting story about exposing actors as services – 
>> we're not there yet though.
>>
>> As for arduino's... I guess using plain C there would be a better option 
>> there?
>> There is an Akka inspired C implementation "libcppa" around, but that's 
>> for in-memory AFAIR.
>> If you'd go down the road of making them a cluster you'll have to 
>> implemen cluster memberships etc. (depends on use case again, but if 
>> they're "in the field" that's probably not a good idea if they're on GPRS 
>> etc).
>>
>> I'm not sure about your use-case, but perhaps using Raspberry Pi's would 
>> fit this better?
>> They're able to run a JVM nicely and you could use Akka on them directly. 
>>
>>
>> -- 
>> Cheers,
>> Konrad 'ktoso' Malawski
>> hAkker @ Typesafe
>>
>> 
>>  
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] sbt dist with version 2.3.2

2014-08-17 Thread Konrad Malawski
Sure, agreed – feel free to add this requirement to the issue and we'll get
to it eventually (or someone of the community might give a helping hand
here).


On Sun, Aug 17, 2014 at 6:33 PM, Shawn  wrote:

> Konrad, I don't see how simply linking to sbt-native-packager helps with
> the original question.
>
> As I mentioned, sbt-native-packager has nothing akka specific about it,
> whereas akka-sbt-plugin was akka-aware and *did* akka-specific things.
>
> What the documentation needs is an example built.sbt or instructions on
> how to achieve at least the same capability as akka-sbt-plugin but using
> sbt-native-packager.
>
>
> On Sunday, August 17, 2014 6:08:12 AM UTC-7, Konrad Malawski wrote:
>>
>> Hi guys,
>> Have you seen the http://www.scala-sbt.org/sbt-native-packager/index.html sbt
>> plugin?
>> The sbt guys are pouring loads of effort into making apps easily
>> packagable using that plugin.
>> So instead of having a custom akka plugin we’d rather recommend that one.
>>
>> I created an issue for linking to the native packager in the docs
>> https://github.com/akka/akka/issues/15677
>>
>> Cheers!
>>
>> --
>> Konrad 'ktoso' Malawski
>> hAkker @ typesafe
>> http://akka.io
>>
>  --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
Konrad 'ktoso' Malawski
hAkker @ Typesafe



-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] sbt dist with version 2.3.2

2014-08-17 Thread Shawn
Konrad, I don't see how simply linking to sbt-native-packager helps with 
the original question.

As I mentioned, sbt-native-packager has nothing akka specific about it, 
whereas akka-sbt-plugin was akka-aware and *did* akka-specific things.

What the documentation needs is an example built.sbt or instructions on how 
to achieve at least the same capability as akka-sbt-plugin but using 
sbt-native-packager.

On Sunday, August 17, 2014 6:08:12 AM UTC-7, Konrad Malawski wrote:
>
> Hi guys,
> Have you seen the http://www.scala-sbt.org/sbt-native-packager/index.html sbt 
> plugin?
> The sbt guys are pouring loads of effort into making apps easily 
> packagable using that plugin.
> So instead of having a custom akka plugin we’d rather recommend that one.
>
> I created an issue for linking to the native packager in the docs 
> https://github.com/akka/akka/issues/15677
>
> Cheers!
>
> -- 
> Konrad 'ktoso' Malawski
> hAkker @ typesafe
> http://akka.io
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Camel Routes not working in OSGi

2014-08-17 Thread Gaurav Sharma
Fixed the problem - 
The solution to my problem was in this link that I stumbled upon - 
http://stackoverflow.com/questions/17415076/akka-camel-untypedconsumeractor-not-consuming-from-file-based-queue

I was not calling the super.preStart in my code.

thanks!


On Sunday, August 17, 2014 7:58:17 PM UTC+5:30, Gaurav Sharma wrote:
>
> Hi,
> I'm trying to create a node that creates a UntypedConsumer that would read 
> through a file location. I have everything configured in Karaf and not 
> getting any error but still I'm not able to see my file being moved...
>
> The akka version i'm using is 2.3.4 and I have all of it loaded in my 
> karaf 
> [  54] [Active ] [] [   80] com.typesafe.akka.actor (2.3.4)
> [  55] [Active ] [] [   80] Scala Compiler 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  56] [Active ] [] [   80] Scala Standard Library 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  57] [Active ] [] [   80] Scala Reflect 
> (2.10.0.v20121205-112020-VFINAL-18481cef9b)
> [  58] [Active ] [] [   80] com.typesafe.config (1.2.1)
> [  59] [Active ] [] [   80] com.typesafe.akka.osgi (2.3.4)
> [  60] [Active ] [] [   80] com.typesafe.akka.camel (2.3.4)
> [  61] [Active ] [] [   80] camel-core (2.13.2)
> [  62] [Active ] [] [   80] com.typesafe.akka.cluster 
> (2.3.4)
> [  63] [Active ] [] [   80] Protocol Buffer Java API 
> (2.5.0)
> [  64] [Active ] [] [   80] 
> wrap_filehome_exyybcc_Downloads_jars_uncommons-maths-1.2.2.jar (0)
> [  65] [Active ] [] [   80] com.typesafe.akka.remote 
> (2.3.4)
> [  66] [Active ] [] [   80] The Netty Project (3.8.0.Final)
> [  69] [Active ] [] [   80] osgi.cmpn (5.0.0.201305092017)
> [  77] [Active ] [] [   80] Apache Felix Declarative 
> Services (1.8.2)
> [  80] [Active ] [] [   80] com.typesafe.akka.slf4j (2.3.4)
>
>
>
>
> Below is what I'm trying to do - 
>
> Node initialization code -
> config = ConfigFactory
> .parseString("akka.remote.netty.tcp.port=" + 2551)
> .withFallback(
> ConfigFactory
> .parseString("akka.cluster.roles = [" +NodeConstants.FILE_CONSUMER_ROLE 
> +"]"))
> .withFallback(ConfigFactory.load());
>
> ClassLoader loader = OsgiActorSystemFactory.akkaActorClassLoader();
> Option option = Option.apply(loader);
> BundleContext bContext = 
> FrameworkUtil.getBundle(this.getClass()).getBundleContext();
> OsgiActorSystemFactory factory = new OsgiActorSystemFactory(bContext, 
> option, config);
>  actorSystem = factory.createActorSystem("ClusterSystem");
> actorSystem.actorOf(Props.create(FileRouteConsumerActor.class), 
> "fileConsumerActor");
>
> application.conf
> akka {
> version = "2.3.4"
> event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] 
>   loggers = ["akka.event.slf4j.Slf4jLogger"]
>   loglevel = "DEBUG"
>
>   actor {
> provider = "akka.cluster.ClusterActorRefProvider"
>   }
>   remote {
> log-remote-lifecycle-events = off
> netty.tcp {
>   hostname = "127.0.0.1"
>   port = 0
> }
>   }
>
> cluster {
> seed-nodes = [
>   "akka.tcp://ClusterSystem@127.0.0.1:2551",
>   "akka.tcp://ClusterSystem@127.0.0.1:2552"]
>
> auto-down-unreachable-after = 10s
>   }
>
> file consumer actor code -
> public String getEndpointUri() {
> // return "jetty:http://0.0.0.0:8877/camel/welcome";;
> System.out.println("Inside Endopoint URI FileConsumer");
> return "file:/home/exyybcc/temp?move=/home/exyybcc/temp/pmed";
> }
>
> public void onReceive(Object message) {
> if ((message instanceof CamelMessage)
>and all the other code
>   }
>
>
>
> Now I'm no0t clear I have two files in the end point path but it is not 
> working. Please can anyone help me in knowing as to why this is not working.
>
> thanks!
>
>
>
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Camel Routes not working in OSGi

2014-08-17 Thread Gaurav Sharma
Hi,
I'm trying to create a node that creates a UntypedConsumer that would read 
through a file location. I have everything configured in Karaf and not 
getting any error but still I'm not able to see my file being moved...

The akka version i'm using is 2.3.4 and I have all of it loaded in my karaf 
[  54] [Active ] [] [   80] com.typesafe.akka.actor (2.3.4)
[  55] [Active ] [] [   80] Scala Compiler 
(2.10.0.v20121205-112020-VFINAL-18481cef9b)
[  56] [Active ] [] [   80] Scala Standard Library 
(2.10.0.v20121205-112020-VFINAL-18481cef9b)
[  57] [Active ] [] [   80] Scala Reflect 
(2.10.0.v20121205-112020-VFINAL-18481cef9b)
[  58] [Active ] [] [   80] com.typesafe.config (1.2.1)
[  59] [Active ] [] [   80] com.typesafe.akka.osgi (2.3.4)
[  60] [Active ] [] [   80] com.typesafe.akka.camel (2.3.4)
[  61] [Active ] [] [   80] camel-core (2.13.2)
[  62] [Active ] [] [   80] com.typesafe.akka.cluster 
(2.3.4)
[  63] [Active ] [] [   80] Protocol Buffer Java API (2.5.0)
[  64] [Active ] [] [   80] 
wrap_filehome_exyybcc_Downloads_jars_uncommons-maths-1.2.2.jar (0)
[  65] [Active ] [] [   80] com.typesafe.akka.remote (2.3.4)
[  66] [Active ] [] [   80] The Netty Project (3.8.0.Final)
[  69] [Active ] [] [   80] osgi.cmpn (5.0.0.201305092017)
[  77] [Active ] [] [   80] Apache Felix Declarative 
Services (1.8.2)
[  80] [Active ] [] [   80] com.typesafe.akka.slf4j (2.3.4)




Below is what I'm trying to do - 

Node initialization code -
config = ConfigFactory
.parseString("akka.remote.netty.tcp.port=" + 2551)
.withFallback(
ConfigFactory
.parseString("akka.cluster.roles = [" +NodeConstants.FILE_CONSUMER_ROLE 
+"]"))
.withFallback(ConfigFactory.load());

ClassLoader loader = OsgiActorSystemFactory.akkaActorClassLoader();
Option option = Option.apply(loader);
BundleContext bContext = 
FrameworkUtil.getBundle(this.getClass()).getBundleContext();
OsgiActorSystemFactory factory = new OsgiActorSystemFactory(bContext, 
option, config);
 actorSystem = factory.createActorSystem("ClusterSystem");
actorSystem.actorOf(Props.create(FileRouteConsumerActor.class), 
"fileConsumerActor");

application.conf
akka {
version = "2.3.4"
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"] 
  loggers = ["akka.event.slf4j.Slf4jLogger"]
  loglevel = "DEBUG"

  actor {
provider = "akka.cluster.ClusterActorRefProvider"
  }
  remote {
log-remote-lifecycle-events = off
netty.tcp {
  hostname = "127.0.0.1"
  port = 0
}
  }

cluster {
seed-nodes = [
  "akka.tcp://ClusterSystem@127.0.0.1:2551",
  "akka.tcp://ClusterSystem@127.0.0.1:2552"]

auto-down-unreachable-after = 10s
  }

file consumer actor code -
public String getEndpointUri() {
// return "jetty:http://0.0.0.0:8877/camel/welcome";;
System.out.println("Inside Endopoint URI FileConsumer");
return "file:/home/exyybcc/temp?move=/home/exyybcc/temp/pmed";
}

public void onReceive(Object message) {
if ((message instanceof CamelMessage)
   and all the other code
  }



Now I'm no0t clear I have two files in the end point path but it is not 
working. Please can anyone help me in knowing as to why this is not working.

thanks!




-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] how to tune akka remoting performance

2014-08-17 Thread Sean Zhong
I have not tried to investigate why akka remote is slow, however I wrote a 
out of band netty transport(not in framework of akka remote) as simple as 
possible which 1) do batching send and receive 2) remove sender and 
receiver address overhead 3) simplified wire format. 4) try to avoid to 
dispatch to single intermediate layer queue(mailbox). Now we are able to 
reduce the mean latency from 300ms to 30ms, the throughput about is 3x 
speedup. 

However, it cannot be implemented with akka remote transport interface, as 
it has many assumptions(like only support one way message sending, and the 
sender and recevier address is not in format of ActorRef). so it is purely 
application level optimization.

On Wednesday, August 13, 2014 4:14:27 PM UTC+8, Patrik Nordwall wrote:
>
>
>
>
> On Wed, Aug 13, 2014 at 3:18 AM, Sean Zhong  > wrote:
>
>> Thanks
>>
>> with extrem high latency 727ms,
 If I remember the test correctly, that is not the latency of one 
 message, but the total latency of all 1 messages in one burst.
>>>
>>>
>>
>> If little's law applies here, the estimated latency is about 0.3s. 
>> (Assume pattern: burst -> wait for ack back -> burst -> wait for ack 
>> back)
>> The latency is consistent with my test.
>>
>> It was tested on GCE, with two machines in same zone.
>>
>> My test shows there is no difference between the two cases, two machine, 
>> or two jvm on same machine. It should not be a network bandwidth problem.
>>
>> After some performance profile, the bottleneck seems to be caused by 
>> netty transport, and it is not caused by the backoff logic. So, it will be 
>> interesting why netty performance here is so bad.
>>
>
> Thank you for investigating. Keep us updated.
> /Patrik
>  
>
>>
>>
>> On Tuesday, August 12, 2014 11:36:03 PM UTC+8, Patrik Nordwall wrote:
>>
>>>
>>>
>>>
>>> On Tue, Aug 12, 2014 at 3:36 PM, Sean Zhong  wrote:
>>>
 Hi Patrik,

 In your report, looks like only be able to send 3.8MB/s data

>>>
>>> Note that payload size (100 bytes) is not equal to message size. 
>>> Additional overhead of the sender and receiver actor refs are also part of 
>>> the full message size, and that is probably larger than the payload size in 
>>> this case. The GCE console reported 23 MBytes/s as max during the test.
>>>  
>>>
 with extrem high latency 727ms,

>>>
>>> If I remember the test correctly, that is not the latency of one 
>>> message, but the total latency of all 1 messages in one burst.
>>>  
>>>
  did you test this with sender and receiver on same machine or on 
 different machine?

>>>
>>> It was tested on GCE, with two machines in same zone.
>>> Ping rtt min/avg/max/mdev = 0.516/0.683/0.895/0.102 ms
>>>  
>>>
 The performance is terrible. 

>>>
>>> The test was focused on testing something else than looking for maximum 
>>> throughput, so I have no comment on that.
>>>  
>>>

 (payload size) (burst size) (new: msg/s) (old: msg/s) (new latency ms) 
 (old latency ms)
 100 1 42668 38058 727 744




 On Monday, August 11, 2014 9:41:17 PM UTC+8, Patrik Nordwall wrote:

> Hi,
>
> Unfortunately, the only test I'm aware of is: 
> https://github.com/akka/akka/tree/v2.3.4/akka-samples/akka-s
> ample-remote-scala/src/main/scala/sample/remote/benchmark
>
> We have only used it for add-hoc testing. You can find some results of 
> running it here: https://groups.google.com/d/msg/akka-dev/mFvz_d737t4/
> pZSmbFRLAV8J
>
> Regards,
> Patrik 
>
>
> On Sat, Aug 9, 2014 at 4:08 PM, Sean Zhong  wrote:
>
>> For Akka 2.3.4, 2 machines, GbE network, one machine contains a 
>> sender actor, the other contains a reciver actor. Sender actor will 
>> continuously send message (100 bytes each, pre-created in memory) to 
>> receiver actor with simple flow control based on sliding window and 
>> acking(one ack per 100 messages).
>>
>> I can only get throughput about 60K messages/second , which is much 
>> slower than my expectation. The CPU usage is almost idle(3%). Network 
>> usage 
>> is about 20% of the bandwidth.  I use kryo serialization, and 
>> singleConsumerUnboundedMailBox, 4 local dispatcher, 4 remote 
>> dispatcher, default setting for netty. 
>>
>> Is there performance baseline  number for akka remoting in your smoke 
>> test? 
>>
>>
>>
>>
>>  -- 
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/additional/faq.html
>> >> Search the archives: https://groups.google.com/grou
>> p/akka-user
>> --- 
>> You received this message because you are subscribed to the Google 
>> Groups "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, 
>> send an email to akka-user+...@googlegroups.com.
>> To post to

Re: [akka-user] sbt dist with version 2.3.2

2014-08-17 Thread Konrad 'ktoso' Malawski
Hi guys,
Have you seen the http://www.scala-sbt.org/sbt-native-packager/index.html sbt 
plugin?
The sbt guys are pouring loads of effort into making apps easily packagable 
using that plugin.
So instead of having a custom akka plugin we’d rather recommend that one.

I created an issue for linking to the native packager in the docs 
https://github.com/akka/akka/issues/15677

Cheers!

-- 
Konrad 'ktoso' Malawski
hAkker @ typesafe
http://akka.io

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.