Java Server Not Implemented Feature Arrival Date(s)?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Java Server Not Implemented Feature Arrival Date(s)?

Postby coolboy714cp » 23 Feb 2013, 02:58

I've started making the buddy list for my game now, but I have encountered a few crucial parts of the game that are needed for it to function the way I have in mind. The problem is specifically in the buddy list system, which I am needing to add buddies to a user's buddy list even if they are offline. But, the function I'm calling is apparently not yet implemented.

The function I'm talking about is in the SFSBuddyAPI -- addBuddy. Here is a link to the entry in the docs for this function: http://docs2x.smartfoxserver.com/api-docs/javadoc/server/com/smartfoxserver/v2/api/SFSBuddyApi.html#addBuddy(com.smartfoxserver.v2.entities.Zone,%20java.lang.String,%20java.lang.String,%20boolean,%20boolean,%20boolean)

Now as the docs also say, the function is not yet implemented yet. However, the docs for the other addBuddy function is implemented already, but it requires that the user already be online to add a user to their buddy list.

With that being said, here are my questions:
1. So, I was just wondering if there is any date that can be given for the first addBuddy function I talked about to be implemented? EDIT: The same goes for the removeBuddy function!
2. And if not, then what would be the best work around for now so that I'm able to add to a user's buddy list while they are technically offline?
3. I had an idea of making the server login to the zone temporarily by an extension just long enough to add a user to their buddy list, then logging out. That's just a theory approach though, and probably isn't the best way to do this, so I was also wondering if there was a better way anyone else knows of that could be better?

Thanks for your time!
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 23 Feb 2013, 08:49

Can you please clarify how this should work?

You mean that User A is online and he wants to add User B and User C that are offline?
Lapo
--
gotoAndPlay()
...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby coolboy714cp » 24 Feb 2013, 01:24

Hi, sorry for not making my objective clear.

What I'm basically wanting to do is to make a mutual buddy add system, but lets say User A sends User B a friend request, and before User B can accept the request, User A disconnects from the server.
So User A (who is now offline) will be added to User B's (who is still online) buddy list, but now to make it mutual, somehow, User B has to also be added to User A's buddy list.

Hopefully this one make my goal a little clearer!:)
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 25 Feb 2013, 09:45

Very clear, thank you.
Yes this scenario is not supported yet and it's a little tricky. I will push its priority for the next release.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
xLite
Posts: 106
Joined: 05 May 2010, 12:42

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby xLite » 25 Feb 2013, 14:37

Is there any custom workaround we can use in the meantime? I intend to store all buddy data in a database if that makes any helpful difference and the buddy list seems great so I'd really like to make use of it instead of coding my own entire custom solution.

Thanks!
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 25 Feb 2013, 15:09

On the server side you can check if any of the two users involved in the mutual friendship is not online.
If so, you can use a database to store this information by adding one "pending friendship" to his record. The next time the user logs into the system you can check if he has any pending friendship(s) and proceed to add them to his buddy list.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
coolboy714cp
Posts: 323
Joined: 06 Feb 2010, 02:45
Contact:

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby coolboy714cp » 01 Mar 2013, 04:58

Thanks again Lapo, that's another possibility I had in mind while these features weren't available. But do you have any possible release date for these functions yet? If its not too much longer of a wait, I don't think it would be necessary for me to implement any workarounds in my game and would be much easier just to wait until they are released.
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 01 Mar 2013, 08:58

We don't have a release date yet because we're working on several improvements.
I might be able to be more precise in a couple of weeks.
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
xLite
Posts: 106
Joined: 05 May 2010, 12:42

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby xLite » 09 Apr 2013, 01:07

Any news on this Lapo?
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 10 Apr 2013, 08:22

No news, sorry. We have lots of things going on for the next release.
I'll add a post here if we'll be able to offer a pre-release before the official launch.

The good news is that the next release will be pretty plumpy :)
Lapo

--

gotoAndPlay()

...addicted to flash games
User avatar
xLite
Posts: 106
Joined: 05 May 2010, 12:42

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby xLite » 10 Apr 2013, 10:23

Sounds amazing, looking forward to it! :D
User avatar
Lapo
Site Admin
Posts: 23025
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Java Server Not Implemented Feature Arrival Date(s)?

Postby Lapo » 26 Apr 2013, 10:59

UPDATE:
I have an update on this topic. It has been held for a quite a while because it was an idea we had at the beginning but it needed to be discussed more in depth to understand the pros and cons of it.

After some extra analysis we don't think that there's a good way to implement this possibility, because when a User is disconnected his buddylist is auto-saved and removed from memory to save resources.

The only way to implement this type of thing is to directly write data in the Buddy Storage, which would bypass the interface delegated for I/O, which is really not good. At least from the API design.
You could anyways go ahead and force this operation by implementing your own Buddy Storage class and then manually write the data if the user got disconnected. Example: if you use a DB you can manually add the User via a manual query.

Given the very limited case of this scenario and it's infrequence of occurrence we're not going to break the current API to support the such uncommon case.
In addition there remain very simple ways to work around the problem:

1- Simply let the users re-do the friendship request the next time they show up online
2- Implement a custom BuddyStorage class that supports writing directly to the data source so you can alter it when Users are offline as well.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 75 guests