clojure thesis opportunity

120 views
Skip to first unread message

Paolo Negri

unread,
Feb 21, 2012, 11:55:58 AM2/21/12
to Clojure
Dear list,

In the company where I work [1] we have an opening for a thesis
project involving clojure, I’m posting the abstract proposal on this
list since some reader might be interested.

Here’s some information about the thesis

Games configurations are structured collections of connected data
represented by documents that drive game logic execution.
Configurations need to be easily edited by non technical staff and
then rendered in a variety of machine readable formats like xml, json
or code.

The topic of this thesis is to research the suitability of S-
expression as primary representation format of game configurations and
a lisp dialect as a primary mean of modifying, analysing, validating
and converting configurations. The explicit intent is to take
advantage of homoiconicity. Focus of the thesis is to assess and
demonstrate advantages deriving by the adoption of S-expression and
clojure versus the XML + XSD + OO programming language tool chain
usually adopted to deal with this kind of tasks.

Within this project a clojure (server component) and clojurescript
(client component) application will be developed.
The application will internally represents configurations as S-
expression while offering an intuitive UI that will enable non
technical user to edit configuration data while enforcing formal
correctness by applying quantitative and logic constraints and
exporting configurations in other formats. As an advanced task
compilation of configurations to code in a destination programming
language could be considered.

The thesis will be developed on site in our office in Berlin, you’ll
be embedded in a game team and mentored by one engineer. If you’re
interested in this project you can contact me directly
paolo...@wooga.com or write to an...@wooga.com with the reference
“GSE clojure”

[1] Wooga is the third largest social game developer on facebook,
every day 9 million persons play one or more of our games. If you’re
curious about the company you can check our website http://www.wooga.com,
our github page https://github.com/wooga or you can take a look at our
engineering conference talks http://www.slideshare.net/wooga/tag/backend

Raju Bitter

unread,
Feb 22, 2012, 11:25:55 AM2/22/12
to clo...@googlegroups.com
This might interest you, it's not Clojure, but Lisp. Do you know the
online game Vendetta? They  have used Lisp extensively for non-player
character behavior, and have a REPL integrated into the game.
http://www.vendetta-online.com
"Vendetta Online has a Lisp environment (using SBCL) which controls
much of its NPC behavior and will soon be in charge of generating
player and NPC missions. Partly in order to get around some
thread-safety issues, and partly for convenience we built an REPL into
a secret chat channel. (it only responds to developer accounts)"
http://www.a1k0n.net/2005/11/04/lisp-repl-vendetta-online.html

Later they started using Erlang in combination with Lisp since they
had some problems with concurrency and garbage collection in SBCL.
http://www.vendetta-online.com/x/msgboard/1/15560#196333

> We chose common lisp primarily for its rapid-prototyping capabilities. In CL, it is very easy to
> define 'mini-languages', which is what I've done for missions, objectives, senses, reflexes,
> state-machines, business-models and more. All the code written in these special languages
> will remain untouched, and be auto-translated (by CL code) into erlang. As I develop new
> missions, reflexes, etc, I will continue to use the mini-languages; the processes they describe
> will simply be running on a distributed, fault-tolerant, erlang-based platform instead of the
> simplistic single-threaded one they have been running on. We had hoped for the simplistic
> system to continue to serve for a while yet, so that we could focus on player-visible
> features, but we always knew it would need to be made more scalable at some point.
> If you know of a 'more mainstream (/debugged/tested/reliable)' language/runtime than erlang that provides:

> 1) *very* light-weight processes
> 2) distributed, message-passing concurrency;
> 3) unification/pattern-matching
> 4) a soft-real-time, distributed, disk and/or ram-based relational/object database usable
> with or without transactions (just a few of mnesia's features),
> 5) facilities for zero-downtime code-upgrades, and other high-availability features
> 6) a powerful enough set of semantics (eg. closures) to make auto-translation from lisp less painful than a complete rewrite

- Raju

Cedric Greevey

unread,
Feb 22, 2012, 11:37:45 AM2/22/12
to clo...@googlegroups.com
Erlang's actor model seems like a perfect fit to MMORPG development --
maybe even more so than Lisp.

On the other hand, Lisp letting you update things on the fly is also
of obvious value to an MMORPG, which tends to involve adding and
tweaking stuff from time to time but you really don't want to take the
game servers down, ever, if you can avoid it.

Timothy Baldridge

unread,
Feb 22, 2012, 11:40:52 AM2/22/12
to clo...@googlegroups.com
> On the other hand, Lisp letting you update things on the fly is also
> of obvious value to an MMORPG, which tends to involve adding and
> tweaking stuff from time to time but you really don't want to take the
> game servers down, ever, if you can avoid it.

That's also a major feature of Erlang. On-the-fly code updating is
actually one of its strengths.

http://en.wikipedia.org/wiki/Erlang_(programming_language)#Hot_code_loading_and_modules


That being said, the syntax of Erlang is so insanely bad, I can't
bring myself to touch it.

Timothy

Andy Fingerhut

unread,
Feb 22, 2012, 11:43:00 AM2/22/12
to clo...@googlegroups.com
I haven't written such code myself, but one motivation for creating Erlang was software for telecommunications systems, where they have very high uptime requirements and needed the ability to update code on a running system. It can replace definitions of functions in place as well as any Lisp.

Andy

> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clo...@googlegroups.com
> Note that posts from new members are moderated - please be patient with your first post.
> To unsubscribe from this group, send email to
> clojure+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en

Cedric Greevey

unread,
Feb 22, 2012, 12:00:18 PM2/22/12
to clo...@googlegroups.com

Sounds like what we need is a Lisp with the actor model. Ideally,
Clojure with a distributed version of agents, maybe built on top of
agents and Java's RMI.

Then again, what you said about Erlang's syntax lots of people say
about Lisp's. ;)

Adam

unread,
Feb 22, 2012, 12:08:28 PM2/22/12
to clo...@googlegroups.com
Have you looked at Akka at all?

~Adam~

Cedric Greevey

unread,
Feb 22, 2012, 12:14:42 PM2/22/12
to clo...@googlegroups.com
On Wed, Feb 22, 2012 at 12:08 PM, Adam <les...@gmail.com> wrote:
> Have you looked at Akka at all?

Looks like it's a Java library. Using it apparently involves a fair
amount of subclassing, so we'd probably want to write at least a
partial clojure wrapper instead of users having to write proxy this,
reify that all over their code. :)

Eduardo Bellani

unread,
Feb 22, 2012, 9:26:08 AM2/22/12
to clo...@googlegroups.com
Perhaps SXML could help the writer a bit

http://en.wikipedia.org/wiki/SXML

On 02/21/2012 02:55 PM, Paolo Negri wrote:
> Dear list,
>
> In the company where I work [1] we have an opening for a thesis

> project involving clojure, I�m posting the abstract proposal on


> this list since some reader might be interested.
>

> Here�s some information about the thesis


>
> Games configurations are structured collections of connected data
> represented by documents that drive game logic execution.
> Configurations need to be easily edited by non technical staff and
> then rendered in a variety of machine readable formats like xml,
> json or code.
>
> The topic of this thesis is to research the suitability of S-
> expression as primary representation format of game configurations
> and a lisp dialect as a primary mean of modifying, analysing,
> validating and converting configurations. The explicit intent is to
> take advantage of homoiconicity. Focus of the thesis is to assess
> and demonstrate advantages deriving by the adoption of S-expression
> and clojure versus the XML + XSD + OO programming language tool
> chain usually adopted to deal with this kind of tasks.
>
> Within this project a clojure (server component) and clojurescript
> (client component) application will be developed. The application
> will internally represents configurations as S- expression while
> offering an intuitive UI that will enable non technical user to
> edit configuration data while enforcing formal correctness by
> applying quantitative and logic constraints and exporting
> configurations in other formats. As an advanced task compilation of
> configurations to code in a destination programming language could
> be considered.
>
> The thesis will be developed on site in our office in Berlin,

> you�ll be embedded in a game team and mentored by one engineer. If
> you�re interested in this project you can contact me directly

> paolo...@wooga.com or write to an...@wooga.com with the

> reference �GSE clojure�


>
> [1] Wooga is the third largest social game developer on facebook,
> every day 9 million persons play one or more of our games. If

> you�re curious about the company you can check our website


> http://www.wooga.com, our github page https://github.com/wooga or
> you can take a look at our engineering conference talks
> http://www.slideshare.net/wooga/tag/backend
>


--
Eduardo Bellani

omnia mutantur, nihil interit.

Paolo Negri

unread,
Feb 22, 2012, 4:34:02 PM2/22/12
to Clojure

On Feb 22, 6:00 pm, Cedric Greevey <cgree...@gmail.com> wrote:
> On Wed, Feb 22, 2012 at 11:40 AM, Timothy Baldridge
>
> <tbaldri...@gmail.com> wrote:
> >> On the other hand, Lisp letting you update things on the fly is also
> >> of obvious value to an MMORPG, which tends to involve adding and
> >> tweaking stuff from time to time but you really don't want to take the
> >> game servers down, ever, if you can avoid it.
>
> > That's also a major feature of Erlang. On-the-fly code updating is
> > actually one of its strengths.
>
> >http://en.wikipedia.org/wiki/Erlang_(programming_language)#Hot_code_l...
>
> > That being said, the syntax of Erlang is so insanely bad, I can't
> > bring myself to touch it.
>
> Sounds like what we need is a Lisp with the actor model. Ideally,
> Clojure with a distributed version of agents, maybe built on top of
> agents and Java's RMI.
>
> Then again, what you said about Erlang's syntax lots of people say
> about Lisp's. ;)

Thanks everyone for the interesting replies and pointers to other
resources.

I find pretty intriguing that erlang and the actors came up in this
thread since we already do write game backend in erlang and we
reported reported regularly about our experience at conferences [1],
[2], [3].
Indeed the actor pattern is a very effective way of modeling game
servers and the erlang OTP framework offers out of the box with tools
and constructs that simplify dealing with the complexity of a
multitude of concurrently evolving states.

Still, the topic of this thesis is not really focused on game servers
but about improving how games are configured, balancing the values
that drive the evolution and progresse in virtual words is a very
interesting and complex task, configurations appears as naked data but
they actively drive the execution of many aspects of games, in some
way you might think about configuration as a form of execution plan
game logic, this is why having configuration in a form that can be
interpreted both as data and code is of special interest.
Another interesting aspect is that in our erlang game server we take
XML configurations files and generate code (each XML file is compiled
into an erlang module) so our servers effectively are configured by
code, not data, this also make it easier to upgrade configurations on
a running system thanks to the erlang hot code reload facilities,
changin configuration actually mean running a newer version of the
configuration code.

I'm looking forward to your comments and ideas on the topic.

[1] http://www.slideshare.net/wooga/from-0-to-1000000-daily-users-with-erlang
[2] http://www.erlang-factory.com/conference/London2011/speakers/PaoloNegri
[3] http://www.erlang-factory.com/conference/SFBay2011/speakers/PaoloNegri

Thanks.
Reply all
Reply to author
Forward
0 new messages