Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: feature flag polling for local evaluation (1/4) #54

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

miguelhrocha
Copy link

@miguelhrocha miguelhrocha commented Jun 2, 2024

Hello!

When I was looking on how to contribute to the PostHog's roadmap, I've found that one of the top items is implementing Feature Flags in Java for local evaluation. See issue: PostHog/posthog#16419

The FeatureFlagPoller is set to fetch for new feature flags every 5 minutes. The poller also provides a forceReload method in case the consumer wants to have an up-to-date view of the feature flags.

I based most of my implementation from https://github.com/PostHog/posthog-go

I wanted to get an understanding on how to interact with PostHog's product, and Feature Flags seems a straightforward entrypoint to the portfolio.

Review order

This is the first of two PRs. I wanted to keep the scope of the change simple to facilitate the review. This PR is mainly POJOs; FeatureFlagPoller being the exception.

  1. feat: integrate feature flag poller to PostHog client (2/4) #55: use the poller implemented here in the PostHog client.
  2. feat: send feature flag event to product analytics (3/4) #56: send feature flag events to product analytics every time a consumer calls a feature flag method.
  3. feat: get all feature flags related to a distinct_id (4/4) #57: get all the feature flags associated to a distinct_id

The pull-requests mentioned above should not be reviewed until the dependencies are merged.

@miguelhrocha miguelhrocha changed the title feat: feature flag polling for local evaluation feat: feature flag polling for local evaluation (1/2) Jun 2, 2024
@miguelhrocha miguelhrocha changed the title feat: feature flag polling for local evaluation (1/2) feat: feature flag polling for local evaluation (1/3) Jun 2, 2024
@miguelhrocha miguelhrocha changed the title feat: feature flag polling for local evaluation (1/3) feat: feature flag polling for local evaluation (1/4) Jun 2, 2024
@neilkakkar
Copy link
Contributor

Hey @miguelhrocha - thanks a lot for your PRs! Even though, as @marandaneto said this probably wouldn't make it in right now, I'd love to send you a posthog merch code because of the effort - this is great, love to see it :)

Send me an email please at neil @ posthog . com :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants