Skip to content

[FSSDK-11455] Java - Add SDK Multi-Region Support for Data Hosting #573

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

Merged
merged 8 commits into from
Aug 1, 2025

Conversation

esrakartalOpt
Copy link
Contributor

Summary

  • Add Multi-Region Support for Data Hosting

Test plan

  • Created and added new test cases

Issues

@esrakartalOpt esrakartalOpt marked this pull request as ready for review July 31, 2025 14:56
@pvcraven pvcraven requested a review from Copilot July 31, 2025 16:41
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds multi-region support for data hosting in the Optimizely Java SDK by introducing region-specific event endpoints. The implementation allows the SDK to route events to appropriate regional endpoints (US or EU) based on the project configuration.

Key changes:

  • Added a Region enum to ProjectConfig with US and EU values
  • Created EventEndpoints utility class to map regions to specific event endpoint URLs
  • Updated all parsers and constructors to handle the new region field from datafiles

Reviewed Changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java Added Region enum with US and EU values and getRegion() method
core-api/src/main/java/com/optimizely/ab/config/DatafileProjectConfig.java Added region field and updated constructors to support region parameter
core-api/src/main/java/com/optimizely/ab/event/internal/EventEndpoints.java New utility class providing region-specific endpoint mapping
core-api/src/main/java/com/optimizely/ab/event/internal/EventFactory.java Updated to use region-specific endpoints instead of hardcoded URL
core-api/src/main/java/com/optimizely/ab/config/parser/*.java Updated all parsers to extract region from datafile with US as default
core-api/src/test/java/**/*.java Updated test files to accommodate new region parameter and validate endpoint behavior

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. string-type region will make it much easier and safer when we add more countries in the server.

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes suggested

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@esrakartalOpt esrakartalOpt merged commit 962ca8f into master Aug 1, 2025
17 checks passed
@esrakartalOpt esrakartalOpt deleted the esra/FSSDK-11455_eu_data_hosting branch August 1, 2025 16:57
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