marklogic-community / marklogic-samplestack

A sample implementation of the MarkLogic Reference Architecture
Apache License 2.0
82 stars 56 forks source link
marklogic

marklogic-samplestack

Samplestack is a sample application showing how to build a three tier application on MarkLogic. It was released in 2015 on MarkLogic 8 using a Java middle tier and a parallel Node.js stack implementation, with an Angular front end.

As of 2019: While the product team is no longer maintaining the application, the archived repository makes the code available for browsing as a valid reference architecture at a high-level which uses many still relevant features.

Samplestack is a comprehensive sample application that demonstrates how to build an effective MarkLogic application. Based on the idea of a "Question and Answer" website, Samplestack shows you how to integrate MarkLogic into a three-tier application architecture (browser, application server, and database).

README for Version 1.1.0

This application features two middle tiers

The project includes the following major components:

This README covers the following topics:

Getting Started

To start, clone this repository. For example, run the following command:

git clone https://github.com/marklogic/marklogic-samplestack

Then, launch each of the tiers to get a feel for Samplestack's 3-tiered architecture (from the bottom-up):

1) Database

This version of Samplestack has been tested to run on MarkLogic 8.0-3. Log an issue for questions on compatibility with MarkLogic server versions. Note: There is no direct upgrade path from previous releases. If you had previously been running previous or pre-release version, please perform a full uninstall, including manually deleting data directories, before installing a supported 8.x version for use with Samplestack.

2) Middle Tier - Application Server

You can choose to run/examine one of two middle tier application servers. Each of these will use the same MarkLogic backend configuration and the same MVC browser application.

Additional Information

For more information, see the following:

Reference Architecture Introduction

Samplestack is an instantiation of MarkLogic’s Reference Architecture. It demonstrates how to structure three-tiered MarkLogic applications for production:

Application Overview

The sample application itself is centered around the idea of a Question and Answer site. It is a searchable, transactional, content-rich web application. Users of the application participate in the crowd-sourced knowledge community by asking questions, submitting answers, commenting, and voting. Search is a rich experience with interactive facets and parameters which enable users to narrow in on the answers they seek. The initial seed dataset is an extract of content from the popular Stack Overflow website. Their archives are made available under CC BY-SA and comprise the seed data for Samplestack.

Each of the features in Samplestack demonstrates an important concept for developers building on MarkLogic:

Samplestack Feature MarkLogic Concept
Full-text Search Indexes, query styles
User records and Question documents Data Model for POJOs and JSON.
Users and Roles (log in, log out) Security (authentication and authorization)
Restricted Content Role-based Permissions
Facets Search constraints, analytics
Ask, Answer, Comment Document updates
Voting Updates impact sorting
Accepted Answers and Reputation Transactional model, data integrity
Related Tags Semantics, using RDF triples and SPARQL

Contributing

Please see our contributing guidelines.

Support

Samplestack was developed by MarkLogic Engineering and is distributed under the Apache 2.0 license. It is not designed for use in production. Active feedback and questions should be directed to the MarkLogic community on Stack Overflow or refer to the Developer site at MarkLogic.com.

License

Copyright © 2012-2015 MarkLogic

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.