I guess this is jme related, since I am planning on using this server as a file sharing service for my development team (which consists purely of volunteers), and our current project uses JME.
Basically what I want to do is set up my brand new Raspberry Pi2 that I got today as a server that my team can upload their work to, and that I can download from. The only language I know well is Java, so I was thinking of making a java host application to run on my Pi, and then little client applications for my team. Here are the requirements for my system:
The client application must be user friendly! Iâm the only programmer in my team as of now, so the host app can be as technical as it wants. But the client apps have to be easy to understand and use.
The server has to be secure. I donât want a bunch of hackers messing up all of our hard work, and I donât want to pose a risk to my newly repaired computer.
Both applications have to be lightweight. I plan on keeping my Pi on 24/7 so that I donât hold back anyone. And I have the second strongest PC in my team, so the lightweight is more for my members that donât have $500 gaming PCs.
Must run on my Pi!!! Or else what would be the point of doing this?
I have a faint idea on how to prevent unauthorized access our project database. I can make the server only connect if the client provides the correct access key, which I will provide to my team. If there is a security breach, I can just change up the codes and give my team the new access key. I know Iâll need to port forward my router, since this isnât local. But I have some questions to clarify before attempting this.
Will AT&T allow this? Because I know most ISPs donât allow server hosting, but this is going to be a private server. Would that matter?
Are there any APIs that can help?
Has this been done before? I need source code to study for it to count.
I would greatly appreciate any advice on this, for if I get this server working it will help my team a lot. Thanks in advance!
Why not use existing solution, like https://syncthing.net/ or any other âpersonnalâ cloud/file sharing application, or simply a ssh server with scp/sftp access for user.
Probably frowned upon⌠some ports may be outright blocked. When my ISP finally starting blocking SMTP was when I upgraded to a business account as it was the one port that wasnât easy to map to something else in the âallowedâ range.
Save yourself a ton of trouble and just use an SVN or GIT server. (If you will have binaries, I recommend SVN but GIT is more in vogue.) If your platform can run an OS then it can run either of those.
Probably a bunch of relatively inexperienced folks have started this kind of project and switched to an existing solution halfway through.
I echo what others have said and recommend you use even an existing hosting service.
Sometimes we have to decide if we want to write games or spend 6 months developing infrastructure that already exists.
A good idea could be to provide all services through an encrypted vpn between team members (with the server hosted on the PI or somewhere else if the isp doesnât allow that).
You said you wanted to setup a file sharing server. Is this intended to share your project source code or something else related to the project?
If you are familiar with git then use Github or bitbucket. Create a private repository and grant access to your team members.
If you are not familiar with Git and not interested in learning it, an alternative for you could be codeplex which provides free hosting for subversion, mercurial, and git projects.
If youâe not familiar with any of these version control systems, I highly recommend learning one. Multi-person projects without version control will lead to doom.
create a non admin user, give that user ssh access
use filezilla as a easy to understand sftp client. (via the servermanager button you can choose this)
The whole reason I wanted to start this was so I donât have to use those services. And I know for Github I need a paid account to make a private repository, which all sources for this game will be closed until release. And I donât think my team members would greatly appreciate using git, because even I struggled to use it. For my shader pack on Github, it took my several weeks to figure out how to upload a commit from my PC.
Right now I have 2GB left on the SD card, but Iâm going to either get a bigger card or an external drive.
I am the only programmer in the team, so only Iâll handle the source code. The team will only have to submit resources they make, such as 3D models and sounds.
Iâm going to be working on this in my spare time, so the actual game itself wonât be held back by this. I have all the time in the world to make this server. I just want to get it running to make things easier for my team.
Both ideas sound good. As for managing the client side in filezilla, can I configure everything in code? I want this to be as user friendly as possible.
I just did some more research, and it seems AT&T doesnât mind. They even provide a port forwarding tool, and there are numerous tutorials on how to set to game servers with AT&T specifically. So I should be good.
I shouldâve been more clear. The server I want to make is only a place where my team can submit their work directly to me. Nothing more. The client app uploads files to my Pi, and the Pi saves them. Then when check on my Pi, it will give me a message that looks something like âso and so uploaded model.blend on 1/5/16.â No version control, no mass sharing, just work submission. I think using a full blown file sharing site is overkill for this, plus most sites have limits on how much storage you can have. Something like that shouldnât be too difficult, right?
bitbucket give you a private account, but also you could install it on your machine, git might not be the easiest option but svn is an easy one to setup and use.
so my recommendation to install subversion for none technical guys tortoise client is very easy to use
/Rant mode on
But bitbucket limits my my team size! After I finish recruiting there is going to be waayyyy more than 5 people. Iâll have voice actors, 3d modelers, video editors, 2D artists, etc etc that ALL need to use the server. And what I mean by simple to use is anything that doesnât mention the words git or commit or subversion or anything of the sort. Just a small GUI application that lets you pick files to upload, and it uploads them. Nothing more. So unless there is an unlimited free site that I can use that does ONLY what I described, I have to make the Pi server. My team only consists of High Schoolers, myself included, and about 90% of the students at my school will cringe at something like tortoise client, and the remaining 10% are too busy to take part. Which is why Iâm the only one handling the complex stuff, the rest of the team just provides me with resources to put together. If I was working with professionals, then I would choose tortoise client in a heartbeat. But sadly I canât.
/end rant mode
Now do you guys see what Iâm trying to do? Iâll just figure it out most of it myself. Will the Java Socket API be enough?
The easiest would be to have them email you their content. Gmail will even offer to upload large attachments to a private file share automatically. I think Thunderbird can do this too, I donât remember.
Other than that, you are a little crazy to not just use a web server. Writing your own network client, etc⌠your priorities are not the end product but learning network sockets is my guess. Plop apache or tomcat onto your server, turn on authentication, add some off the shelf file uploader tool. Done. If you decide later that you donât want your users sending unecrypted data then you are a registration and a config file away from HTTPS.
âŚand your users are 100% guaranteed to have a browser already.
If you are dead set on doing this the hardest way possible then by all means knock yourself out. You will learn a lot in the process at any rate.
If you donât want versionning (usefull including for 3D, sound, images). Like I said setup ssh/sftp or syncthing. syncthing will allow you to share/mirror one or more directory between member of the team. itâs not an external service like dropbox, but a tool to mirror/sync directory between several host via torrent.
A âsimple file uploadâ service is not hard to bootstrap (but hard to make it performant, firendly for daily usage). But itâs not friendly for artist to have to submit files (vs a shared directory). And tracking uptodate,⌠will become a shame.
A simple alternative raspberry oriented is: http://cloudnimbus.org/. It is maybe too simple on functionallity but is does the sharing work quite well and with the advantage that is made for this devices (having always in mind the limited raspberry resources).
Or just use google drive. You can share a folder, or even several. 3d guys can upload to the 3d assets folder, voice actor gets access to a folder that contains the clips for her characters, etc. Accessible from anywhere, no need to manage a server.
Iâm not the kind of person to take the easy way out, but it looks like thatâs what Iâll have to do at the moment. And one of the reasons Iâm doing this is yes, to learn about networking, because I plan on doing this again later on, but on a larger scale.
Thatâs what I was going to do until the server is running.
I understand that you guys are trying to help, but I had this idea for a reason. I already know about other methods that are MUCH easier, but I want to learn how to do this, and only this. So please, only post tips related to this server, nothing else. Any mentioning of an external service or third party software will be ignored, because thatâs not why I started this thread. And please donât suggest tool kits thatâll make things easier, I want to hand code all or most of it. APIs however, are okay.
So take a look at Netty: Home itâs the lib/framework used by lot project to do network stuff in java (just the layer over nio).
I also use it for xbuf (jme server side). iirc there are a sample file server.
I just realized that Chrome notifies me of replies! Thatâs so cool! Anyway, back on topic.
Hmm⌠looks promising. Itâs low resource, so my Pi shouldnât have trouble running it. How about I start from there, and then if I run into issues that I canât solve, Iâll ask here. That way my crazy idea isnât in the way of more plausible ones, because looking back at it now, this server is going to be an adventure to get working. But thanks for pointing out Netty!