want a solution for upload download image

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

Moderators: Lapo, Bax

arash
Posts: 14
Joined: 06 Jul 2014, 10:36

want a solution for upload download image

Postby arash » 26 Feb 2016, 16:13

I am developing an mobile app that needs a small social network , I built signup using signup assistant component on a zone and login to play on another zone , The problem that I have is , I have to download all the friend users avator from server (smartfox box) , I think that every image is about 2-4 kb so i do not think that is a good way to do , I want a solution for this . I test java ninja framework for registration but it has jetty and I have conflict with smartfox . (port 8080) . Thanks any solution that could help me :

1- AN alternative to all of this
2- fixing port conflict between ninja framework and smartfox
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: want a solution for upload download image

Postby Lapo » 27 Feb 2016, 13:49

Hi,
I don't understand what is the problem with downloading the images for the buddy list.
Where are the images stored? Database? Local disk?

Unless you're sending 1000s of images to every client I don't see a problem to send them via socket. Alternatively you can reach the images via HTTP requests, either via direct URL of the SmartFox's web server, or via a servlet that reads from the DB and sends them back.

As regards the ninja framework, I don't know what it is. You mentioned it is for "registration", but you also said you're using the SignUp Component in SFS2X, which is also for registration. Can you clarify this point?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
arash
Posts: 14
Joined: 06 Jul 2014, 10:36

Re: want a solution for upload download image

Postby arash » 27 Feb 2016, 14:39

Thx Lapo for your response , You answered my question by these sentences , I afraid that so many images downloading cause problem for socket and server (you said that there is no problem ) . But just one thing remain in the server side is that first we have to load the images to the memory on the server and then send them as bytearray to client , for example if you have 1000 users and all of them request for their friend list , is there any problem for memory after a while ?
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: want a solution for upload download image

Postby Lapo » 29 Feb 2016, 07:49

arash wrote:Thx Lapo for your response , You answered my question by these sentences , I afraid that so many images downloading cause problem for socket and server (you said that there is no problem ) . But just one thing remain in the server side is that first we have to load the images to the memory on the server and then send them as bytearray to client , for example if you have 1000 users and all of them request for their friend list ,

Just to be clear: loading the image in memory is necessary for any type of server, not just SmartFox.

is there any problem for memory after a while ?

No, data is loaded in memory and unloaded when you're done. So no problem, as long as you're running SmartFoxServer with a reasonable amount of RAM available (e.g. 1-2GB free RAM)

thanks
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 84 guests