Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Viktor Klang (√)
    @viktorklang
    Wow, nice work everyone! Feels great that the Contributors' Call works well :)
    Sergey Morgunov
    @ihostage
    cloudstateio/cloudstate#227
    Can we resolve this problem by using JSR330?
    In this PR many times used reflections and it can be a problem for integration Cloudstate Java Support and GraalVM Native Images in the future :disappointed: With JSR330 we can try to use a compile-time DI and to avoid this problem.
    Sergey Morgunov
    @ihostage
    Spring (with limitation of course) also supports JSR 330.
    Adriano Santos
    @sleipnir
    @ralphlaude I had already managed to solve it, thanks
    Adriano Santos
    @sleipnir
    Hi @ihostage, thanks for commenting.
    I haven't tested it with the jsr330 annotations but I believe you can inject any bean available in the Spring injection container into a cloudstate entity with @Inject for example.
    With regard to Graalvm, I must do some work on this later in the week. The intention now was to prove the concept, now we can make improvements and adjustments. Glad to receive contributions
    Sergey Morgunov
    @ihostage
    @sleipnir :wink: I just think, that if we want to support DI, we should use a standard instead of custom factories. And the customer can choose any DI library (Guice/Dagger 2.0/etc) that it loving. :smiley:
    And I think that language support libraries should be very small, simple and compatible with GraalVM Native Image. Because it does not look like serverless function when it starts some seconds (loading classes, runtime DI, JIT, ...) and uses 500Mb+ of memory :joy:
    But maybe the community and maintainers have another vision. It will be very cool if @viktorklang writes his thoughts about that
    Adriano Santos
    @sleipnir
    I agree. However, they are two different things, one thing is to offer time support for a specific runtime / framework like Springboot and another is to offer more general support for DI. Both are desirable and we will get there, in the discussion of the issue we have already made these comments and probably in the future there will be an extension module for any desired injection container. If you look at the implementation you will see that it makes use of Spring's injection mechanisms that can be used with jsr330 or not. Reflection is used only as a support mechanism for the discovery of certain characteristics of Cloudstate entities and is also used by Cloudstate itself, however it can be performed via GraalVM. Graalvm support is desired but not always possible to achieve in a simple way depending on the client's own code libraries outside the support libraries. Of course, our intention is to facilitate this support. As I said we will arrive I have no doubt that we will get there. If you look at the PR code you will see that nothing prevents you from implementing it with other frameworks like Quarkus or Guice. The Spring implementation uses the Spring tools since the Cloudstate java-support entity discovery mechanism does not take this environment into account. But the intention of the PR was to provide a mechanism that allows anyone to create the best tool for their use case.
    I strongly believe in continuous evolution and to implement the use cases that appear and make sense to the community, GraalVM support is undoubtedly one of those desirable use cases and we will get there. That said, I am sure it is possible to run the example with GraalVM support and soon we will have that in future commits.
    @ihostage AKKA itself suffers from these problems and therefore created the akka-extensios module to facilitate the bind of ActorSystem with DI environments. The same happens here, I created a mechanism that allows anyone to be able to run Cloudstate in the environment that suits them with the tools and standards that suit them. For example you could use jsr330 and create a "Produces" class that adds the Cloudstate server and register your beans with the jsr330 discovery engine using the extension classes that were created in that PR. It would not be difficult to create such an example and I can take the trouble to do so in the future if desired.
    Adriano Santos
    @sleipnir
    @ihostage Your concerns are very good and I am grateful for that. :)
    Sergey Morgunov
    @ihostage
    @sleipnir Thanks for detailed comment :+1:
    Sergey Morgunov
    @ihostage
    Every day I hope that soon there will be time for a detailed analysis of kotlin-support and playing with it. But my main job does not give me a chance yet. :cry: But I keep believing :joy:
    Adriano Santos
    @sleipnir
    @ihostage You would be welcome to contribute, you still have many things to do in kotlin-support and help would be very desirable
    Viktor Klang (√)
    @viktorklang

    Great write-up, @sleipnir! Thanks for putting this together, having a story for both spring-boot AND general JVM DI are both important.

    @ihostage I hope you get some extra time soon, I bet @sleipnir would love feedback and assistance :)

    Adriano Santos
    @sleipnir
    :)
    Thanks @viktorklang I would love a little help \0/
    Guy Youansi
    @ralphlaude
    @sleipnir great job :)!
    Adriano Santos
    @sleipnir
    I have accompanied your PR also good work @ralphlaude
    Marcel Lanz
    @marcellanz
    awesome @sleipnir! unfortunately I did not yet have time to have a look.
    Adriano Santos
    @sleipnir
    No problem @marcellanz, I know how it goes
    Viktor Klang (√)
    @viktorklang
    @sleipnir I had 11 meetings today, will probably have a better chance of having a look tomorrow. :)
    Adriano Santos
    @sleipnir
    @viktorklang ok :)
    Marcel Lanz
    @marcellanz
    @viktorklang If you like and have some time :) I have a question on protocol specifics pending here:
    https://github.com/cloudstateio/cloudstate/pull/119#discussion_r403012794
    Viktor Klang (√)
    @viktorklang
    @marcellanz I'll have a look at the first available moment (@sleipnir's PR comes first tho) :)
    Marcel Lanz
    @marcellanz
    thanks @viktorklang, already saw your response. It was about command ordering, or its out-of-order. I'm reading now even more Scala code… now also the one of the proxy. I'm getting used to it (^_^;)
    Viktor Klang (√)
    @viktorklang
    @marcellanz Cool, welcome to the Scala side :D
    Adriano Santos
    @sleipnir
    cloudstate-spring-bootstrap.png
    Hello guys, after some improvements I managed to gain some time and memory reduced in the implementation of Cloudstate Springboot support. Not bad for a Java + Spring application
    ;)
    cloudstate-spring-memory.png
    For comparison, the first versions took almost 4 seconds and consumed > 600mb
    Adriano Santos
    @sleipnir
    Now it's less than 2 seconds and less than 70mb. On my hardware of course
    Marcel Lanz
    @marcellanz
    really nice @sleipnir :)
    Adriano Santos
    @sleipnir
    this without having to spend hours or days trying to compile natively :)
    very cool @marcellanz ... thanks
    Adriano Santos
    @sleipnir
    Another comparison is with the proxy that is compiled natively. See how even the proxy compiled via GraalVM does not match the function's memory usage. Obviously it is because the proxy does much more than the function :) but it is a good comparison:
    cloudstate-native-proxy.png
    Guy Youansi
    @ralphlaude
    nice @sleipnir
    Viktor Klang (√)
    @viktorklang
    Very cool!
    kerr
    @hepin1989
    just share cloudstate to our internal serverless team
    go for serverless 2.0
    Viktor Klang (√)
    @viktorklang
    @hepin1989 I'm not sure I understand :)
    kerr
    @hepin1989
    @viktorklang we have an serverless platform named gaia,and currently only support sateless style.
    So I shared cloudstate.io to the tech lead:)
    I mean in house one.
    It built with k8s and grpc too
    Viktor Klang (√)
    @viktorklang
    @hepin1989 Ah, nice! Would love to hear what they think about cloudstate :)
    kerr
    @hepin1989
    Does cloud state's spec cover how to logging?
    Marcel Lanz
    @marcellanz
    @hepin1989 there is an Issue to discuss that topic you can find here cloudstateio/cloudstate#130
    kerr
    @hepin1989
    @marcellanz I mean the unified logging which can be imported to elastic search or graylog then, full trace biz log
    Marcel Lanz
    @marcellanz
    @hepin1989 the spec so far describes the protocol between the Cloudstate proxy and user functions implemented by user support libraries.