views:

1308

answers:

5

I'm a student about to start my exam project, where I will be responsible for the server implementation of an online game targeting the flash player. I have a hard time to decide wether i should write my own lightweight server in Erlang or use the open source Red5.

My experience is that java-developers tend to overcomplexify things making the APIs difficult to work with, is this true for Red5? And how does it perform under the heavy load that comes with synchronizing a game?

Maybe my own Erlang server will be easier to work with and distribute on several machines?

So the question is should i write my own Erlang flash server or use the existing Red5?

Edit: I think i need to decide what my goals are: to just set up an online game or learn how to implement a multiuser server from scratch.

+3  A: 

I think you need to estimate for yourself the effort for implementing your own, lightweight, server. Often ones own requirements are small and specific and implementing a server that meets them is the way to go.

Also check out Blaze DS (Java flash server) and Juggernaut (ruby flash server). I think maybe Juggernaut is targeted for specific uses, beyond yours, but I'm not sure.

PEZ
Yeah, there are basically two things i need from the server, to synchronize all of the users and to store some information about the state of the game, and i thought Mnesia in erlang would be perfect for this. BlazeDS looks interesting, with more focus on pushing data.
finpingvin
Great tip on Blaze DS, maybe a better candidate than Red5.
finpingvin
Please don't hesitate to vote up my answer. =)
PEZ
I promise I will as soon as i get 2 more in reputation ;) (I'm a new user)
finpingvin
+3  A: 

I'd say use Red5 if you are ok with programming java - it might feel trivial to implement your own server but I'd guess you probably will find out that there are some more things to it than you are thinking of now.

However, if you want to program in erlang and think you'll have loads of fun developing your own server by all means go for it!

Is also depends on the goal of your project - do you have to demonstrate you can get an online game going (go for Red5), or do you have to demonstrate you can program a distributed multiuser game server? (go for your own project progammed in Erlang)

BTW: I'm using http://www.smartfoxserver.com/ for one of my current projects

Simon Groenewolt
You are right about the goal of the project. I need to get straight on what i want to accomplish. Since i want to continue to work with collaborative/multiuser applications, another question is if best to understand how the servers work from ground up or just learn to use the existing tools first.
finpingvin
Oh, and how is it working with smartfoxserver? :) Are you using the lite version or a more advanced version?
finpingvin
We are using the pro version - I'm developing custom extensions using java.
Simon Groenewolt
+1  A: 

Why reinvent the wheel? AMF alone is a complex beast to implement, just have a look at the docs for basic stuff like integer encoding...If you don't need the streaming capabilities and AMF is all you want, you can also use PyAMF (Python) or AMFPHP. Also, you'll probably be graded on how you the game works in the end, not on how clever you re-implemented AMF.

Simon
There are some implementations and more upcoming of AMF in Erlang. I think that php is a great platform for what it is intended for - normal http-based web applications, but not complex server-push applications. For python i worry about the performance of a heavy-load push-server. What do you think?
finpingvin
To my experience Python performance is great. I have some grudges with the language, but performance isn't one of them.
PEZ
Yeah, i've heard that it's on the better side of scripting languages. I found out that is that the server-side of eve-online is developed in python: http://en.wikipedia.org/wiki/Eve_online#Development .interesting :)
finpingvin
A: 

If you go to http://www.stripclubcity.com/ or more specifically http://www.stripclubcity.com/new-jersey-strip-clubs they are using Red5 to stream their cams. I think I read that it's so much easier to use Red5 than it is to write your own AMF... Why reinvent the wheel?

+2  A: 

Though a year passed, I'd want to answer. You may look at my http://github.com/erlyvideo/erlyvideo It is an erlang replacement of Red5.

Max Lapshin
Its not a replacement per-se, but it was written by one of the Red5 founders; Luke Hubbard.
Mondain