#dapr for a serverless pods

1 messages · Page 1 of 1 (latest)

quick wyvern
#

Can we use dapr without a sidecar proxy for my serverless pod?

I removed DB layer from my springboot app which is built using graalvm native build to start app in few millis

I do not want dapr sidecar to be part of this pod

Can we do this?

rose nimbus
#

You can run the Dapr container independently wherever you want - as long as it is publicly reachable. Then the Dapr SDK has to be configured with the full hostname / IP etc of that external Dapr sidecar. Please note that at a minimum you should set the Dapr API token to secure that connection a bit.

#

If you need Dapr to support service invocation to your app or deliver binding / pubsub events.. then you also need to configure the app channel of the Dapr sidecar, so that the sidecar can reach your app which hosted elsewhere. And that app of course also needs to be publicly accessible from where the sidecar is running as a standalone app

quick wyvern
#

Ok. I am interested in DAPR only because it supports taking the DB layer out from app. That was my idea as well as when we remove DB layer app startup time improves to the extent to be considered for sweverless execution

rose nimbus
#

Dapr is not a replacement for all your DB needs however. Dapr is very opinionated and only addresses certain use case. So please make sure that what Dapr offers is sufficient for your needs.

quick wyvern
#

Ok. But why DAPR documentation have no clarification about store. Is it only to persist state info or it can also be used for transactional data as well

rose nimbus
#

It's just a basic key value store - no other capabilities. It does have support for database transactions - but only in the very specific opionated way we use - https://docs.dapr.io/developing-applications/building-blocks/state-management/howto-get-save-state/#perform-state-transactions

Take a look at the Dapr API docs - that's all we support.

https://docs.dapr.io/developing-applications/building-blocks/state-management/

Dapr cannot let you perform arbitrary operations, or give you complete control over how the data is stored. And for example you cannot use Dapr state store to query arbitrary data etc

That being said:
We have a few bindings components that have some of this support, but I strongly recommend just using the SDK of your technology directly instead of the binding. The bindings are incomplete in capabilities, and every binding behaves completely differently.

#

The goal of Dapr is not to be something like JDBC or some kind of ORM.