Re: [akka-user] Re: Akka WebSocket as an Api

2016-07-19 Thread Konrad Malawski
Wanted to ask about your considerations for tradeoffs for using Play vs
straight Akka-Http-Stream and Websockets?

Akka is a toolkit. Play is a framework. If it's a "web app" Play would be
better. If it's "raw api" I would recommend Akka HTTP though quite honestly
it's a personal preference thing (either way).

Streaming is more of a 1st class citizen in Akka, it's "somewhat" in Play.


Is this the best forum for such a question; or Quora, or elsewhere?

Yes this is the right forum (or gitter.im/akka/akka) for such light
discussion.


-- konrad

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka WebSocket as an Api

2016-07-18 Thread Dagny T
Hello!  

Wanted to ask about your considerations for tradeoffs for using Play vs 
straight Akka-Http-Stream and Websockets?
Is this the best forum for such a question; or Quora, or elsewhere?

Thanks!
D

On Tuesday, July 5, 2016 at 7:12:03 AM UTC-7, ani...@egnaroinc.com wrote:
>
> I have a chat application developed in Akka and Scala using Play framework 
> WebSockets.
> I want to make it as an Api based service. For connection , i have used 
> the similar block from official documentaton as:
>
>
> object HandlerClass {
>  
>def props(out: ActorRef) = {
>   
>Props(new SocketHandlerClass(out))
>
> }
>
>   }
>
>
>
> def socket = WebSocket.accept[JsValue, JsValue] { request =>
>
> ActorFlow.actorRef(out =>
> HandlerClass.props(out) )
>   }
>
>
>
> I want to know if someone uses my chat system as an Api, how can i return 
> the 'out' actor, so that he/she can have the control over different 
> connections through different actors. Actually , it does not seem possible 
> to return the 'out' actor here. I also wanted to know how the incoming 
> message can also be captured before going for the 'SocketHandlerClass'?
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka WebSocket as an Api

2016-07-18 Thread Dagny T
Hello!  Wanted to as what your considerations were on tradeoffs for going 
for the Play approach as opposed to straight Akka-Http-Stream and 
Websockets approach?  Or, perhaps suggest the best forum to get such info 
-- Quora maybe?

On Tuesday, July 5, 2016 at 7:12:03 AM UTC-7, ani...@egnaroinc.com wrote:
>
> I have a chat application developed in Akka and Scala using Play framework 
> WebSockets.
> I want to make it as an Api based service. For connection , i have used 
> the similar block from official documentaton as:
>
>
> object HandlerClass {
>  
>def props(out: ActorRef) = {
>   
>Props(new SocketHandlerClass(out))
>
> }
>
>   }
>
>
>
> def socket = WebSocket.accept[JsValue, JsValue] { request =>
>
> ActorFlow.actorRef(out =>
> HandlerClass.props(out) )
>   }
>
>
>
> I want to know if someone uses my chat system as an Api, how can i return 
> the 'out' actor, so that he/she can have the control over different 
> connections through different actors. Actually , it does not seem possible 
> to return the 'out' actor here. I also wanted to know how the incoming 
> message can also be captured before going for the 'SocketHandlerClass'?
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka WebSocket as an Api

2016-07-18 Thread Dagny T


On Tuesday, July 5, 2016 at 7:12:03 AM UTC-7, ani...@egnaroinc.com wrote:
>
> I have a chat application developed in Akka and Scala using Play framework 
> WebSockets.
> I want to make it as an Api based service. For connection , i have used 
> the similar block from official documentaton as:
>
>
> object HandlerClass {
>  
>def props(out: ActorRef) = {
>   
>Props(new SocketHandlerClass(out))
>
> }
>
>   }
>
>
>
> def socket = WebSocket.accept[JsValue, JsValue] { request =>
>
> ActorFlow.actorRef(out =>
> HandlerClass.props(out) )
>   }
>
>
>
> I want to know if someone uses my chat system as an Api, how can i return 
> the 'out' actor, so that he/she can have the control over different 
> connections through different actors. Actually , it does not seem possible 
> to return the 'out' actor here. I also wanted to know how the incoming 
> message can also be captured before going for the 'SocketHandlerClass'?
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka WebSocket as an Api

2016-07-13 Thread Johan Andrén
Any interaction with the "out" actor should probably be inside your 
HandlerClass actor, I'd call that ChatConnection or something more 
descriptive. If more actors wants to interact with it you should create 
protocol for those actions and keep the actual interaction with "out" 
inside that ChatConnection, so if you want a registry of all current 
connections for example, that would be another actor that each 
ChatConnection interacts with through messages.

As you are a Lightbend customer, let's continue this through the support 
channel.

--
Johan

On Tuesday, July 5, 2016 at 4:12:03 PM UTC+2, ani...@egnaroinc.com wrote:
>
> I have a chat application developed in Akka and Scala using Play framework 
> WebSockets.
> I want to make it as an Api based service. For connection , i have used 
> the similar block from official documentaton as:
>
>
> object HandlerClass {
>  
>def props(out: ActorRef) = {
>   
>Props(new SocketHandlerClass(out))
>
> }
>
>   }
>
>
>
> def socket = WebSocket.accept[JsValue, JsValue] { request =>
>
> ActorFlow.actorRef(out =>
> HandlerClass.props(out) )
>   }
>
>
>
> I want to know if someone uses my chat system as an Api, how can i return 
> the 'out' actor, so that he/she can have the control over different 
> connections through different actors. Actually , it does not seem possible 
> to return the 'out' actor here. I also wanted to know how the incoming 
> message can also be captured before going for the 'SocketHandlerClass'?
>

-- 
>>  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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.