[FSSDK-11455] Java - Add SDK Multi-Region Support for Data Hosting#573
Merged
esrakartalOpt merged 8 commits intomasterfrom Aug 1, 2025
Merged
[FSSDK-11455] Java - Add SDK Multi-Region Support for Data Hosting#573esrakartalOpt merged 8 commits intomasterfrom
esrakartalOpt merged 8 commits intomasterfrom
Conversation
There was a problem hiding this comment.
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 |
core-api/src/main/java/com/optimizely/ab/config/parser/DatafileJacksonDeserializer.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/parser/DatafileGsonDeserializer.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/event/internal/EventEndpoints.java
Outdated
Show resolved
Hide resolved
jaeopt
requested changes
Jul 31, 2025
Contributor
jaeopt
left a comment
There was a problem hiding this comment.
Same here. string-type region will make it much easier and safer when we add more countries in the server.
jaeopt
requested changes
Aug 1, 2025
core-api/src/main/java/com/optimizely/ab/config/DatafileProjectConfig.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/DatafileProjectConfig.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/DatafileProjectConfig.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/ProjectConfig.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/parser/JsonConfigParser.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/config/parser/JsonSimpleConfigParser.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/event/internal/EventEndpoints.java
Outdated
Show resolved
Hide resolved
core-api/src/main/java/com/optimizely/ab/event/internal/EventEndpoints.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Test plan
Issues