Jump to content
  • Advertisement
Sign in to follow this  

Online Games & SOA

This topic is 3680 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I read an interesting article about SOA from Dave Olivier's (apparently a big-shot EA) blog and how online/net-centric games are leaning towards SOA as a basis for data relay and processing across the web. Like I said, it was interesting, but written for other people "in the know." I was hoping, by giving some examples, if some of you might be able to clear some things up for me... (1) He mentions the term "Service Repository" several times. Has anyone ever heard this term before? To me it just sounds like a big database. Can you explain what it is to me, and give an real example of one? (2) He explains that the top layer of the SOA logical model stack consists of four main elements: (i) an Application Frontend, (ii) a stack of Services, (iii) a Service Repository, and (iv) a Service Bus. Can someone think of an example of how these four elements would be used in a gaming environment? (3) He goes on to mention that any particular Service can be decomposed into four more sub-elements: (i) a Contract, (ii) an Interface, (iii) Business Logic, and (iv) Data. Using an example of a service from my 2nd question (above), can someone break it down into these four sub-elems by way of example? I think I "get" the whole concept of SOA, I just can't find any real useful examples to help me fill-in all the dots. All the documentation I can find on Google is abstract and theoretical, without any real practical working examples. Thanks!

Share this post

Link to post
Share on other sites
Original post by plywoodAll the documentation I can find on Google is abstract and theoretical, without any real practical working examples.

SOA *is* abstract. It's nothing more that a concept.

Let's say you wish implement scoring.

You develop a score service. Its responsibility is to manage scores.
Interface looks like this:
int getscore(ID playerid)

Business logic involves resolving playerid and retrieving the actual score.
Data might be an SQL database.

All of the above is implementation-specific. For example, your service repository could be most trivially in form of an HTTP server, where different directories define different services.

In above example you would query: internal.myserver.com/score?playerid=1241324 and receive xml/http back.

HTTP server takes the role of service bus. It acts as forwarding proxy to actual servers. One of those is your score server.

The interface in this case becomes HTTP request with appropriate parameters. Any HTTP server that knows how to handle these parameters can act as score server. Each such server is bound by the contract of getscore(ID playerid) interface.

For simplicity, we choose PHP as our business logic implementation. The implementation is trivial, it does SELECT score WHERE playerid... and returns that as XML/HTTP document of some specific format.

What is missing is of course some repository which would know where to find all these services and similar. For simple solution, we simply define a new server on internal.myserver.com/services, which returns a list of all of our directories (which represent services).

And that's it, SOA.

Of course, different frameworks provide different features, and most operate on considerably higher level. But the concept is the same.

Of course, as soon as you try to tackle the implementation you will run across an incredible number of issues (how do you start/stop a service, do they depend on each other, what happens if one dies, how to design proper naming, name conflicts, version conflicts, load balancing, administration, deployment, testing, as well as a whole world of grammar specific to SOA and the domain it's used.

But in brief, SOA is about two things:
- Find me all Y that can do X matching Z
- For some in Y, do Q
X is the work we wish to do
Z is some set of domain-specific conditions
Q is some work to be done

And frameworks that provide SOA try to make the above happen with user paying as little attention to huge problems involved in doing the above.

All of the above is the domain of Enterprise IT.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!