Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Kal Ahmed committed Nov 30, 2014
2 parents 8697c79 + c1a818c commit 14f7a59
Show file tree
Hide file tree
Showing 144 changed files with 87,798 additions and 491 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,5 @@ src/portable/BrightstarDB.Portable.Profile154/Properties/AssemblyInfo.cs
src/core/UpgradeLog.htm
src/core/UpgradeLog2.htm
src/core/UpgradeLog3.htm
src/mobile/BrightstarDB.Mobile/Properties/AssemblyInfo.cs
src/portable/BrightstarDB.Portable.iOS/Properties/AssemblyInfo.cs
4 changes: 2 additions & 2 deletions common.proj
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
with the MSBuild Community Tasks Version task under monodevelop -->
<PropertyGroup>
<Major>1</Major>
<Minor>7</Minor>
<Build>1</Build>
<Minor>8</Minor>
<Build>0</Build>
<Revision>0</Revision>
</PropertyGroup>

Expand Down
38 changes: 38 additions & 0 deletions doc/src/Concurrency.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.. _Concurrency:

===============================
Concurrency and Multi-threading
===============================

This section covers the use of BrightstarDB in a variety of concurrent-access and multi-threading scenarios and describes BrightstarDB's


Concurrent Access to Stores
===========================

A BrightstarDB service of type "embedded" assumes that it has sole access to the store data files and the stores directory. You should
not attempt to run two embedded instances of BrightstarDB concurrently with the same stores directory. If you want multiple applications
to concurrently access the same collection of BrightstarDB stores you should instead run a BrightstarDB service that provides access to
the store and then change you applications to use the "rest" connection string and connect to the server.

On a single store, BrightstarDB supports single-threaded writes and multi-threaded reads. Write operations are serialized (and are executed
in the order that they are received), with read operations being executed in parallel with the writes. The isolation level for reads is
"read committed" - in other words a read will see the state of the last successful commit of the store, even if a write is in progress or
if a write starts while the read is being executed.

.. warning::

The current re-writeable store implementation is not structured to hold on to commit points while reads are being executed.
If a single read operation spans multiple write operations, the commit point that the read is using will be removed from
the store. If this happens, the read request is automatically retried using the latest commit point.

This scenario never occurs with the append-only store implementation as that store structure is designed to keep all
previous commits.

Thread-safety
=============

All implementations of IBrightstarService are thread-safe, this means you can use the low-level :ref:`RDF API <RDF_Client_API>` safely
in a multi-threaded application. However, the IDataObjectContext, IDataObjectStore and the Entity Framework
contexts are not. Multi-threaded applications that use either the :ref:`Data Objects API <Data_Object_Layer>` or the
:ref:`Entity Framework <Entity_Framework>` should ensure that each thread uses its own context and store instance for these API calls.
26 changes: 26 additions & 0 deletions doc/src/Data_Object_Layer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,32 @@ allowing the calls to be chained::
Adding and removing properties and changing the type simply adds and removes triples from the set of
locally managed triples for the data object.

To retrieve property values use either the ``GetPropertyValues()``
method to retrieve an enumerator over all of the property values for a specific property type; or use
the ``GetPropertyValue()`` method that returns just the first value of a specific type. These methods
both take either an ``IDataObject`` instance or a string to identify the property type::

// Get a data object for the property type we are intersted in
var name = store.MakeDataObject("http://xmlns.com/foaf/0.1/name");
// Write all names of fred
foreach (var n in fred.GetPropertyValues(name)) {
Console.WriteLine(n);
}
// Write just one mbox of fred
Console.WriteLine(fred.GetProperty("http://xmlns.com/foaf/0.1/mbox));

To determine what properties a data object has, use the ``GetPropertyTypes()`` method to enumerate
over the distinct types of property that a data object has. This can be useful for grouping together
properties by type or for exploring / displaying data with an unknown schema behind it::

Console.WriteLine("Properties of Fred:");
foreach(var propertyType in fred.GetPropertyTypes()) {
Console.WriteLine("\t" + propertyType.Identity + ":");
foreach(var propertyValue in fred.GetPropertyValues(propertyType)) {
Console.WriteLine("\t\t" + propertyValue);
}
}
A data object can be deleted using the ``Delete()`` method on the data object itself::

var fred = store.GetDataObject("http://example.org/people/fred");
Expand Down
40 changes: 38 additions & 2 deletions doc/src/Entity_Framework.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ Once an entity has been retrieved it can be modified or related entities can be
brightstardb.Name = "BrightstarDB";


New entities can be created either via the main collection or by using the ``new`` keyword
and attaching the object to the context::
New entities can be created either via the main collection; by using the ``new`` keyword
and attaching the object to the context; or by passing the context into the constructor::

// creating a new entity via the context collection
var bob = dataContext.Persons.Create();
Expand All @@ -152,6 +152,8 @@ and attaching the object to the context::
var bob = new Person() { Name = "Bob" };
dataContext.Persons.Add(bob);

// or created using new and passing the context into the constructor
var bob = new Person(dataContext) { Name = "Bob" };


Once a new object has been created it can be used in relationships with other objects. The
Expand All @@ -169,6 +171,13 @@ have been created by setting the ``Employer`` property on the person::
bob.Name = "bob";
bob.Employer = brightstardb;

// You can also create relationships to previously constructed
// or retrieved objects in the constructor
var brightstardb = new Company(dataContext) { Name = "BrightstarDB" };
var bob = new Person(dataContext) {
Name = "Bob;
Employer = brightstardb
};

Saving the changes that have occurred is easily done by calling a method on the context::

Expand Down Expand Up @@ -282,6 +291,33 @@ attribute annotation is required for this::
 string Name { get; set; }
}

Property Exclusion
------------------

If you want BrightstarDB to ignore a property you can simply decorate it with an ``[Ignore]``
attribute::

[Entity("Person")]
public interface IPerson {
string Id {get; }
string Name { get; set; }
[Ignore]
int Salary {get;}
}

.. note::

Properties that are ignored in this way are not implemented in the partial class that BrightstarDB
generates, so you will need to ensure that they are implemented in a partial class that you create.

.. note::

The ``[Ignore]`` attribute is not supported or required on *methods* defined in the interface as
BrightstarDB does not implement interface methods - you are always required to provide method
implementations in your own partial class.


Inverse Property Attribute
--------------------------

Expand Down
4 changes: 2 additions & 2 deletions doc/src/Getting_Support.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
Getting Support
################

.. _Google Group: https://groups.google.com/forum/#!forum/brightstardb-users
.. _Codeplex Discussion Forum: https://brightstardb.codeplex.com/discussions/
.. _email NetworkedPlanet Limited: mailto:contact@networkedplanet.com

If you need support while working with BrightstarDB there are two primary channels for asking for help.
All BrightstarDB users are invited to join our `Google Group`_. On this group you can ask questions and see
All BrightstarDB users are invited to join our `Codeplex Discussion Forum`_. In this forum you can ask questions and see
the latest postings from the BrightstarDB team.

You can also optionally purchase a support contract from NetworkedPlanet Limited. Support contracts last for a
Expand Down
12 changes: 12 additions & 0 deletions doc/src/Running_BrightstarDB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,18 @@ Where ``options`` are:

For a step-by-step guide please refer to :ref:`BrightstarDB_In_IIS`

********************************
Running BrightstarDB in Docker
********************************

From the 1.8 release we now provide pre-built `Docker <http://www.docker.com>`_ images to run the BrightstarDB service.
Docker is an open platform for developers and sysadmins to build, ship and run distributed applications, whether on
laptops, data center VMs, or the cloud.

The BrightstarDB Docker images are built on the most recent Ubuntu LTS and the most recent Mono stable
release. The Dockerfile and other configuration files can be found in `our Docker repository on GitHub <https://github.com/BrightstarDB/Docker>`_
where you will also find important information about how to configure and run the Docker images.

***********************************
BrightstarDB Service Configuration
***********************************
Expand Down
57 changes: 10 additions & 47 deletions doc/src/SPARQL_Endpoint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,77 +4,40 @@
SPARQL Endpoint
################

BrightstarDB comes with a separate IIS service that exposes a SPARQL endpoint. The SPARQL endpoint supports update and query as specified in the SPARQL 1.1 W3C recommendation.




**************
Configuration
**************


The SPARQL endpoint is provided as a ready to run IIS service. To configure the service following these steps:



1. Open IIS Management studio and either create a new Website or a new Application under the default site.

#. Set the 'Physical Path' to point to [INSTALLDIR]\SparqlService

#. Ensure that the Application Pool for the service has the required access rights to the [INSTALLDIR]\SparqlService folder.

#. In the [INSTALLDIR]\SparqlService\web.config file set the BrightstarDB.ConnectionString to point at a running BrightstarDB service. By default it connects to an HTTP service running on the same machine.


The BrightstarDB service supports query and update as specified in the SPARQL 1.1 W3C recommendation. Each
BrightstarDB store has its own endpoints for query and for update.


******
Usage
******


The SPARQL service accepts both query and update operations. The following URI patterns are supported.

The SPARQL service accepts both query and update operations. With the BrightstarDB service is accessible at {service},
the following URI patterns are supported:


**Query**

GET /{storename}/sparql?query={query expression}


``GET {service}/{storename}/sparql?query={query expression}``

Will execute the query provided as the query parameter value against the store indicated.



POST /{storename}/sparql


``POST {service}/{storename}/sparql``

Will look for the query as an unencoded value in the request body.



**Update**

POST /{storename}/update

``POST {service}/{storename}/update``


Will execute the update provided as the value in the request body.

For full details on these protocols, please refer to the `SPARQL 1.1 Protocol <http://www.w3.org/TR/sparql11-protocol/>`_ recommendation.

.. note::




**************
Customization
**************


The source code for the SPARQL endpoint is provided in the sample folder. It is provided to allow for customization and configuration of additional security options.



The SPARQL 1.1 Graph Store Protocol is not implemented at this time.
27 changes: 27 additions & 0 deletions doc/src/Whats_New.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@ This section gives a brief outline of what is new / changed in each official rel
either data migration or code changes in client code, these are marked with **BREAKING**. New features are marked with NEW and fixes for issues are
marked with FIX.

****************************
BrightstarDB 1.8 Release
****************************

- NEW: EntityFramework now supports GUID properties.

- NEW: EntityFramework now has an [Ignore] attribute which can be used to decorate interface properties
that are not to be implemented by the generated EF class. See the :ref:`guide to EF Annotations <Annotations_Guide>` for
more information.

- NEW: Added a constructor option to generated EF entity classes that allows property initialisation in the constructor. Thanks to CyborgDE for
the suggestion.

- NEW: Added some basic logging support for Android and iOS PCL builds. These builds now log diagnostic messages when built in Debug configuration,
and the BrightstarDB logging subsystem can be initialized with a local file name to generate persistent log files in Release configuration.

- NEW: It is now possible to iterate the distinct predicates of a data object using the GetPropertyTypes method.

- FIX: Fix for Polaris crash when attempting to process a query containing a syntax error.

- FIX: Fixed NuGet packaging to remove an obsolete reference to Windows Phone 8. WP8 (and 8.1) are still both supported but as PCL profiles.

- FIX: Performance fix for full cache scenarios. When an attempt to evict items out of a full cache results in no items being evicted, the eviction
process will not be repeated again for another minute to allow for any current update transactions that have locked pages in the cache to complete.
This can avoid a lot of unnecessary cache scans when a large update transaction is being processed. Thanks to CyborgDE for the bug report.


****************************
BrightstarDB 1.7 Release
****************************
Expand Down
4 changes: 2 additions & 2 deletions doc/src/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@
# built documents.
#
# The short X.Y version.
version = '1.7.1'
version = '1.8.0'
# The full version, including alpha/beta/rc tags.
release = '1.7.1'
release = '1.8.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
1 change: 1 addition & 0 deletions doc/src/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ BrightstarDB Documentation
Dynamic API <Dynamic_API>
RDF Client API <RDF_Client_API>
Admin API <Admin_API>
Concurrency And Multi-threading <Concurrency>
Developing Portable Apps <Developing_Portable_Apps>
Connecting to Other Stores <Other_Stores>
API Documentation <API_Documentation>
Expand Down

0 comments on commit 14f7a59

Please sign in to comment.