This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aws (18)
- # babashka (35)
- # beginners (7)
- # cider (3)
- # clara (2)
- # clj-kondo (15)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (20)
- # clojure-canada (1)
- # clojure-dev (3)
- # clojure-spec (17)
- # clojure-uk (13)
- # clojutre (1)
- # cursive (7)
- # datomic (1)
- # duct (7)
- # fulcro (33)
- # helix (77)
- # jobs (3)
- # malli (15)
- # meander (3)
- # off-topic (30)
- # pathom (3)
- # quil (1)
- # reagent (1)
- # reitit (10)
- # shadow-cljs (2)
- # tools-deps (5)
- # xtdb (6)
- # yada (1)
I only know someone who has and they spoke about it like someone would speak about a rough patch in their marriage or the death of a relative
Any tips on the sanest way to do this? Our app uses Postgres, but the business team wants a sub-set of the data to be synced over to SF which has a matching schema of objects (give or take). At this point it seems like I’m trying to create an ad-hoc replication protocol between PG -> SF, that in turn has to be able to deal with network outages and the like, and later able to catch up with syncing. That in turn seems like a legit difficult problem in distributed computing, but no one else seems to appreciate that fact.
I’m also under the impression that all FK relationships need to be mapped to SF FKs, because SF can’t be bothered to just use the existing PG FKs…
Well, what’s your use case exactly? Storing data in two places seems really terrible. We usually opt to store data in Salesforce or Postgres (but usually not in both places). If our customer reps have the need to access data stored in Postgres, we expose an endpoint to fetch data then our SF devs will build out pages to display that data in Salesforce.
I’m not too sure on the details of how the SF devs do it, but I believe there’s a way to build custom apps within Salesforce to fetch data from a service or DB without having to actually store it in Salesforce
Im 100% in agreement that storing data in 2 places is terrible, yet that’s exactly the requirement. I’ve tried to get the team to use Metabase to pull reports directly from PG but the team is dead set on using SF. We also have no SF devs in house.
I think a big driver is the ability to create automated workflows to take action based on the data that is synced over into SF objects.
Oh shoot, well seems like you can’t get away from that then. As far as network outages, retries, etc. you might have luck using a serverless solution like SQS-Lambda
We have some lambdas that create objects in Salesforce when certain events happen. The SF api is easy enough to work with and with SQS-Lambda it’s easy to configure your retry behavior.
Our app also triggers object creation directly, when a user performs an action we sometimes create things in Salesforce directly from our backend service. Not sure if that helps. It sounds to me like backfilling and making sure data is perfectly synchronized will be difficult.
We also create automated workflows when a user triggers certain events in the app that require manual intervention from our customer service reps.
Yeah the API is easy enough, and you are right, the backfilling and ensuring consistency is the thing I’m most worried about. The single object create/update is too slow to backfill, so I also need to use the bulk insert api
The thing that literally kept me up last night was figuring out the existing syncing was triggering in a separate process before the PG DB transaction committed
Between those the facts, it was possible for an older copy of an object to overwrite a newer version in SF, thus bringing SF subtly out of sync with PG
A very particular question, mostly about Linux and partially about Java/Clojure.
Is it possible to create a GraalVM-compiled executable from Clojure code that has the
setuid bit and:
clojure.java.shell/sh to run a third-party program
2. Runs that program in a way that makes it seem like that program itself has the
I just tried and it doesn't seem to work that way by default, probably a security measure that I'm not aware of. But is it possible to somehow explicitly tell the OS that it's OK in this case?
And apparently I have to do something like this to achieve this: https://alvinalexander.com/java/jwarehouse/jetty-6.1.9/extras/setuid/modules/java/src/main/java/org/mortbay/setuid/SetUID.java.shtml That doesn't look too enticing.
in terms of running another program, that sounds like dynamic setuid which sounds no fun
I have come to a conclusion that nothing about
setuid sounds fun. :) It appears that even without running other programs, I cannot use
setuid on a Graal-VM-compiled binary that easily.
I have to call the
setuid C function from a program that has that bit to make sure that I'm indeed acting on behalf of the other UID.