my unity browse game architecture

I divide it into three parts: unity client, logic server, headless mode unity. unity send command to logic server which written by any high level language(like java, C#). If the command need transform users, the logic server request(socket) ‘headless mode unity’ to do it, headless mode unity response(socket) result to logic server, logic server broadcast Transform to client in fixed time. Otherwise logic server handle the command by itself.
I think headless mode unity only need to do physics, collision detection, pathfinding. it should be requested in two ways:

  1. move request, like pathfinding, it execute in async mode. It will update in every frame until it complete.
  2. check request, like raycast hit check, it execute in sync mode. logic server need get the checked result to determine whether continue execute the next action.
    I plan to every scene to instantiates a headless mode unity.
    I hasn’t written any code to implements my idea, I want to listen to your opinions.

It’s a good idea to let unity headless do physics and collision detection. There is a product caled uStream from MuchDifferent which handles messaging between unity server and your clients really well and does load balancing and parallele execution of message handler and bandwidth management at the same time.
Database code can be done using this logic server or unity headless mode since you are doing it asynch using another thread and it will not block the unity/logic server App.
For Databases, Try a no sql distributed thing like Casandra, Riak, Dynamo … If you have lots of data. If you want to prototype or the scale required is not huge, SQL based RDBMs are ok.
CCP’s tech articles on gamasutra showd that it’s possible to very tricky to use sql server for that. SWTR uses oracle in hero engine as well but no sql is easier to scale conceptually.