Grid server V2.0! Now with extra crunchy SQL support.

Status:
* Prebuild will be broken, someone needs to update prebuild.xml with the new dependencies.
* The sim status check function does not yet function.
* Sims must be manually added to the database - automatic insertion isnt supported yet.
0.1-prestable
Adam Frisby 2007-05-04 06:51:18 +00:00
parent 808b9f6465
commit 0c78fc3dbc
5 changed files with 38 additions and 9 deletions

View File

@ -25,6 +25,16 @@ namespace OpenGrid.Framework.Data.MySQL
database.Close();
}
public string getName()
{
return "MySql OpenGridData";
}
public string getVersion()
{
return "0.1";
}
/// <summary>
/// Returns a sim profile from it's location
/// </summary>

View File

@ -11,5 +11,7 @@ namespace OpenGrid.Framework.Data
bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey);
void Initialise();
void Close();
string getName();
string getVersion();
}
}

View File

@ -61,5 +61,13 @@ namespace OpenGrid.Framework.Data
/// </summary>
/// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks>
public string regionDataURI;
public string regionAssetURI;
public string regionAssetSendKey;
public string regionAssetRecvKey;
public string regionUserURI;
public string regionUserSendKey;
public string regionUserRecvKey;
}
}

View File

@ -53,7 +53,9 @@ namespace OpenGridServices.GridServer
//public LLUUID highestUUID;
private SimProfileManager m_simProfileManager;
// private SimProfileManager m_simProfileManager;
private GridManager m_gridManager;
private ConsoleBase m_console;
@ -82,6 +84,8 @@ namespace OpenGridServices.GridServer
{
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
MainConsole.Instance = m_console;
}
public void Startup()
@ -90,19 +94,19 @@ namespace OpenGridServices.GridServer
Cfg = this.LoadConfigDll(this.ConfigDll);
Cfg.InitConfig();
m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database");
m_simProfileManager = new SimProfileManager( this );
m_simProfileManager.LoadProfiles();
m_console.WriteLine("Main.cs:Startup() - Connecting to MySql Server");
m_gridManager = new GridManager();
m_gridManager.AddPlugin("OpenGrid.Framework.Data.MySQL.dll"); // Made of win
m_console.WriteLine("Main.cs:Startup() - Starting HTTP process");
BaseHttpServer httpServer = new BaseHttpServer(8001);
httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod);
httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod);
httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod);
httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod);
httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod);
httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod);
// lbsa71 : This code snippet taken from old http server.
@ -158,6 +162,7 @@ namespace OpenGridServices.GridServer
public void CheckSims(object sender, ElapsedEventArgs e)
{
/*
foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values)
{
string SimResponse = "";
@ -189,6 +194,7 @@ namespace OpenGridServices.GridServer
m_simProfileManager.SimProfiles[sim.UUID].online = false;
}
}
*/
}
public void RunCmd(string cmd, string[] cmdparams)

View File

@ -5,6 +5,9 @@ using libsecondlife;
namespace OpenSim.Framework.Sims
{
/// <summary>
/// Depreciated
/// </summary>
public class SimProfileBase
{
public LLUUID UUID;