Giter Club home page Giter Club logo

Comments (10)

viktorklang avatar viktorklang commented on July 29, 2024 1

@akramtexas That's for the eventsourcing parts. Those events are not necessarily intended for anything but internal consumption. Think about "Evented Services" as being able to consume and produce events coming in and going out externally. :)

from cloudstate.

viktorklang avatar viktorklang commented on July 29, 2024 1

@akramtexas No problem :) Just want to spare you some time & effort :)

from cloudstate.

viktorklang avatar viktorklang commented on July 29, 2024

One possibility is using CloudEvents for this.

from cloudstate.

akramtexas avatar akramtexas commented on July 29, 2024

@viktorklang - I would like to dig into this and figure out a solution for us. Does that work? Provided, of course, that this issue is still on our community radar 😄

from cloudstate.

viktorklang avatar viktorklang commented on July 29, 2024

@akramtexas Please do! We can raise this topic in the inaugural contributors' confcall next week

from cloudstate.

akramtexas avatar akramtexas commented on July 29, 2024

@viktorklang Awesome, thanks! I can't wait to throw myself at this 🆒 stuff.

  • While doing a decidedly preliminary skimming-through of our source (and speaking of the possibility is using CloudEvents), I see some "hooks" already in place, for example this one in /cloudstate/java-support/src/test/scala/io/cloudstate/javasupport/impl/eventsourced/AnnotationBasedEventSourcedSupportSpec.scala:
  "allow emiting events" in {
    val handler = create(new {
      @CommandHandler
      def addItem(msg: String, ctx: CommandContext) = {
        ctx.emit(msg + " event")
        ctx.commandName() should ===("Add Item")
        Wrapped(msg)
      }
    }, method)
    val ctx = new MockCommandContext
    decodeWrapped(handler.handleCommand(command("blah"), ctx).get) should ===(Wrapped("blah"))
    ctx.emited should ===(Seq("blah event"))
  }

...and this one /cloudstate/java-support/src/test/scala/io/cloudstate/javasupport/impl/eventsourced/AnnotationBasedEventSourcedSupportSpec.scala:

        if (jsonClass.getAnnotation(classOf[Jsonable]) == null) {
          throw SerializationException(
            s"Illegal CloudEvents json class, no @Jsonable annotation is present: $jsonType"
          )
        }
  • It's time to dig in ⛏

from cloudstate.

akramtexas avatar akramtexas commented on July 29, 2024

@viktorklang Gotcha, that makes sense. Plus I thank you for keeping me honest :)

from cloudstate.

akramtexas avatar akramtexas commented on July 29, 2024

Here's a summary of some recent work in this area:

  • Adding an additional inflow of Commands.
  • Passing those into the same processing as commands coming in via gRPC or HTTP+JSON.
  • For the first PoC:
  1.  Sending constructed HttpRequests in
    
  2.  Then getting the HttpResponse
    
  3.  And then sending it into the out-topic
    
  • The CloudState proxy will have to be able to read the event source declarations in the proto of the user function, to wire things up.
  • Invocation via events should look, to the user code, like responding to any request. The response can then be directed, by the proxy, to some other configured topic.
  • In summary, at this time, I'm working on encoding the logic (again, by way of the R&D required for this PoC) through some sort of a driver that can plug in to an extension point of CloudState.

from cloudstate.

akramtexas avatar akramtexas commented on July 29, 2024
  • More (implementation) details can be found on my feature branch, which is a fork of CloudState master branch ⛏

from cloudstate.

Leila-SJ avatar Leila-SJ commented on July 29, 2024

Based on a grooming session with @jroper and @michaelpnash, its confirmed this story has been developed but needs documentation.

from cloudstate.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.