What is the best way to implement communication between game-server and game-agents over the internet? - networking

I am planning to create a site that provides several games for self written game-agents.
There will be a Tic-Tac-Toe for example (and some more complex games of course). Programmers can register their agents and from time to time there will be a tournament. The gameserver will contact the registered agents, present the board and ask for a move.
My basic problem is: What would be a good way for the gameserver to communicate with the agents?
No communication: A special script language for the agents that can be submitted and interpreted on the server itself. This avoids the problem altogether, but it would be more fun if everyone could use his favorite language.
REST: This is a bit sparse in one direction.
SOAP?
REST with POST?
What connection-method would you like, if you would participate in such a game?

I'd use a form of REST supported by sever state, SOAP is too inhuman. If you use REST people can even make bots with cUrl, so you'll have the widest audience

I had great success using Twisted and developing my own application protocol built off of that.

I would use a private protocol, that leaves you the option to implement server and clients in different languages. You can add your favorite encryption mode as well.

The scripting language would definitely be the easiest thing to write on your end. Personally, as long as you specify the protocol exactly on the site, and give an example of formatting the messages, any person scripting should be able to use whatever format you choose.

For Go, there is already the existing Go Text Protocol. I would use similar protocols for other games.

Plain old TCP with a set of custom commands for your game?

Related

LDAP Proxy with inspection/modification of requests and responses

I need to build an LDAP proxy that I can program to inspect and modify the LDAP requests and responses - some of the LDAP requests/responses will simply be passed through, but for others I might want to send two different requests to the server and then combine the results (that's just one example - there will be other use cases).
I've looked at the proxying options documented for OpenLDAP's slapd, and I see that it has quite flexible configuration and 'overlays', but no capability to insert custom code.
So I think that's not a solution, unless slapd's source code is easy to modify, to insert my own modules plus hooks to/from the existing code (?)
An alternative would be to start with a friendly TCP/IP framework library (or even a complete TCP/IP proxy). Then I can link to an ASN.1 decoding/encoding library, and write the rest myself.
I'd prefer to avoid having to write (& learn) all the TCP/IP connection/message handling and event loop myself.
So I'm looking for the most complete starting point that does the hard work and gives me the flexibility to write what I need. Typical lazy/greedy approach :-)
Must be open source, ideally in C or C++, and I'll probably be targetting RHEL/CentOS 8 in a container.

newsletter software for IIS? (asp)

here's my questions:
is there a good asp software component for creating + sending newsletters online (via browser)?
is it recommended at all to send thousands of newsletters directly off my IIS machine? (because of server load) or better using a standalone win-application for creating/sending?
i'd like to code my own software for that and think a standalone html editor which also creates the (personalized) emails + sends them would be a better alternative - what would you think?
thanks
Slightly off topic but, you should at least consider using one of the very inexpensive or free providers that make doing this kind of thing very easy for you.
I recently evaluated constant contact, mailchimp and a few lesser ones, and was really impressed with the ease of use of Constant Contact. The price is extremely low. The one gotcha is that you need to make sure the email addresses you are using are from people who have specifically "opted-in". No unsolicited email allowed.
Not only does a service like this add a tremendous amount of value to what you are trying to do, they have a ton of functionality built in that you are unlikely to be able to code into anything you write yourself.
And to answer at least part of your question: I generally don't believe it is a good idea to bog down your own IIS server handling thousands or more of emails. When I have sent them, I generally off-load to another server or workstation.
I think something like MailChimp will be a better choice here.

How do I ensure that SOAP requests from a flash client to my ASP server are coming from the flash client?

I have a flash based game that has a high score system implemented with a SOAP service. There are prizes involved and I want to prevent someone from using FireBug or similar to discover the webservice path and submit fake scores.
I considered using some kind of encryption on the data but am aware that someone could decompile the swf and work out how I did it.
I also considered using an IP whitelist but since the incoming data will come from the users IP and not the servers that won't work. (I'm sure I'm missing something obvious here...)
I know that there is a tried and tested solution for this, but I don't seem to be asking google the right questions to get to it.
Any help and suggestions will be appreciated, thank you
What you want to achieve is impossible. You can only make it harder for people to do. The best you can do is to use encryption and encrypt the SWF it self, which usually causes higher filesize and poorer performance.
The safest method is to evaluate or even run the whole game on the server. You can try to determine whether what the client sends you is possible at all. Rather than making sure people use your client, you're making sure people play the game according to your rules.
greetz
back2dos
All security is based on making things hard. It never makes things impossible. How about having your game register with a separate service when it starts up. It could use client information to build some kind of special code that would be unique for each iteration of the game. The game could morph the code in a way that would be hard to emulate. Then when the game is over the score gets submitted with the morphed code and validated on the server side.

How to check network connection type in Blackberry?

In Blackberry application I want to check what type of network connection is being used on particular phone, whether it is BES/MDS,BIS-B or Direct Tcp.
Is there any way to find out this?
Many applications like Jive,Opera and many more are doing this kind of check.
Please help.
The question is quite logical and I do agree with Richard as well. Though a better answer lies in the fact that there can be a logic developed which would involve Service Book parsing and making use of system listeners to check the current coverage status.
I had attempted to make one such logic once in my project which worked for me. I had shared my findings and understanding about the concept in more detail at my blog post. May be you would like to check once.
You can find my blog post here.
Your question springs from an incorrect assumption. A Blackberry could be communicating over any or all of those channels simultaneously. In fact any application may as well. At any particular time you can determine if coverage is sufficient for one of those channels, or register a listener for notification of changing status using net.rim.device.api.system.CoverageInfo.

Sharing Logic Between the Browser and the Server

I'm working on an app which will, like most apps, have a whole boat load of buisness logic, almost all of which will need to be executed both on the server and the Flash-based client… And I'm trying to figure out the best (read: least complex) way to implement the rules engine.
These are the parameters of the problem:
The rules engine must both run in a web browser (ie, in Flash Player) and on the server. Duplicating the logic (eg, by writing a "server" version and a "client" version) would be an unacceptable risk.
The input/output data is fairly complex, so serialization is a nontrivial problem. We are currently using AMF for all of our serialization needs, and using another protocol would add significant complexity… So it should probably be avoided.
It is infeasible to implement a "rules description language". Experimentation has shown that rules are sufficiently complex that any such language would need to be Turing complete… Which would also add a significant amount of complexity.
The rules engine will not need to make some, but not very many, service calls.
Currently, the best contenders are:
Writing the code in ActionScript, then running it on the server. In theory it's possible to start up an AVM instance, get it long-polling a gateway, then pass data back and forth that way… But that seems less than ideal. Is there a "good" way of doing this?
Writing the code in Haxe. I don't know anything about Haxe's AMF support, so that could be a deal-breaker.
Something involving Tamarin. Seems like a viable option, but I haven't done enough research to tell either way.
So, what do you think? Are any of these options clearly better than others? Is there something I haven't though of that's worth considering?
Finally, thanks for reading this wall of text :)
How much data are you talking about? You can use Air if you want to run it on the server and access a queue or something.

Resources