From 8e562f04d1576bd51138ac656f796ba18965fdcf Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 6 Jan 2015 21:24:44 -0800 Subject: Donation of robust network connectors for estate service, as promised. This allows to have one central database for estates without having to open the MySql port. This is off by default, so not to disturb everyone's existing installations. To use it, see GridCommon.ini.example [EstateDataStore] section and Robust*.ini.example's new additions. Note that I also made things consistent by removing both the EstateDataService and the SimulationService into their own dlls, just like all other services. They really didn't belong in Services.Connectors, since everything in that component is about network connectors to robust backends. We may have too many dlls, and at some point it might not be a bad idea to merge all services into one single dll, since they all have more or less the same dependencies. --- .../Handlers/Estate/EstateDataRobustConnector.cs | 345 +++++++++++++++++++++ .../Connectors/Estate/EstateDataConnector.cs | 340 ++++++++++++++++++++ .../Connectors/Simulation/EstateDataService.cs | 139 --------- .../Connectors/Simulation/SimulationDataService.cs | 192 ------------ .../Services/EstateService/EstateDataService.cs | 136 ++++++++ .../SimulationService/SimulationDataService.cs | 191 ++++++++++++ bin/Robust.HG.ini.example | 4 + bin/Robust.ini.example | 5 + bin/config-include/Grid.ini | 4 +- bin/config-include/GridCommon.ini.example | 10 + bin/config-include/GridHypergrid.ini | 4 +- bin/config-include/SimianGrid.ini | 4 +- bin/config-include/Standalone.ini | 4 +- bin/config-include/StandaloneHypergrid.ini | 4 +- prebuild.xml | 63 ++++ 15 files changed, 1104 insertions(+), 341 deletions(-) create mode 100644 OpenSim/Server/Handlers/Estate/EstateDataRobustConnector.cs create mode 100644 OpenSim/Services/Connectors/Estate/EstateDataConnector.cs delete mode 100644 OpenSim/Services/Connectors/Simulation/EstateDataService.cs delete mode 100644 OpenSim/Services/Connectors/Simulation/SimulationDataService.cs create mode 100644 OpenSim/Services/EstateService/EstateDataService.cs create mode 100644 OpenSim/Services/SimulationService/SimulationDataService.cs diff --git a/OpenSim/Server/Handlers/Estate/EstateDataRobustConnector.cs b/OpenSim/Server/Handlers/Estate/EstateDataRobustConnector.cs new file mode 100644 index 0000000..4fe74f9 --- /dev/null +++ b/OpenSim/Server/Handlers/Estate/EstateDataRobustConnector.cs @@ -0,0 +1,345 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Net; + +using Nini.Config; +using log4net; +using OpenMetaverse; + +using OpenSim.Server.Base; +using OpenSim.Services.Interfaces; +using OpenSim.Framework; +using OpenSim.Framework.ServiceAuth; +using OpenSim.Framework.Servers.HttpServer; +using OpenSim.Server.Handlers.Base; + +namespace OpenSim.Server.Handlers +{ + public class EstateDataRobustConnector : ServiceConnector + { + private string m_ConfigName = "EstateService"; + + public EstateDataRobustConnector(IConfigSource config, IHttpServer server, string configName) : + base(config, server, configName) + { + IConfig serverConfig = config.Configs[m_ConfigName]; + if (serverConfig == null) + throw new Exception(String.Format("No section {0} in config file", m_ConfigName)); + + string service = serverConfig.GetString("LocalServiceModule", + String.Empty); + + if (service == String.Empty) + throw new Exception("No LocalServiceModule in config file"); + + Object[] args = new Object[] { config }; + IEstateDataService e_service = ServerUtils.LoadPlugin(service, args); + + IServiceAuth auth = ServiceAuth.Create(config, m_ConfigName); ; + + server.AddStreamHandler(new EstateServerGetHandler(e_service, auth)); + server.AddStreamHandler(new EstateServerPostHandler(e_service, auth)); + } + } + + + public class EstateServerGetHandler : BaseStreamHandler + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + IEstateDataService m_EstateService; + + // Possibilities + // /estates/estate/?region=uuid&create=[t|f] + // /estates/estate/?eid=int + // /estates/?name=string + // /estates/?owner=uuid + // /estates/ (all) + // /estates/regions/?eid=int + + public EstateServerGetHandler(IEstateDataService service, IServiceAuth auth) : + base("GET", "/estates", auth) + { + m_EstateService = service; + } + + protected override byte[] ProcessRequest(string path, Stream request, + IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + byte[] result = new byte[0]; + Dictionary data = null; + + string[] p = SplitParams(path); + + // /estates/ (all) + // /estates/?name=string + // /estates/?owner=uuid + if (p.Length == 0) + data = GetEstates(httpRequest, httpResponse); + else + { + string resource = p[0]; + + // /estates/estate/?region=uuid&create=[t|f] + // /estates/estate/?eid=int + if ("estate".Equals(resource)) + data = GetEstate(httpRequest, httpResponse); + // /estates/regions/?eid=int + else if ("regions".Equals(resource)) + data = GetRegions(httpRequest, httpResponse); + } + + if (data == null) + data = new Dictionary(); + + string xmlString = ServerUtils.BuildXmlResponse(data); + return Util.UTF8NoBomEncoding.GetBytes(xmlString); + + } + + private Dictionary GetEstates(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + // /estates/ (all) + // /estates/?name=string + // /estates/?owner=uuid + + Dictionary data = null; + string name = (string)httpRequest.Query["name"]; + string owner = (string)httpRequest.Query["owner"]; + + if (!string.IsNullOrEmpty(name) || !string.IsNullOrEmpty(owner)) + { + List estateIDs = null; + if (!string.IsNullOrEmpty(name)) + { + estateIDs = m_EstateService.GetEstates(name); + } + else if (!string.IsNullOrEmpty(owner)) + { + UUID ownerID = UUID.Zero; + if (UUID.TryParse(owner, out ownerID)) + estateIDs = m_EstateService.GetEstatesByOwner(ownerID); + } + + if (estateIDs == null || (estateIDs != null && estateIDs.Count == 0)) + httpResponse.StatusCode = (int)HttpStatusCode.NotFound; + else + { + httpResponse.StatusCode = (int)HttpStatusCode.OK; + httpResponse.ContentType = "text/xml"; + data = new Dictionary(); + int i = 0; + foreach (int id in estateIDs) + data["estate" + i++] = id; + } + } + else + { + List estates = m_EstateService.LoadEstateSettingsAll(); + if (estates == null || estates.Count == 0) + { + httpResponse.StatusCode = (int)HttpStatusCode.NotFound; + } + else + { + httpResponse.StatusCode = (int)HttpStatusCode.OK; + httpResponse.ContentType = "text/xml"; + data = new Dictionary(); + int i = 0; + foreach (EstateSettings es in estates) + data["estate" + i++] = es.ToMap(); + + } + } + + return data; + } + + private Dictionary GetEstate(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + // /estates/estate/?region=uuid&create=[t|f] + // /estates/estate/?eid=int + Dictionary data = null; + string region = (string)httpRequest.Query["region"]; + string eid = (string)httpRequest.Query["eid"]; + + EstateSettings estate = null; + + if (!string.IsNullOrEmpty(region)) + { + UUID regionID = UUID.Zero; + if (UUID.TryParse(region, out regionID)) + { + string create = (string)httpRequest.Query["create"]; + bool createYN = false; + Boolean.TryParse(create, out createYN); + estate = m_EstateService.LoadEstateSettings(regionID, createYN); + } + } + else if (!string.IsNullOrEmpty(eid)) + { + int id = 0; + if (Int32.TryParse(eid, out id)) + estate = m_EstateService.LoadEstateSettings(id); + } + + if (estate != null) + { + httpResponse.StatusCode = (int)HttpStatusCode.OK; + httpResponse.ContentType = "text/xml"; + data = estate.ToMap(); + } + else + httpResponse.StatusCode = (int)HttpStatusCode.NotFound; + + return data; + } + + private Dictionary GetRegions(IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + // /estates/regions/?eid=int + Dictionary data = null; + string eid = (string)httpRequest.Query["eid"]; + + httpResponse.StatusCode = (int)HttpStatusCode.NotFound; + if (!string.IsNullOrEmpty(eid)) + { + int id = 0; + if (Int32.TryParse(eid, out id)) + { + List regions = m_EstateService.GetRegions(id); + if (regions != null && regions.Count > 0) + { + data = new Dictionary(); + int i = 0; + foreach (UUID uuid in regions) + data["region" + i++] = uuid.ToString(); + httpResponse.StatusCode = (int)HttpStatusCode.OK; + httpResponse.ContentType = "text/xml"; + } + } + } + + return data; + } + } + + public class EstateServerPostHandler : BaseStreamHandler + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + IEstateDataService m_EstateService; + + // Possibilities + // /estates/estate/ (post an estate) + // /estates/estate/?eid=int®ion=uuid (link a region to an estate) + + public EstateServerPostHandler(IEstateDataService service, IServiceAuth auth) : + base("POST", "/estates", auth) + { + m_EstateService = service; + } + + protected override byte[] ProcessRequest(string path, Stream request, + IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + byte[] result = new byte[0]; + Dictionary data = null; + + string[] p = SplitParams(path); + + if (p.Length > 0) + { + string resource = p[0]; + + // /estates/estate/ + // /estates/estate/?eid=int®ion=uuid + if ("estate".Equals(resource)) + { + StreamReader sr = new StreamReader(request); + string body = sr.ReadToEnd(); + sr.Close(); + body = body.Trim(); + + Dictionary requestData = ServerUtils.ParseQueryString(body); + + data = UpdateEstate(requestData, httpRequest, httpResponse); + } + } + + if (data == null) + data = new Dictionary(); + + string xmlString = ServerUtils.BuildXmlResponse(data); + return Util.UTF8NoBomEncoding.GetBytes(xmlString); + + } + + private Dictionary UpdateEstate(Dictionary requestData, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) + { + // /estates/estate/ + // /estates/estate/?eid=int®ion=uuid + Dictionary result = new Dictionary(); + string eid = (string)httpRequest.Query["eid"]; + string region = (string)httpRequest.Query["region"]; + + httpResponse.StatusCode = (int)HttpStatusCode.NotFound; + + if (string.IsNullOrEmpty(eid) && string.IsNullOrEmpty(region) && + requestData.ContainsKey("OP") && requestData["OP"] != null && "STORE".Equals(requestData["OP"])) + { + // /estates/estate/ + EstateSettings es = new EstateSettings(requestData); + m_EstateService.StoreEstateSettings(es); + //m_log.DebugFormat("[EstateServerPostHandler]: Store estate {0}", es.ToString()); + httpResponse.StatusCode = (int)HttpStatusCode.OK; + result["Result"] = true; + } + else if (!string.IsNullOrEmpty(region) && !string.IsNullOrEmpty(eid) && + requestData.ContainsKey("OP") && requestData["OP"] != null && "LINK".Equals(requestData["OP"])) + { + int id = 0; + UUID regionID = UUID.Zero; + if (UUID.TryParse(region, out regionID) && Int32.TryParse(eid, out id)) + { + m_log.DebugFormat("[EstateServerPostHandler]: Link region {0} to estate {1}", regionID, id); + httpResponse.StatusCode = (int)HttpStatusCode.OK; + result["Result"] = m_EstateService.LinkRegion(regionID, id); + } + } + else + m_log.WarnFormat("[EstateServerPostHandler]: something wrong with POST request {0}", httpRequest.RawUrl); + + return result; + } + + } +} diff --git a/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs new file mode 100644 index 0000000..9d01b47 --- /dev/null +++ b/OpenSim/Services/Connectors/Estate/EstateDataConnector.cs @@ -0,0 +1,340 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +using System; +using System.Collections.Generic; +using System.Net; +using System.Reflection; + +using log4net; + +using OpenMetaverse; +using Nini.Config; + +using OpenSim.Framework; +using OpenSim.Framework.ServiceAuth; +using OpenSim.Services.Connectors; +using OpenSim.Services.Interfaces; +using OpenSim.Server.Base; + +namespace OpenSim.Service.Connectors +{ + public class EstateDataRemoteConnector : BaseServiceConnector, IEstateDataService + { + private static readonly ILog m_log = + LogManager.GetLogger( + MethodBase.GetCurrentMethod().DeclaringType); + + private string m_ServerURI = String.Empty; + private ExpiringCache> m_EstateCache = new ExpiringCache>(); + private const int EXPIRATION = 5 * 60; // 5 minutes in secs + + public EstateDataRemoteConnector(IConfigSource source) + { + Initialise(source); + } + + public virtual void Initialise(IConfigSource source) + { + IConfig gridConfig = source.Configs["EstateService"]; + if (gridConfig == null) + { + m_log.Error("[ESTATE CONNECTOR]: EstateService missing from OpenSim.ini"); + throw new Exception("Estate connector init error"); + } + + string serviceURI = gridConfig.GetString("EstateServerURI", + String.Empty); + + if (serviceURI == String.Empty) + { + m_log.Error("[ESTATE CONNECTOR]: No Server URI named in section EstateService"); + throw new Exception("Estate connector init error"); + } + m_ServerURI = serviceURI; + + base.Initialise(source, "EstateService"); + } + + #region IEstateDataService + + public List LoadEstateSettingsAll() + { + string reply = string.Empty; + string uri = m_ServerURI + "/estates"; + + reply = MakeRequest("GET", uri, string.Empty); + if (String.IsNullOrEmpty(reply)) + return new List(); + + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + List estates = new List(); + if (replyData != null && replyData.Count > 0) + { + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettingsAll returned {0} elements", replyData.Count); + Dictionary.ValueCollection estateData = replyData.Values; + foreach (object r in estateData) + { + if (r is Dictionary) + { + EstateSettings es = new EstateSettings((Dictionary)r); + estates.Add(es); + } + } + m_EstateCache.AddOrUpdate("estates", estates, EXPIRATION); + } + else + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettingsAll from {0} received null or zero response", uri); + + return estates; + + } + + public List GetEstatesAll() + { + List eids = new List(); + // If we don't have them, load them from the server + List estates = null; + if (!m_EstateCache.TryGetValue("estates", out estates)) + LoadEstateSettingsAll(); + + foreach (EstateSettings es in estates) + eids.Add((int)es.EstateID); + + return eids; + } + + public List GetEstates(string search) + { + // If we don't have them, load them from the server + List estates = null; + if (!m_EstateCache.TryGetValue("estates", out estates)) + LoadEstateSettingsAll(); + + List eids = new List(); + foreach (EstateSettings es in estates) + if (es.EstateName == search) + eids.Add((int)es.EstateID); + + return eids; + } + + public List GetEstatesByOwner(UUID ownerID) + { + // If we don't have them, load them from the server + List estates = null; + if (!m_EstateCache.TryGetValue("estates", out estates)) + LoadEstateSettingsAll(); + + List eids = new List(); + foreach (EstateSettings es in estates) + if (es.EstateOwner == ownerID) + eids.Add((int)es.EstateID); + + return eids; + } + + public List GetRegions(int estateID) + { + string reply = string.Empty; + // /estates/regions/?eid=int + string uri = m_ServerURI + "/estates/regions/?eid=" + estateID.ToString(); + + reply = MakeRequest("GET", uri, string.Empty); + if (String.IsNullOrEmpty(reply)) + return new List(); + + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + List regions = new List(); + if (replyData != null && replyData.Count > 0) + { + m_log.DebugFormat("[ESTATE CONNECTOR]: GetRegions for estate {0} returned {1} elements", estateID, replyData.Count); + Dictionary.ValueCollection data = replyData.Values; + foreach (object r in data) + { + UUID uuid = UUID.Zero; + if (UUID.TryParse(r.ToString(), out uuid)) + regions.Add(uuid); + } + } + else + m_log.DebugFormat("[ESTATE CONNECTOR]: GetRegions from {0} received null or zero response", uri); + + return regions; + } + + public EstateSettings LoadEstateSettings(UUID regionID, bool create) + { + string reply = string.Empty; + // /estates/estate/?region=uuid&create=[t|f] + string uri = m_ServerURI + string.Format("/estates/estate/?region={0}&create={1}", regionID, create); + + reply = MakeRequest("GET", uri, string.Empty); + if (String.IsNullOrEmpty(reply)) + return null; + + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null && replyData.Count > 0) + { + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettings({0}) returned {1} elements", regionID, replyData.Count); + EstateSettings es = new EstateSettings(replyData); + return es; + } + else + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettings(regionID) from {0} received null or zero response", uri); + + return null; + } + + public EstateSettings LoadEstateSettings(int estateID) + { + string reply = string.Empty; + // /estates/estate/?eid=int + string uri = m_ServerURI + string.Format("/estates/estate/?eid={0}", estateID); + + reply = MakeRequest("GET", uri, string.Empty); + if (String.IsNullOrEmpty(reply)) + return null; + + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + if (replyData != null && replyData.Count > 0) + { + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettings({0}) returned {1} elements", estateID, replyData.Count); + EstateSettings es = new EstateSettings(replyData); + return es; + } + else + m_log.DebugFormat("[ESTATE CONNECTOR]: LoadEstateSettings(estateID) from {0} received null or zero response", uri); + + return null; + } + + /// + /// Forbidden operation + /// + /// + public EstateSettings CreateNewEstate() + { + // No can do + return null; + } + + public void StoreEstateSettings(EstateSettings es) + { + string reply = string.Empty; + // /estates/estate/ + string uri = m_ServerURI + ("/estates/estate"); + + Dictionary formdata = es.ToMap(); + formdata["OP"] = "STORE"; + + PostRequest(uri, formdata); + } + + public bool LinkRegion(UUID regionID, int estateID) + { + string reply = string.Empty; + // /estates/estate/?eid=int®ion=uuid + string uri = m_ServerURI + String.Format("/estates/estate/?eid={0}®ion={1}", estateID, regionID); + + Dictionary formdata = new Dictionary(); + formdata["OP"] = "LINK"; + return PostRequest(uri, formdata); + } + + private bool PostRequest(string uri, Dictionary sendData) + { + string reqString = ServerUtils.BuildQueryString(sendData); + + string reply = MakeRequest("POST", uri, reqString); + if (String.IsNullOrEmpty(reply)) + return false; + + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); + + bool result = false; + if (replyData != null && replyData.Count > 0) + { + if (replyData.ContainsKey("Result")) + { + if (Boolean.TryParse(replyData["Result"].ToString(), out result)) + m_log.DebugFormat("[ESTATE CONNECTOR]: PostRequest {0} returned {1}", uri, result); + } + } + else + m_log.DebugFormat("[ESTATE CONNECTOR]: PostRequest {0} received null or zero response", uri); + + return result; + } + + /// + /// Forbidden operation + /// + /// + public bool DeleteEstate(int estateID) + { + return false; + } + + #endregion + + private string MakeRequest(string verb, string uri, string formdata) + { + string reply = string.Empty; + try + { + reply = SynchronousRestFormsRequester.MakeRequest(verb, uri, formdata, m_Auth); + } + catch (WebException e) + { + using (HttpWebResponse hwr = (HttpWebResponse)e.Response) + { + if (hwr != null) + { + if (hwr.StatusCode == HttpStatusCode.NotFound) + m_log.Error(string.Format("[ESTATE CONNECTOR]: Resource {0} not found ", uri)); + if (hwr.StatusCode == HttpStatusCode.Unauthorized) + m_log.Error(string.Format("[ESTATE CONNECTOR]: Web request {0} requires authentication ", uri)); + } + else + m_log.Error(string.Format( + "[ESTATE CONNECTOR]: WebException for {0} {1} {2} ", + verb, uri, formdata, e)); + } + } + catch (Exception e) + { + m_log.DebugFormat("[ESTATE CONNECTOR]: Exception when contacting estate server at {0}: {1}", uri, e.Message); + } + + return reply; + } + } +} diff --git a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs b/OpenSim/Services/Connectors/Simulation/EstateDataService.cs deleted file mode 100644 index 5962b99..0000000 --- a/OpenSim/Services/Connectors/Simulation/EstateDataService.cs +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using OpenMetaverse; -using log4net; -using Mono.Addins; -using Nini.Config; -using System.Reflection; -using OpenSim.Services.Base; -using OpenSim.Services.Interfaces; -using OpenSim.Data; -using OpenSim.Framework; -//using OpenSim.Region.Framework.Interfaces; -//using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Services.Connectors -{ - public class EstateDataService : ServiceBase, IEstateDataService - { -// private static readonly ILog m_log = -// LogManager.GetLogger( -// MethodBase.GetCurrentMethod().DeclaringType); - - protected IEstateDataStore m_database; - - public EstateDataService(IConfigSource config) - : base(config) - { - string dllName = String.Empty; - string connString = String.Empty; - - // Try reading the [DatabaseService] section, if it exists - IConfig dbConfig = config.Configs["DatabaseService"]; - if (dbConfig != null) - { - dllName = dbConfig.GetString("StorageProvider", String.Empty); - connString = dbConfig.GetString("ConnectionString", String.Empty); - connString = dbConfig.GetString("EstateConnectionString", connString); - } - - // Try reading the [EstateDataStore] section, if it exists - IConfig estConfig = config.Configs["EstateDataStore"]; - if (estConfig != null) - { - dllName = estConfig.GetString("StorageProvider", dllName); - connString = estConfig.GetString("ConnectionString", connString); - } - - // We tried, but this doesn't exist. We can't proceed - if (dllName == String.Empty) - throw new Exception("No StorageProvider configured"); - - m_database = LoadPlugin(dllName, new Object[] { connString }); - if (m_database == null) - throw new Exception("Could not find a storage interface in the given module"); - } - - public EstateSettings LoadEstateSettings(UUID regionID, bool create) - { - return m_database.LoadEstateSettings(regionID, create); - } - - public EstateSettings LoadEstateSettings(int estateID) - { - return m_database.LoadEstateSettings(estateID); - } - - public EstateSettings CreateNewEstate() - { - return m_database.CreateNewEstate(); - } - - public List LoadEstateSettingsAll() - { - return m_database.LoadEstateSettingsAll(); - } - - public void StoreEstateSettings(EstateSettings es) - { - m_database.StoreEstateSettings(es); - } - - public List GetEstates(string search) - { - return m_database.GetEstates(search); - } - - public List GetEstatesAll() - { - return m_database.GetEstatesAll(); - } - - public List GetEstatesByOwner(UUID ownerID) - { - return m_database.GetEstatesByOwner(ownerID); - } - - public bool LinkRegion(UUID regionID, int estateID) - { - return m_database.LinkRegion(regionID, estateID); - } - - public List GetRegions(int estateID) - { - return m_database.GetRegions(estateID); - } - - public bool DeleteEstate(int estateID) - { - return m_database.DeleteEstate(estateID); - } - } -} diff --git a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs b/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs deleted file mode 100644 index 2cbf967..0000000 --- a/OpenSim/Services/Connectors/Simulation/SimulationDataService.cs +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright (c) Contributors, http://opensimulator.org/ - * See CONTRIBUTORS.TXT for a full list of copyright holders. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * * Neither the name of the OpenSimulator Project nor the - * names of its contributors may be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -using System; -using System.Collections.Generic; -using OpenMetaverse; -using log4net; -using Mono.Addins; -using Nini.Config; -using System.Reflection; -using OpenSim.Services.Base; -using OpenSim.Services.Interfaces; -using OpenSim.Data; -using OpenSim.Framework; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Services.Connectors -{ - public class SimulationDataService : ServiceBase, ISimulationDataService - { -// private static readonly ILog m_log = -// LogManager.GetLogger( -// MethodBase.GetCurrentMethod().DeclaringType); - - protected ISimulationDataStore m_database; - - public SimulationDataService(IConfigSource config) - : base(config) - { - string dllName = String.Empty; - string connString = String.Empty; - - // Try reading the [DatabaseService] section, if it exists - IConfig dbConfig = config.Configs["DatabaseService"]; - if (dbConfig != null) - { - dllName = dbConfig.GetString("StorageProvider", String.Empty); - connString = dbConfig.GetString("ConnectionString", String.Empty); - } - - // Try reading the [SimulationDataStore] section - IConfig simConfig = config.Configs["SimulationDataStore"]; - if (simConfig != null) - { - dllName = simConfig.GetString("StorageProvider", dllName); - connString = simConfig.GetString("ConnectionString", connString); - } - - // We tried, but this doesn't exist. We can't proceed - if (dllName == String.Empty) - throw new Exception("No StorageProvider configured"); - - m_database = LoadPlugin(dllName, new Object[] { connString }); - if (m_database == null) - throw new Exception("Could not find a storage interface in the given module"); - } - - public void StoreObject(SceneObjectGroup obj, UUID regionUUID) - { - m_database.StoreObject(obj, regionUUID); - } - - public void RemoveObject(UUID uuid, UUID regionUUID) - { - m_database.RemoveObject(uuid, regionUUID); - } - - public void StorePrimInventory(UUID primID, ICollection items) - { - m_database.StorePrimInventory(primID, items); - } - - public List LoadObjects(UUID regionUUID) - { - return m_database.LoadObjects(regionUUID); - } - - public void StoreTerrain(TerrainData terrain, UUID regionID) - { - m_database.StoreTerrain(terrain, regionID); - } - - public void StoreTerrain(double[,] terrain, UUID regionID) - { - m_database.StoreTerrain(terrain, regionID); - } - - public double[,] LoadTerrain(UUID regionID) - { - return m_database.LoadTerrain(regionID); - } - - public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) - { - return m_database.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); - } - - public void StoreLandObject(ILandObject Parcel) - { - m_database.StoreLandObject(Parcel); - } - - public void RemoveLandObject(UUID globalID) - { - m_database.RemoveLandObject(globalID); - } - - public List LoadLandObjects(UUID regionUUID) - { - return m_database.LoadLandObjects(regionUUID); - } - - public void StoreRegionSettings(RegionSettings rs) - { - m_database.StoreRegionSettings(rs); - } - - public RegionSettings LoadRegionSettings(UUID regionUUID) - { - return m_database.LoadRegionSettings(regionUUID); - } - - public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) - { - return m_database.LoadRegionWindlightSettings(regionUUID); - } - - public void StoreRegionWindlightSettings(RegionLightShareData wl) - { - m_database.StoreRegionWindlightSettings(wl); - } - public void RemoveRegionWindlightSettings(UUID regionID) - { - m_database.RemoveRegionWindlightSettings(regionID); - } - - public string LoadRegionEnvironmentSettings(UUID regionUUID) - { - return m_database.LoadRegionEnvironmentSettings(regionUUID); - } - - public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) - { - m_database.StoreRegionEnvironmentSettings(regionUUID, settings); - } - - public void RemoveRegionEnvironmentSettings(UUID regionUUID) - { - m_database.RemoveRegionEnvironmentSettings(regionUUID); - } - - public void SaveExtra(UUID regionID, string name, string val) - { - m_database.SaveExtra(regionID, name, val); - } - - public void RemoveExtra(UUID regionID, string name) - { - m_database.RemoveExtra(regionID, name); - } - - public Dictionary GetExtra(UUID regionID) - { - return m_database.GetExtra(regionID); - } - } -} diff --git a/OpenSim/Services/EstateService/EstateDataService.cs b/OpenSim/Services/EstateService/EstateDataService.cs new file mode 100644 index 0000000..f6a8654 --- /dev/null +++ b/OpenSim/Services/EstateService/EstateDataService.cs @@ -0,0 +1,136 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using OpenMetaverse; +using log4net; +using Nini.Config; +using System.Reflection; +using OpenSim.Services.Base; +using OpenSim.Services.Interfaces; +using OpenSim.Data; +using OpenSim.Framework; + +namespace OpenSim.Services.EstateService +{ + public class EstateDataService : ServiceBase, IEstateDataService + { +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); + + protected IEstateDataStore m_database; + + public EstateDataService(IConfigSource config) + : base(config) + { + string dllName = String.Empty; + string connString = String.Empty; + + // Try reading the [DatabaseService] section, if it exists + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + dllName = dbConfig.GetString("StorageProvider", String.Empty); + connString = dbConfig.GetString("ConnectionString", String.Empty); + connString = dbConfig.GetString("EstateConnectionString", connString); + } + + // Try reading the [EstateDataStore] section, if it exists + IConfig estConfig = config.Configs["EstateDataStore"]; + if (estConfig != null) + { + dllName = estConfig.GetString("StorageProvider", dllName); + connString = estConfig.GetString("ConnectionString", connString); + } + + // We tried, but this doesn't exist. We can't proceed + if (dllName == String.Empty) + throw new Exception("No StorageProvider configured"); + + m_database = LoadPlugin(dllName, new Object[] { connString }); + if (m_database == null) + throw new Exception("Could not find a storage interface in the given module"); + } + + public EstateSettings LoadEstateSettings(UUID regionID, bool create) + { + return m_database.LoadEstateSettings(regionID, create); + } + + public EstateSettings LoadEstateSettings(int estateID) + { + return m_database.LoadEstateSettings(estateID); + } + + public EstateSettings CreateNewEstate() + { + return m_database.CreateNewEstate(); + } + + public List LoadEstateSettingsAll() + { + return m_database.LoadEstateSettingsAll(); + } + + public void StoreEstateSettings(EstateSettings es) + { + m_database.StoreEstateSettings(es); + } + + public List GetEstates(string search) + { + return m_database.GetEstates(search); + } + + public List GetEstatesAll() + { + return m_database.GetEstatesAll(); + } + + public List GetEstatesByOwner(UUID ownerID) + { + return m_database.GetEstatesByOwner(ownerID); + } + + public bool LinkRegion(UUID regionID, int estateID) + { + return m_database.LinkRegion(regionID, estateID); + } + + public List GetRegions(int estateID) + { + return m_database.GetRegions(estateID); + } + + public bool DeleteEstate(int estateID) + { + return m_database.DeleteEstate(estateID); + } + } +} diff --git a/OpenSim/Services/SimulationService/SimulationDataService.cs b/OpenSim/Services/SimulationService/SimulationDataService.cs new file mode 100644 index 0000000..d9684c4 --- /dev/null +++ b/OpenSim/Services/SimulationService/SimulationDataService.cs @@ -0,0 +1,191 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using OpenMetaverse; +using log4net; +using Nini.Config; +using System.Reflection; +using OpenSim.Services.Base; +using OpenSim.Services.Interfaces; +using OpenSim.Data; +using OpenSim.Framework; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Services.SimulationService +{ + public class SimulationDataService : ServiceBase, ISimulationDataService + { +// private static readonly ILog m_log = +// LogManager.GetLogger( +// MethodBase.GetCurrentMethod().DeclaringType); + + protected ISimulationDataStore m_database; + + public SimulationDataService(IConfigSource config) + : base(config) + { + string dllName = String.Empty; + string connString = String.Empty; + + // Try reading the [DatabaseService] section, if it exists + IConfig dbConfig = config.Configs["DatabaseService"]; + if (dbConfig != null) + { + dllName = dbConfig.GetString("StorageProvider", String.Empty); + connString = dbConfig.GetString("ConnectionString", String.Empty); + } + + // Try reading the [SimulationDataStore] section + IConfig simConfig = config.Configs["SimulationDataStore"]; + if (simConfig != null) + { + dllName = simConfig.GetString("StorageProvider", dllName); + connString = simConfig.GetString("ConnectionString", connString); + } + + // We tried, but this doesn't exist. We can't proceed + if (dllName == String.Empty) + throw new Exception("No StorageProvider configured"); + + m_database = LoadPlugin(dllName, new Object[] { connString }); + if (m_database == null) + throw new Exception("Could not find a storage interface in the given module"); + } + + public void StoreObject(SceneObjectGroup obj, UUID regionUUID) + { + m_database.StoreObject(obj, regionUUID); + } + + public void RemoveObject(UUID uuid, UUID regionUUID) + { + m_database.RemoveObject(uuid, regionUUID); + } + + public void StorePrimInventory(UUID primID, ICollection items) + { + m_database.StorePrimInventory(primID, items); + } + + public List LoadObjects(UUID regionUUID) + { + return m_database.LoadObjects(regionUUID); + } + + public void StoreTerrain(TerrainData terrain, UUID regionID) + { + m_database.StoreTerrain(terrain, regionID); + } + + public void StoreTerrain(double[,] terrain, UUID regionID) + { + m_database.StoreTerrain(terrain, regionID); + } + + public double[,] LoadTerrain(UUID regionID) + { + return m_database.LoadTerrain(regionID); + } + + public TerrainData LoadTerrain(UUID regionID, int pSizeX, int pSizeY, int pSizeZ) + { + return m_database.LoadTerrain(regionID, pSizeX, pSizeY, pSizeZ); + } + + public void StoreLandObject(ILandObject Parcel) + { + m_database.StoreLandObject(Parcel); + } + + public void RemoveLandObject(UUID globalID) + { + m_database.RemoveLandObject(globalID); + } + + public List LoadLandObjects(UUID regionUUID) + { + return m_database.LoadLandObjects(regionUUID); + } + + public void StoreRegionSettings(RegionSettings rs) + { + m_database.StoreRegionSettings(rs); + } + + public RegionSettings LoadRegionSettings(UUID regionUUID) + { + return m_database.LoadRegionSettings(regionUUID); + } + + public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) + { + return m_database.LoadRegionWindlightSettings(regionUUID); + } + + public void StoreRegionWindlightSettings(RegionLightShareData wl) + { + m_database.StoreRegionWindlightSettings(wl); + } + public void RemoveRegionWindlightSettings(UUID regionID) + { + m_database.RemoveRegionWindlightSettings(regionID); + } + + public string LoadRegionEnvironmentSettings(UUID regionUUID) + { + return m_database.LoadRegionEnvironmentSettings(regionUUID); + } + + public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings) + { + m_database.StoreRegionEnvironmentSettings(regionUUID, settings); + } + + public void RemoveRegionEnvironmentSettings(UUID regionUUID) + { + m_database.RemoveRegionEnvironmentSettings(regionUUID); + } + + public void SaveExtra(UUID regionID, string name, string val) + { + m_database.SaveExtra(regionID, name, val); + } + + public void RemoveExtra(UUID regionID, string name) + { + m_database.RemoveExtra(regionID, name); + } + + public Dictionary GetExtra(UUID regionID) + { + return m_database.GetExtra(regionID); + } + } +} diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 71ce6ad..46dbc17 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -110,6 +110,8 @@ ;; Uncomment for UserProfiles see [UserProfilesService] to configure... ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" + ;; Uncomment if you want to have centralized estate data + ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" ; * This is common for all services, it's the network setup for the entire ; * server instance, if none is specified above @@ -379,6 +381,8 @@ ; for the server connector LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService" +[EstateService] + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [LibraryService] LibraryName = "OpenSim Library" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index a7b39a3..687bb2e 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -89,6 +89,9 @@ ;; Uncomment for UserProfiles see [UserProfilesService] to configure... ; UserProfilesServiceConnector = "${Const|PublicPort}/OpenSim.Server.Handlers.dll:UserProfilesConnector" + ;; Uncomment if you want to have centralized estate data + ; EstateDataService = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:EstateDataRobustConnector" + ; * This is common for all services, it's the network setup for the entire ; * server instance, if none is specified above ; * @@ -339,6 +342,8 @@ ; for the server connector LocalServiceModule = "OpenSim.Services.FriendsService.dll:FriendsService" +[EstateService] + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [LibraryService] LibraryName = "OpenSim Library" diff --git a/bin/config-include/Grid.ini b/bin/config-include/Grid.ini index e9eaee3..42ecec2 100644 --- a/bin/config-include/Grid.ini +++ b/bin/config-include/Grid.ini @@ -46,10 +46,10 @@ ConnectorProtocolVersion = "SIMULATION/0.3" [SimulationDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" + LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" [EstateDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [GridService] LocalServiceModule = "OpenSim.Services.GridService.dll:GridService" diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example index 903641e..bffc504 100644 --- a/bin/config-include/GridCommon.ini.example +++ b/bin/config-include/GridCommon.ini.example @@ -108,6 +108,16 @@ ;; Robust server in port ${Const|PublicPort}, but not always) Gatekeeper="${Const|BaseURL}:${Const|PublicPort}" +[EstateDataStore] + ; + ; Uncomment if you want centralized estate data at robust server, + ; in which case the URL in [EstateService] will be used + ; + ;LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataConnector" + +[EstateService] + EstateServerURI = "${Const|BaseURL}:${Const|PrivatePort}" + [Messaging] ; === HG ONLY === ;; Change this to the address of your Gatekeeper service diff --git a/bin/config-include/GridHypergrid.ini b/bin/config-include/GridHypergrid.ini index 8dadd76..8b47ede 100644 --- a/bin/config-include/GridHypergrid.ini +++ b/bin/config-include/GridHypergrid.ini @@ -54,10 +54,10 @@ Module = "BasicProfileModule" [SimulationDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" + LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" [EstateDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [AssetService] LocalGridAssetService = "OpenSim.Services.Connectors.dll:AssetServicesConnector" diff --git a/bin/config-include/SimianGrid.ini b/bin/config-include/SimianGrid.ini index 311a55b..8e42fab 100644 --- a/bin/config-include/SimianGrid.ini +++ b/bin/config-include/SimianGrid.ini @@ -42,10 +42,10 @@ AssetCaching = "FlotsamAssetCache" [SimulationDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" + LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" [EstateDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [Friends] Connector = "OpenSim.Services.Connectors.dll:SimianFriendsServiceConnector" diff --git a/bin/config-include/Standalone.ini b/bin/config-include/Standalone.ini index 887f4d8..398a76c 100644 --- a/bin/config-include/Standalone.ini +++ b/bin/config-include/Standalone.ini @@ -43,10 +43,10 @@ ConnectorProtocolVersion = "SIMULATION/0.3" [SimulationDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" + LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" [EstateDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [AssetService] LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" diff --git a/bin/config-include/StandaloneHypergrid.ini b/bin/config-include/StandaloneHypergrid.ini index a3c7fa6..102947a 100644 --- a/bin/config-include/StandaloneHypergrid.ini +++ b/bin/config-include/StandaloneHypergrid.ini @@ -58,10 +58,10 @@ LureModule = HGLureModule [SimulationDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:SimulationDataService" + LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService" [EstateDataStore] - LocalServiceModule = "OpenSim.Services.Connectors.dll:EstateDataService" + LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService" [AssetService] LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService" diff --git a/prebuild.xml b/prebuild.xml index 663d4da..771b7c7 100644 --- a/prebuild.xml +++ b/prebuild.xml @@ -839,6 +839,40 @@ + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + + + + + + @@ -1000,6 +1034,35 @@ + + + + ../../../bin/ + + + + + ../../../bin/ + + + + ../../../bin/ + + + + + + + + + + + + + + + + -- cgit v1.1