2

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.

finpingvin
  • 692
  • 1
  • 7
  • 14

4 Answers4

3

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
  • 16,821
  • 7
  • 45
  • 66
  • 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 Dec 17 '08 at 13:11
  • Great tip on Blaze DS, maybe a better candidate than Red5. – finpingvin Dec 17 '08 at 16:53
  • I promise I will as soon as i get 2 more in reputation ;) (I'm a new user) – finpingvin Dec 17 '08 at 18:20
3

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
  • 10,607
  • 1
  • 36
  • 64
  • 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 Dec 17 '08 at 14:09
  • Oh, and how is it working with smartfoxserver? :) Are you using the lite version or a more advanced version? – finpingvin Dec 17 '08 at 14:10
  • We are using the pro version - I'm developing custom extensions using java. – Simon Groenewolt Dec 22 '08 at 12:23
1

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
  • 12,018
  • 4
  • 34
  • 39
  • 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 Dec 17 '08 at 14:22
  • To my experience Python performance is great. I have some grudges with the language, but performance isn't one of them. – PEZ Dec 17 '08 at 19:23
  • 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 Dec 17 '08 at 22:51
0

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?