• Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Darkly)
  • No Skin
Collapse
brainCloud Forums

administrators

Private

Posts


    Segment Code Bug Report
  • J JasonL

    Hi @LEE-JONG-GUN,

    Good news: the fix for the Segment code field clone bug has been deployed.

    What changed

    • When you clone a Segment now, the code field is automatically appended with _copy (e.g., myCode becomes myCode_copy).
    • The cloned segment's code field is editable, so you can change it to any unique value and save the clone successfully.

    This resolves the duplicate-code issue that was preventing clones from being saved. Thanks again for the report.


  • Questions about brainCloud Friends and Social Leaderboard behavior
  • Paul WinterhalderP Paul Winterhalder

    Hi @gyutaelee ,

    Are you saying that a single user can have up to 10K friends in your system? Not 10K players in the leaderboard overall - but actually 10K friends of a single player (inside what is likely a much larger leaderboard).

    Is this for influencers or something? In which case it's probably for a few exceptional players?

    If so - I might suggest that influencers get tagged as such - and you keep their friend scores in a shadow leaderboard (one for each influencer) that just stores that one players friends scores... [it's a shadow leaderboard because you would still record those players scores in the main leaderbaords as well].

    Of course - that works for dozens of influencers. Its not at all what I would suggest for the regular players.

    Does this make sense for you use case though? Most players would have well under 100 friends... the great majority will be under 20. Influencers would need a lot more -- but you can represent them in a different way. You'd likely have less than 50 influencers -- right?

    Paul.


  • Segment Code Bug Report
  • J JasonL

    Good catch! Thanks for bringing this to our attention. We’ll fix it so that cloning a segment doesn’t copy and inactivate the code field, avoiding the duplicate-code issue and allowing the clone to be saved.


  • Integration with .NET server
  • J JasonL

    The SDK is just a plain C# source library you can drop into any .NET project (not Unity-only). You can find usage examples and the source in our GitHub repositories at https://github.com/getbraincloud.


  • Question about using unique indexes for Custom Entities
  • J JasonL

    Hi @gyutaelee, have you tried calling the sysListIndexes method from the API Explorer to verify the index, as mentioned earlier? The Portal’s Custom Indexes UI may not always reflect the underlying MongoDB index options correctly for manually adjusted indexes like unique, so sysListIndexes is the more reliable way to confirm what’s actually on the collection. So run CustomEntity > SysListIndexes in API Explorer and check the returned index list for followerId_followingId and its unique flag.


  • Question about using unique indexes for Custom Entities
  • Paul WinterhalderP Paul Winterhalder

    Hi @gyutaelee,

    The unique option has been added to the existing followerId_followingId index of the FOLLOW custom entity.

    I also added it to the staging and production apps in the same team.

    Have a good week!

    Paul.
    [PS - we have plans to allow the creation of unique indexes via our portal soon...]


  • Question about using unique indexes for Custom Entities
  • J JasonL

    Hi @gyutaelee, thanks for the detailed request. We will add a unique compound index for your FOLLOW Custom Entity.

    About Your Questions:

    1. Will this unique index auto-deploy to Staging/Production?
      No. Because brainCloud's API blocks unique indexes at the code level (to prevent sharding issues), the deployer does not know about manually added indexes.

    2. Does this need to be applied per app/environment manually?
      Yes. Each brainCloud app (Dev/Staging/Prod) is a separate appId with its own physical MongoDB collection.

    3. Can we provide appIds for Dev/Staging/Prod so you can add the index to each?
      Yes, absolutely. Please reply with the App IDs for your Staging and Production environments. Once we have them, we'll apply the same unique index to all three environments.

    4. Are manually added Custom Entity indexes included in deploy/migrate/export-import workflows?
      No. The deploy pipeline is config-driven. Any index added directly via MongoDB (outside the Portal/API) is invisible to ImportExportService.

    5. If there are existing duplicate rows, will unique index creation fail?
      Yes. MongoDB returns duplicate key error and aborts the entire index build. Since you mentioned the feature isn't in production yet, you can safely reset/clean up FOLLOW data before we apply the index to avoid this. We may need to check for duplicates first.

    6. Is there expected downtime, lock, write failure, or performance impact?
      No hard downtime Index builds are non-blocking: reads and writes continue during the build.

    7. How to verify the unique index exists after application?
      You can verify it from the Indexes tab of app/design/cloud-data/custom-entities/FOLLOW from portal, or call the method sysListIndexes() via API Explorer.


  • Questions about brainCloud Friends and Social Leaderboard behavior
  • J JasonL

    Hi @gyutaelee ,

    Thanks for the detailed questions.

    1. Friend Relationship Direction - Yes, bidirectional

    • AddFriends: When user A calls AddFriends([B]), both A and B see each other in ListFriends("brainCloud")
    • Both A and B will appear in each other's GetSocialLeaderboard results (if they have scores)
    • RemoveFriends: Removes the relationship from both users atomically

    2. Idempotency - Yes, both are idempotent

    • Calling AddFriends([B]) when already friends: No-op, no error thrown (skips DB write)
    • Calling RemoveFriends([B]) when not friends: No-op, no error thrown

    3. Consistency and Caching - Immediate

    • Friend changes are persisted immediately to the database (no write-behind caching)
    • ListFriends("brainCloud") and GetSocialLeaderboard reflect changes immediately after AddFriends/RemoveFriends
    • No eventual consistency or caching delay

    4. Friend Count Limits - No hard cap

    • No code-enforced limit on brainCloud friends per user
    • Practical consideration: Friend IDs stored as array on UserProfile; very large arrays (>10K) may impact read/write performance

    5. GetSocialLeaderboard Behavior - Returns all friends + self + pacers, no limit

    • Returns all recognized friends + self + pacers
    • No hidden maximum result count
    • Pacers are included (if leaderboard has pacers configured)
    • Warning: Response payload grows linearly with friend count

    6. Recommended API for Top-N - Yes, use GetMultiSocialLeaderboard

    • GetMultiSocialLeaderboard with a single leaderboard ID is a correct approach for top-N results
    • leaderboardResultCount is applied after social filtering and score sorting
    • leaderboardResultCount is capped by maxMultipleLeaderboardScoreLimit app property (default 10, can be raised in app-basis)
    • Preferred over GetSocialLeaderboard for top-N because it has built-in truncation

    7. Social Leaderboard Pagination - Not supported

    • No GetSocialLeaderboardPage API exists (only GetGlobalLeaderboardPage for global leaderboards)
    • Social leaderboards always return the full friend set (potentially truncated by leaderboardResultCount only in the multi variant)
    • I will forward your pagination request for team review

    8. Billing and API Counts - 1 API call per request

    • GetSocialLeaderboard = 1 API call regardless of friends/entries returned
    • GetMultiSocialLeaderboard = 1 API call even with multiple leaderboards
    • AddFriends/RemoveFriends = 1 API call even though they modify both users' profiles

    9. Recommended Usage - Yes, your design aligns perfectly


  • Question about using unique indexes for Custom Entities
  • J JasonL

    Hi @gyutaelee,
    Currently, brainCloud blocks unique indexes on all custom collections as a blanket safeguard. The check happens unconditionally before the system even evaluates whether your collection is owned or sharded, so it rejects the unique option with that error.

    We can manually add the unique index for your FOLLOW collection on our end. Please send us a request with:

    1. Your appId
    2. The entityType (is it FOLLOW only?)
    3. The field name(s) that need uniqueness
    4. The desired index name (e.g., test_index)

    Once we receive your request, we'll add the uniqueness constraint for you directly.


  • Automated Promotion not associated for users already in target segment
  • Paul WinterhalderP Paul Winterhalder

    Ah - great to hear @jongdae-won . Thanks for the update!

Member List

bcadminB bcadmin
Mark DouthwrightM Mark Douthwright
J JasonL
C Claire Raby
Markus DouthwrightM Markus Douthwright
C Corey Clarke
Adam PilkingtonA Adam Pilkington
Paul WinterhalderP Paul Winterhalder
R Roger Masse
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Solved
  • Unsolved
  • Users