[akka-user] Akka design to create repositories.

2016-09-19 Thread Love Hasija
Hi,

I am trying to create a domain driven repository using Akka. However, i am 
confused with regard to what the ideal design should look like.

I have domain objects like Entity and a repository needs to be created with 
various interfaces like findByXYZ() and add().

The requirement for individual repository operations like findByXYZ and add 
are that these operations are multi-step and includes state in them. As an 
example, a pseudo code for findByXYZ would be:

- findByX
- findByY
- findByZ
- Aggregate
- Get the resulting data.

The way i approached this, is by creating a single worker actor that 
triggers a workflow by invoking futures for each of steps defined above and 
invoking respective messages to itself. As all the results are obtained, 
the results are accumulated and returned back.

However, what I am wondering is that:
1) Are future compositions not enough for this, do we really need an 
actor. The advantage I see is alternative corrective path if required.
2) The single actor is performing multiple types of workflows, for eg: 
1 for adding new record, 1 for finding. However, this is creating a big 
actor. Can multiple actors be created for each type of command messages.

Any help would be greatly appreciated.

-- 
>>  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 Http Client - Encoding issue

2016-09-19 Thread André
Hi Srinaath,

does it work with 

  "https://example.com/customers/~/profiles/dj2bQryHPCj4IVrc48xTPD 
hswk%2FqNWx LuUA0G2T6GLnyBVD6wC231IjgDBYJnt/preferences"

?

Akka should replace the spaces with a "+" while a "+" as input will get 
encoded as "%2B".

HTH
André

Srinaath

On Friday, September 16, 2016 at 5:56:16 PM UTC+2, Srinaath Thyagarajan 
wrote:
>
> I am trying to invoke a Rest API using akka http client using below code.
>
> val httpRequest = HttpRequest(
>   method  = HttpMethods.GET,
>
>
>   uri ="https://example.com/customers/~/profiles/ 
> *dj2bQryHPCj4IVrc48xTPD%2Bhswk%2FqNWx%2BLuUA0G2T6GLnyBVD6wC231IjgDBYJnt*/preferences",
>
>   headers = 
> List(Accept(MediaRange(MediaTypes.`application/json`.withParams(Map("v" → 
> "3",
> RawHeader("Content-Type", "application/json;v=3"),
> RawHeader("Api-Key", "XYZ")
>   )
> )
>
> Http().singleRequest(httpRequest, GatewayHelper.connectionContext)
>
>
> Before the call goes out, when i check the httprequest.uri (through 
> debugger), there is a partial uri decoding that is happening (%2B changed 
> to +)  "https://example.com/customers/~/profiles/
> *dj2bQryHPCj4IVrc48xTPD+hswk%2FqNWx+LuUA0G2T6GLnyBVD6wC231IjgDBYJnt/preferences"*
>
> Because of this the API is returning an error. Unfortunately, there are 
> bunch or APIs that has this type of path variable . So not able to invoke 
> using akka-http . 
>
>
> I also tried setting the parsing mode to Relaxed hoping that it would not 
> tamper the path variable, but it didnt help either.
>
>
>  Uri.apply("https://example.com/customers/~/profiles/
> *dj2bQryHPCj4IVrc48xTPD%2Bhswk%2FqNWx%2BLuUA0G2T6GLnyBVD6wC231IjgDBYJnt*
> /preferences", Uri.ParsingMode.Relaxed)
>
>
> So, Is there option where we can make akka no modify this before making 
> the httprequest? 
>

-- 
>>  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.


Re: [akka-user] Cluster Sharding with remember-entity restarting a stopped actor

2016-09-19 Thread Patrik Nordwall
You need to use the `Passivate` message.
http://doc.akka.io/docs/akka/2.4/java/cluster-sharding.html#Remembering_Entities

Also, make sure that you don't call context.stop from any other thread than
the actor's message receive.

/Patrik

On Sun, Sep 18, 2016 at 11:52 PM, Ajmal Babu  wrote:

> We are using AKKA 2.4.10 persistent actor, cluster sharding with Cassandra
> storage and have enabled remember-entity = true. We need to stop certain
> persistent actor after a specific time-frame. (few days). The issue is that
> the actor once stopped gets automatically restarted after 10 seconds. But
> if remember-entity is set to false it does not restart. The actor stop is
> tried out (a) from another persistent actor or (b) from the same persistent
> actor with a scheduled future event to stop itself. Both cases automatic
> restart happens.
>
> We are using Spring with AKKA. Interestingly if the persistence actor stop
> is performed from direct spring code for e.g. on a rest end point (not from
> an actor code) persistent actor does not get automatically restarted
> irrespective of the above flag remember-entity = true or false. Can you
> please provide solution for this,
>
> --
> >> 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.
>



-- 

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


[akka-user] AKKA persistence actor eager loading of journal & snapshot.

2016-09-19 Thread Ajmal Babu
Following options is specified in the AKKA configuration file to eager load 
journals and snapshots for AKKA Cassandra persistence. We have an AKKA and 
persistence actor is started in one of the cluster nodes. but when the node 
dies the persistence actor does not automatically gets recreated on the 
other available nodes in the cluster. Actor gets created only when it is 
invoked the next time not during the node re-balance. Based on the below 
options it seems like eager loading of persistence actor is possible. But 
setting this options does not eagerly load the persistence actor on other 
nodes in the cluster during a node a failure. Can you please point to right 
options in the documentation.


   1. 
   
   persistence {
 journal {
   plugin = "cassandra-journal"
   cassandra-journal.contact-points = ["127.0.0.1"]
   auto-start-journals = ["cassandra-journal"]
 }
   
 snapshot-store {
   plugin = "cassandra-snapshot-store"
   cassandra-snapshot-store.contact-points = ["127.0.0.1"]
   auto-start-snapshot-stores = ["cassandra-snapshot-store"]
 }
   }
   
   2. 
   

-- 
>>  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] Deploying akka cluster on Clever Cloud/Heroku

2016-09-19 Thread equiposubmit
Hello everyone,
Currently, the project I am working on can be divided into a web frontend 
that uses Play! framework and several backend nodes that are developed in 
Akka. The goal was to set them up on different apps/dynos, so I would be 
able to scale the frontend horizontally and vertically, as well as manage 
the backend nodes. These backend nodes have no http interface and merely do 
the jobs that are sent to them by the frontend and return them. I set up an 
akka cluster to communicate between the nodes, and also to set up ssl 
between them. Locally, everything worked perfectly, but when I tried to 
deploy on Clever Cloud, I found out that the only way they can communicate 
is throught HTTP on port 80, and my cluster is communicating through TCP on 
port 2551. I tried setting up port 80 on the remoting configuration to 
listen on it, but it doesn't seem to work as my app appears to be non 
responsive. I started reading up on what could be done, and the only 
solution I found was to use RabbitMQ, and, as I understand it, that would 
mean that I would have to give up on using akka cluster and rewire the 
communications and security protocols, now to be used by this message 
broker. I would like to know if anyone has encountered a similar situation 
and has found a configuration that works so I can keep using akka cluster, 
or if I am missing something.
Thanks in advance.
Juan CABALLERO

-- 
>>  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.


Re: [akka-user] Re: Documentation questions: akka-http

2016-09-19 Thread Mike Nielsen
Thank you!  I have opened a case with IntelliJ.

On Thu, Sep 15, 2016 at 3:14 PM, Johan Andrén 
wrote:

> Hi,
>
> The format: ON/OFF are directives to our code auto-formatter to not touch
> the code inside of that, for example when we have carefully laid it out to
> be a nice and readable sample.
>
> All the samples are compiled as a part of our ci setup, and again when we
> make a release so if it didn't compile we wouldn't have been able to
> compile it.
> Note that for example the latest IntelliJ seems to have problems resolving
> the implicit conversion needed for it to work, so even though it compiles
> IntelliJ may show a squiggly red line and warning about type mismatch.
>
> --
> Johan
> Akka Team
>
> On Thursday, September 15, 2016 at 8:56:42 PM UTC+2, mniel...@gmail.com
> wrote:
>>
>> In the "spray" documentation (http://doc.akka.io/docs/akka/
>> 2.4/scala/http/common/json-support.html#akka-http-spray-json) a couple
>> of the examples show the following:
>>
>> // format:  OFF
>>
>> followed by
>>
>> //format:  ON
>>
>> What are those comments intended to convey?
>>
>> I keep worrying that I'm missing something significant.
>>
>> Also, on http://doc.akka.io/docs/akka/2.4/scala/http/introduction.html an
>> example shows the following code, which doesn't compile:
>>
>>  case None   => complete(StatusCodes.NotFound)
>>
>> The following change allows it to compile:
>>
>>  case None   => complete((StatusCodes.NotFound,"Too bad"))
>>
>>
>>
>>
>> --
> >> 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.
>

-- 
>>  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.


Re: [akka-user] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Derek Wyatt
Crap, sorry Konrad.  Will do.

On Monday, September 19, 2016 at 2:53:59 PM UTC-4, Konrad Malawski wrote:
>
> Hi Derek, 
> could you re-post this on github.com/akka/akka-http?
> I want to have a look but having a very chaotic week - it'd help me/us to 
> have it as ticket - easier to find and come back to it than on akka-user.
>
> I think we should be able to help in some way or another if servers are 
> doing "weird stuff",
> I have not yet reviewed your proposal though, so let's see.
>
> Thanks for attempting to solve it in Akka itself, should be of good 
> benefit to everyone :)
>
> -- 
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 19 September 2016 at 11:46:58, Derek Wyatt (de...@derekwyatt.org 
> ) wrote:
>
> Hi folks,
>
> I've been wrestling with a bug in IIS (see 
> https://groups.google.com/d/msg/akka-user/7iW5-HlshZk/S75Wgxg_AwAJ).  It 
> seems that I'm going to have to deal with the problem myself, because 
> either IIS can't be fixed or the guys I'm dealing with aren't willing to 
> try.  And, at any rate, since I've used Akka HTTP to build a Reverse HTTP 
> Proxy, I'm sure I'm going to have to deal with oddities as part of every 
> day life so an enhancement as the one I'm proposing is vital to my success.
>
> As such, I've thrown together a simple (and highly inelegant at the 
> moment) mechanism for being able to rewrite the Content-Type header after 
> rendering, as this is the header that is currently causing me problems.
>
> I'd very much appreciate someone taking a look at it and critique the 
> approach.  I tried a number of ways of shoehorning this feature into the 
> code, implicits on the render method, a template-method pattern for wiring 
> in a user-defined transformer and they were all pretty cumbersome.  This 
> was the "simplest" method I could find for the moment.
>
> I don't have any default values for the arguments because I wanted to make 
> sure I was able to write it up properly all the way through.
>
> Does anyone think this idea (once cleaned and made "proper") could be 
> accepted as a PR?  I'm still working on it a fair bit because I've got to 
> get something into production that will allow me to work around the IIS 
> problem, but I expect the essence is there.
>
>
> https://github.com/derekwyatt/akka/commit/1b279bc426be352a1d204e45e855451acaac58e3
>
> Thanks,
> Derek
>
> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  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] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Derek Wyatt
Hi folks,

I've been wrestling with a bug in IIS (see 
https://groups.google.com/d/msg/akka-user/7iW5-HlshZk/S75Wgxg_AwAJ).  It 
seems that I'm going to have to deal with the problem myself, because 
either IIS can't be fixed or the guys I'm dealing with aren't willing to 
try.  And, at any rate, since I've used Akka HTTP to build a Reverse HTTP 
Proxy, I'm sure I'm going to have to deal with oddities as part of every 
day life so an enhancement as the one I'm proposing is vital to my success.

As such, I've thrown together a simple (and highly inelegant at the moment) 
mechanism for being able to rewrite the Content-Type header after 
rendering, as this is the header that is currently causing me problems.

I'd very much appreciate someone taking a look at it and critique the 
approach.  I tried a number of ways of shoehorning this feature into the 
code, implicits on the render method, a template-method pattern for wiring 
in a user-defined transformer and they were all pretty cumbersome.  This 
was the "simplest" method I could find for the moment.

I don't have any default values for the arguments because I wanted to make 
sure I was able to write it up properly all the way through.

Does anyone think this idea (once cleaned and made "proper") could be 
accepted as a PR?  I'm still working on it a fair bit because I've got to 
get something into production that will allow me to work around the IIS 
problem, but I expect the essence is there.

https://github.com/derekwyatt/akka/commit/1b279bc426be352a1d204e45e855451acaac58e3

Thanks,
Derek

-- 
>>  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] On cluster node failure is there an automatic way to recover cluster shard persistent actors in the failed node to other node?

2016-09-19 Thread Ajmal Babu
Working on AKKA persistence with cluster sharding and the flag 
akka.cluster.sharding.remember-entities set to "on". For some reason when 
one of the node dies in the cluster the entities in that node does not get 
automatically restarted in the other available nodes in the cluster. Is 
that the expected behavior? Is there an automatic recover-ability on node 
failure to move actors to another node, for such feature what is the right 
way to implement?

-- 
>>  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.


Re: [akka-user] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Konrad Malawski
Hi Derek,
could you re-post this on github.com/akka/akka-http?
I want to have a look but having a very chaotic week - it'd help me/us to
have it as ticket - easier to find and come back to it than on akka-user.

I think we should be able to help in some way or another if servers are
doing "weird stuff",
I have not yet reviewed your proposal though, so let's see.

Thanks for attempting to solve it in Akka itself, should be of good benefit
to everyone :)

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 19 September 2016 at 11:46:58, Derek Wyatt (de...@derekwyatt.org) wrote:

Hi folks,

I've been wrestling with a bug in IIS (see
https://groups.google.com/d/msg/akka-user/7iW5-HlshZk/S75Wgxg_AwAJ).  It
seems that I'm going to have to deal with the problem myself, because
either IIS can't be fixed or the guys I'm dealing with aren't willing to
try.  And, at any rate, since I've used Akka HTTP to build a Reverse HTTP
Proxy, I'm sure I'm going to have to deal with oddities as part of every
day life so an enhancement as the one I'm proposing is vital to my success.

As such, I've thrown together a simple (and highly inelegant at the moment)
mechanism for being able to rewrite the Content-Type header after
rendering, as this is the header that is currently causing me problems.

I'd very much appreciate someone taking a look at it and critique the
approach.  I tried a number of ways of shoehorning this feature into the
code, implicits on the render method, a template-method pattern for wiring
in a user-defined transformer and they were all pretty cumbersome.  This
was the "simplest" method I could find for the moment.

I don't have any default values for the arguments because I wanted to make
sure I was able to write it up properly all the way through.

Does anyone think this idea (once cleaned and made "proper") could be
accepted as a PR?  I'm still working on it a fair bit because I've got to
get something into production that will allow me to work around the IIS
problem, but I expect the essence is there.

https://github.com/derekwyatt/akka/commit/1b279bc426be352a1d204e45e855451acaac58e3

Thanks,
Derek

--
>> 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.

-- 
>>  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.


Re: [akka-user] [akka-streams] It is not possible to create Graph with the custom shapes

2016-09-19 Thread Roland Kuhn
Hi Sergey,

Just add your custom stage using builder.add() and then write the ports of the 
resulting Shape using the normal GraphDSL methods. There is no need to make the 
wiring aware of your special shape.

Regards, Roland 

Sent from my iPhone

> On 19 Sep 2016, at 22:35, Sergey Sopin  wrote:
> 
> Hi,
> 
> Due to performance reasons I decided to create my new custom Shape with 
> several inlets and several outlets (5 in and 3 out in my case). Then I 
> decided to create Graph with the new element and realized that it is not 
> possible without rewriting Graph object. In order to create my own shape I 
> had to create new class which extends Shape one. Then I created custom logic 
> by creating new class which extends GraphStage>. And 
> everything was good. 
> Then while creating graph I realized that my class contains more than one 
> input and one output, so neither UniformFanOutShape nor UniformFanInShape can 
> be used in graph. Due to that fact I created my own BiDirFanShape which 
> contains more than one inlet and one outlet. It allowed me to add my new 
> shape in a graph. But, then I realized that I am not able to connect my shape 
> with others because there are no functions "via" or "to" in a Builder which 
> take such arguments. So now, I have to rewrite object GraphDSL in order to 
> add there such functions. 
> It seems a bit painful. Probably I missed something, but I think that in case 
> you allow to create custom shapes you should have some generic mechanism that 
> allows to work with the newly created elements. I cannot even override 
> ForwardOps and ReverseOps classes because it are final... Could you please 
> let me know if I missed something and there is a better solution?
> 
> Thank you in advance!
> 
> Best regards,
> Sergey
> -- 
> >> 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.

-- 
>>  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.


Re: [akka-user] [Akka-HTTP] Request for comment - Post render regex modifier

2016-09-19 Thread Konrad Malawski
Nothing to be sorry about, thanks a lot for posting as issue!

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 19 September 2016 at 11:55:11, Derek Wyatt (de...@derekwyatt.org) wrote:

Crap, sorry Konrad.  Will do.

On Monday, September 19, 2016 at 2:53:59 PM UTC-4, Konrad Malawski wrote:
>
> Hi Derek,
> could you re-post this on github.com/akka/akka-http?
> I want to have a look but having a very chaotic week - it'd help me/us to
> have it as ticket - easier to find and come back to it than on akka-user.
>
> I think we should be able to help in some way or another if servers are
> doing "weird stuff",
> I have not yet reviewed your proposal though, so let's see.
>
> Thanks for attempting to solve it in Akka itself, should be of good
> benefit to everyone :)
>
> --
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 19 September 2016 at 11:46:58, Derek Wyatt (de...@derekwyatt.org
> ) wrote:
>
> Hi folks,
>
> I've been wrestling with a bug in IIS (see https://groups.google.com/d/
> msg/akka-user/7iW5-HlshZk/S75Wgxg_AwAJ).  It seems that I'm going to have
> to deal with the problem myself, because either IIS can't be fixed or the
> guys I'm dealing with aren't willing to try.  And, at any rate, since I've
> used Akka HTTP to build a Reverse HTTP Proxy, I'm sure I'm going to have to
> deal with oddities as part of every day life so an enhancement as the one
> I'm proposing is vital to my success.
>
> As such, I've thrown together a simple (and highly inelegant at the
> moment) mechanism for being able to rewrite the Content-Type header after
> rendering, as this is the header that is currently causing me problems.
>
> I'd very much appreciate someone taking a look at it and critique the
> approach.  I tried a number of ways of shoehorning this feature into the
> code, implicits on the render method, a template-method pattern for wiring
> in a user-defined transformer and they were all pretty cumbersome.  This
> was the "simplest" method I could find for the moment.
>
> I don't have any default values for the arguments because I wanted to make
> sure I was able to write it up properly all the way through.
>
> Does anyone think this idea (once cleaned and made "proper") could be
> accepted as a PR?  I'm still working on it a fair bit because I've got to
> get something into production that will allow me to work around the IIS
> problem, but I expect the essence is there.
>
> https://github.com/derekwyatt/akka/commit/1b279bc426be352a1d204e45e85545
> 1acaac58e3
>
> Thanks,
> Derek
>
> --
> >> 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 https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
> --
>> 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.

-- 
>>  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] [akka-streams] It is not possible to create Graph with the custom shapes

2016-09-19 Thread Sergey Sopin
Hi,

Due to performance reasons I decided to create my new custom Shape with 
several inlets and several outlets (5 in and 3 out in my case). Then I 
decided to create Graph with the new element and realized that it is not 
possible without rewriting Graph object. In order to create my own shape I 
had to create new class which extends Shape one. Then I created custom 
logic by creating new class which extends GraphStage>. And 
everything was good. 
Then while creating graph I realized that my class contains more than one 
input and one output, so neither UniformFanOutShape nor UniformFanInShape 
can be used in graph. Due to that fact I created my own BiDirFanShape which 
contains more than one inlet and one outlet. It allowed me to add my new 
shape in a graph. But, then I realized that I am not able to connect my 
shape with others because there are no functions "via" or "to" in a Builder 
which take such arguments. So now, I have to rewrite object GraphDSL in 
order to add there such functions. 
It seems a bit painful. Probably I missed something, but I think that in 
case you allow to create custom shapes you should have some generic 
mechanism that allows to work with the newly created elements. I 
cannot even override ForwardOps and ReverseOps classes because it are 
final... Could you please let me know if I missed something and there is a 
better solution?

Thank you in advance!

Best regards,
Sergey

-- 
>>  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.