Re: [akka-user] Re: websockets with akka-http *java*

2016-02-09 Thread ash.ta
hey johan, thanks for explanation. my main problem is that i don't know scala and the example is pretty much gibberish for me. can you give me a hint about the flow point where sink and source can be called with actorref creation? i mean, your java example shows handleWebsocketMessages() whi

[akka-user] Re: websockets with akka-http *java*

2016-02-08 Thread ash.ta
thanks for a prompt response. client is great, but i need server side implementation. and as i see, new server side docs still show the same basic request-response example. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/

[akka-user] websockets with akka-http *java*

2016-02-08 Thread ash.ta
hi hackers, i am looking for a *java* api based solution for websocket push functionality. clients will create websocket connections and server will push them messages periodically. as far as i understand it, i was planning to create an actor for each socket created, so that messages sent to

Re: [akka-user] Adaptive Load Balancing with DistributedPubSub Extension

2016-01-21 Thread ash.ta
hi endre, thanks for response. i have a number of microservices talking to each other using distributed pubsub mediators. these services are not coupled, they are not aware of the types of actors existing in each other and simply exchange messages between the addresses. now, each microservice

[akka-user] Adaptive Load Balancing with DistributedPubSub Extension

2016-01-19 Thread ash.ta
hi, from what i see in DistributedPubSubSettings, DistributedPubSub extension provides three options for routing logic: RandomRoutingLogic, RoundRobinRoutingLogic and BroadcastRoutingLogic. regardless of the above, the metrics documentation describes the solution for Adaptive Load Balancing, ba

Re: [akka-user] future usage within an actor

2016-01-13 Thread ash.ta
yup, thanks for help. already solved it using a child actor. -- >> 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 --

Re: [akka-user] future usage within an actor

2016-01-12 Thread ash.ta
hi again, thanks for your prompt response. in such case, what in your opinion is the right way to implement something like async calls to db? to use the async driver from an actor with a dedicated separate dispatcher and block the async call itself? cheers -- >> Read the docs: h

[akka-user] future usage within an actor

2016-01-12 Thread ash.ta
hi hakkers, i have two actors: the first one patterns.ask() a message to the second one which returns a response: a snippet osender: ... public PartialFunction receive() { return ReceiveBuilder .match( Boolean.class, msg -> { ActorRef receiver =

[akka-user] conceptual question re akka-http usage

2016-01-07 Thread ash.ta
hi hakkers, i'm working *JAVA* akka-http based app. i was planning to create a generic handler that handles all common stuff and only exposes a method for custom logic implementation. my problem is that handlers that will derive from it in the future will use different types of inputs. some wil

[akka-user] Re: akka-http: json entity response with headers

2016-01-07 Thread ash.ta
ok, i found a solution response.withEntity( MediaTypes.APPLICATION_JSON.toContentType(), data) does the job -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the arc

[akka-user] akka-http: json entity response with headers

2016-01-06 Thread ash.ta
hi hakkers, i asked this as a part of a discussion in other thread but got no answer, so i'm trying my luck here. i use akka-http with java api. i need to return a json entity in httpresponse with response headers. i was advised to do something like this: return ctx.complete( HttpResponse.c

[akka-user] Re: akka-http: access to httpresponse

2016-01-06 Thread ash.ta
actually the solution above doesn't work, i just saw that contet-type arrives as text/plain. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: https://gro

[akka-user] Re: akka-http: access to httpresponse

2016-01-06 Thread ash.ta
hey konrad, thanks a lot for help. i have another question related to this issue. now when i have an access to httpresponse object i add a custom response header to it, i try to return a json string. i tried something like response.withEntity( json_string ).addHeader( new RawHeader( "Content-Typ

[akka-user] akka-http: access to httpresponse

2016-01-05 Thread ash.ta
hi, i go through the akka-http java documentation here http://doc.akka.io/docs/akka-stream-and-http-experimental/2.0.1/java/http/routing-dsl/handlers.html#Handlers_in_Java_8 and there is something i need your help with. let's say i have the following simplest handler: Handler handler = new Hand

Re: [akka-user] fatjar with gradle and shadowjar

2015-12-31 Thread ash.ta
hey, thanks for the tips. i guess i understand what's wrong now: while shadowJar plugin is mentioned as the one that should do the job of merging reference.conf files, it doesn't happen with the build script i run. i get a jar full of different reference.confs. therefore i think the problem is

[akka-user] fatjar with gradle and shadowjar

2015-12-30 Thread ash.ta
hi, i'm struggling with a gradle build in attempt to build a fatjar. following some examples i've found, i created the following gradle.build: import com.github.jengelman.gradle.plugins.shadow.transformers.AppendingTransformer apply plugin: "java" apply plugin: "scala" apply plugin: "com.github

Re: [akka-user] bi-directional pubsub

2015-12-28 Thread ash.ta
patrik, thanks again. the last question for now, i really appreciate your help. the docs say: If subscribing with a group name, each message published to a topic with > the (sendOneMessageToEachGroup) flag is delivered via the supplied > RoutingLogic (default random) to one actor within each su

[akka-user] bi-directional pubsub

2015-12-28 Thread ash.ta
hi, i'm looking for a solution for the following task: i have 2 types of actors. their instances can be deployed in a local non-distributed environment or in a cluster, where they can be also available in the same node or on different nodes. these actors have to exchange messages in a stateles

Re: [akka-user] Microservice architecture with akka

2015-12-23 Thread ash.ta
cunicaommtion = communication. On Wednesday, December 23, 2015 at 9:46:04 PM UTC+2, ash.ta wrote: > > filippo, can you elaborate a bit more for a newbie like myself about the > pattern you are using for inter-services cunicaommtion? > let me explain you what i am talking about.

Re: [akka-user] Microservice architecture with akka

2015-12-23 Thread ash.ta
filippo, can you elaborate a bit more for a newbie like myself about the pattern you are using for inter-services cunicaommtion? let me explain you what i am talking about. i clearly understand the model of microservices built around a message bus. there you have a system of services incorporat

Re: [akka-user] loading actors routing from configuration file

2015-12-08 Thread ash.ta
thanks martynas! i thought akka.actor.deployment is a constant property name. all works now. cheers. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs/akka/current/additional/faq.html >> Search the archives: ht

[akka-user] loading actors routing from configuration file

2015-12-08 Thread ash.ta
hi, continuing to bother you with newbie questions :) i'm trying to define actors routing via conf file. my application.conf: akka { akka.actor.deployment { /ReceiveActor { router = "round-robin-pool" nr-of-instances = 5 } } } the code initializing the actorref: system.act

[akka-user] total newbie question

2015-12-06 Thread ash.ta
hi all, i just started to play around with akka, coming with a background in node.js and other reactive/async stuff. so, i'm sorry in advance if this newbie questions sounds totally stupid. i'm trying to make things happen in java due to the lack of knowledge of scala (should i waste my time o