diff options
author | Adam Frisby | 2007-05-04 06:51:18 +0000 |
---|---|---|
committer | Adam Frisby | 2007-05-04 06:51:18 +0000 |
commit | 0c78fc3dbcb6414fe39afcf175a73bc1107c1910 (patch) | |
tree | 4a25f82c32dfc92d23e644ca35099b41cc67dcb0 | |
parent | Added Close() function to sanely terminate the grid data interfaces. Declarin... (diff) | |
download | opensim-SC-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.zip opensim-SC-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.gz opensim-SC-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.bz2 opensim-SC-0c78fc3dbcb6414fe39afcf175a73bc1107c1910.tar.xz |
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.
-rw-r--r-- | OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | 10 | ||||
-rw-r--r-- | OpenGrid.Framework.Data/GridData.cs | 2 | ||||
-rw-r--r-- | OpenGrid.Framework.Data/SimProfileData.cs | 8 | ||||
-rw-r--r-- | OpenGridServices.GridServer/Main.cs | 24 | ||||
-rw-r--r-- | OpenSim.Framework/SimProfileBase.cs | 3 |
5 files changed, 38 insertions, 9 deletions
diff --git a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs index 3db32f3..0a84cdb 100644 --- a/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs +++ b/OpenGrid.Framework.Data.MySQL/MySQLGridData.cs | |||
@@ -25,6 +25,16 @@ namespace OpenGrid.Framework.Data.MySQL | |||
25 | database.Close(); | 25 | database.Close(); |
26 | } | 26 | } |
27 | 27 | ||
28 | public string getName() | ||
29 | { | ||
30 | return "MySql OpenGridData"; | ||
31 | } | ||
32 | |||
33 | public string getVersion() | ||
34 | { | ||
35 | return "0.1"; | ||
36 | } | ||
37 | |||
28 | /// <summary> | 38 | /// <summary> |
29 | /// Returns a sim profile from it's location | 39 | /// Returns a sim profile from it's location |
30 | /// </summary> | 40 | /// </summary> |
diff --git a/OpenGrid.Framework.Data/GridData.cs b/OpenGrid.Framework.Data/GridData.cs index 8ace484..d6b5a2b 100644 --- a/OpenGrid.Framework.Data/GridData.cs +++ b/OpenGrid.Framework.Data/GridData.cs | |||
@@ -11,5 +11,7 @@ namespace OpenGrid.Framework.Data | |||
11 | bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); | 11 | bool AuthenticateSim(libsecondlife.LLUUID UUID, ulong regionHandle, string simrecvkey); |
12 | void Initialise(); | 12 | void Initialise(); |
13 | void Close(); | 13 | void Close(); |
14 | string getName(); | ||
15 | string getVersion(); | ||
14 | } | 16 | } |
15 | } | 17 | } |
diff --git a/OpenGrid.Framework.Data/SimProfileData.cs b/OpenGrid.Framework.Data/SimProfileData.cs index a701875..4cc9982 100644 --- a/OpenGrid.Framework.Data/SimProfileData.cs +++ b/OpenGrid.Framework.Data/SimProfileData.cs | |||
@@ -61,5 +61,13 @@ namespace OpenGrid.Framework.Data | |||
61 | /// </summary> | 61 | /// </summary> |
62 | /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks> | 62 | /// <remarks>Used for floating sim pools where the region data is not nessecarily coupled to a specific server</remarks> |
63 | public string regionDataURI; | 63 | public string regionDataURI; |
64 | |||
65 | public string regionAssetURI; | ||
66 | public string regionAssetSendKey; | ||
67 | public string regionAssetRecvKey; | ||
68 | |||
69 | public string regionUserURI; | ||
70 | public string regionUserSendKey; | ||
71 | public string regionUserRecvKey; | ||
64 | } | 72 | } |
65 | } | 73 | } |
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs index 69cba9c..f7cfe71 100644 --- a/OpenGridServices.GridServer/Main.cs +++ b/OpenGridServices.GridServer/Main.cs | |||
@@ -53,7 +53,9 @@ namespace OpenGridServices.GridServer | |||
53 | 53 | ||
54 | //public LLUUID highestUUID; | 54 | //public LLUUID highestUUID; |
55 | 55 | ||
56 | private SimProfileManager m_simProfileManager; | 56 | // private SimProfileManager m_simProfileManager; |
57 | |||
58 | private GridManager m_gridManager; | ||
57 | 59 | ||
58 | private ConsoleBase m_console; | 60 | private ConsoleBase m_console; |
59 | 61 | ||
@@ -82,6 +84,8 @@ namespace OpenGridServices.GridServer | |||
82 | { | 84 | { |
83 | m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false); | 85 | m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false); |
84 | MainConsole.Instance = m_console; | 86 | MainConsole.Instance = m_console; |
87 | |||
88 | |||
85 | } | 89 | } |
86 | 90 | ||
87 | public void Startup() | 91 | public void Startup() |
@@ -90,19 +94,19 @@ namespace OpenGridServices.GridServer | |||
90 | Cfg = this.LoadConfigDll(this.ConfigDll); | 94 | Cfg = this.LoadConfigDll(this.ConfigDll); |
91 | Cfg.InitConfig(); | 95 | Cfg.InitConfig(); |
92 | 96 | ||
93 | m_console.WriteLine("Main.cs:Startup() - Loading sim profiles from database"); | 97 | m_console.WriteLine("Main.cs:Startup() - Connecting to MySql Server"); |
94 | m_simProfileManager = new SimProfileManager( this ); | 98 | m_gridManager = new GridManager(); |
95 | m_simProfileManager.LoadProfiles(); | 99 | m_gridManager.AddPlugin("OpenGrid.Framework.Data.MySQL.dll"); // Made of win |
96 | 100 | ||
97 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); | 101 | m_console.WriteLine("Main.cs:Startup() - Starting HTTP process"); |
98 | BaseHttpServer httpServer = new BaseHttpServer(8001); | 102 | BaseHttpServer httpServer = new BaseHttpServer(8001); |
99 | 103 | ||
100 | httpServer.AddXmlRPCHandler("simulator_login", m_simProfileManager.XmlRpcLoginToSimulatorMethod); | 104 | httpServer.AddXmlRPCHandler("simulator_login", m_gridManager.XmlRpcLoginToSimulatorMethod); |
101 | 105 | ||
102 | httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod); | 106 | httpServer.AddRestHandler("GET", "/sims/", m_gridManager.RestGetSimMethod); |
103 | httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod); | 107 | httpServer.AddRestHandler("POST", "/sims/", m_gridManager.RestSetSimMethod); |
104 | httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod); | 108 | httpServer.AddRestHandler("GET", "/regions/", m_gridManager.RestGetRegionMethod); |
105 | httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod); | 109 | httpServer.AddRestHandler("POST", "/regions/", m_gridManager.RestSetRegionMethod); |
106 | 110 | ||
107 | 111 | ||
108 | // lbsa71 : This code snippet taken from old http server. | 112 | // lbsa71 : This code snippet taken from old http server. |
@@ -158,6 +162,7 @@ namespace OpenGridServices.GridServer | |||
158 | 162 | ||
159 | public void CheckSims(object sender, ElapsedEventArgs e) | 163 | public void CheckSims(object sender, ElapsedEventArgs e) |
160 | { | 164 | { |
165 | /* | ||
161 | foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) | 166 | foreach (SimProfileBase sim in m_simProfileManager.SimProfiles.Values) |
162 | { | 167 | { |
163 | string SimResponse = ""; | 168 | string SimResponse = ""; |
@@ -189,6 +194,7 @@ namespace OpenGridServices.GridServer | |||
189 | m_simProfileManager.SimProfiles[sim.UUID].online = false; | 194 | m_simProfileManager.SimProfiles[sim.UUID].online = false; |
190 | } | 195 | } |
191 | } | 196 | } |
197 | */ | ||
192 | } | 198 | } |
193 | 199 | ||
194 | public void RunCmd(string cmd, string[] cmdparams) | 200 | public void RunCmd(string cmd, string[] cmdparams) |
diff --git a/OpenSim.Framework/SimProfileBase.cs b/OpenSim.Framework/SimProfileBase.cs index ffc66ec..cea21f0 100644 --- a/OpenSim.Framework/SimProfileBase.cs +++ b/OpenSim.Framework/SimProfileBase.cs | |||
@@ -5,6 +5,9 @@ using libsecondlife; | |||
5 | 5 | ||
6 | namespace OpenSim.Framework.Sims | 6 | namespace OpenSim.Framework.Sims |
7 | { | 7 | { |
8 | /// <summary> | ||
9 | /// Depreciated | ||
10 | /// </summary> | ||
8 | public class SimProfileBase | 11 | public class SimProfileBase |
9 | { | 12 | { |
10 | public LLUUID UUID; | 13 | public LLUUID UUID; |