Comments (10)
@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.
@akramtexas No problem :) Just want to spare you some time & effort :)
from cloudstate.
One possibility is using CloudEvents for this.
from cloudstate.
@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.
@akramtexas Please do! We can raise this topic in the inaugural contributors' confcall next week
from cloudstate.
@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.
@viktorklang Gotcha, that makes sense. Plus I thank you for keeping me honest :)
from cloudstate.
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:
-
Sending constructed HttpRequests in
-
Then getting the HttpResponse
-
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 ofCloudState
.
from cloudstate.
- More (implementation) details can be found on my feature branch, which is a fork of
CloudState
master branch ⛏
from cloudstate.
Based on a grooming session with @jroper and @michaelpnash, its confirmed this story has been developed but needs documentation.
from cloudstate.
Related Issues (20)
- TCK: order of state action updates for addItem by the value entity ShoppingCart HOT 4
- Empty streamed responses are not actually connected HOT 2
- Dead letter logs on CRDT entity passivation HOT 1
- Failure: multiple grpc services in the same package HOT 1
- Projections for value entities
- HTTP API default mappings HOT 1
- Docker build error for Dockerfile.js-shopping-cart HOT 3
- Documentation on How to get started is not complete
- How / when are new versions of cloudstate-proxy-dev-mode published HOT 5
- Upgrade to akka-persistence-spanner 1.0.0-RC5 HOT 16
- Add local cache images layer for docker images on build HOT 5
- [proto] having gRPC service names PascalCase'd and others. HOT 1
- Usability issue with CRUD entity naming HOT 9
- Native-image Cassandra smoke test is flaky HOT 2
- nil pointer exception in spanner_store.go
- K8s Resource limits not applied to user functions HOT 2
- Additional conditions not managed properly when reconciling StatefulService
- NPM module postinstall fails on Windows
- A proposal to find and agree on a common protocol to discover services HOT 5
- The wrong site HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudstate.