OrientDB Document-Graph NoSQL Database http://www.orientechnologies.com OrientDB is a Multi-Model NoSQL Database Fri, 19 Sep 2014 09:08:54 +0000 en-US hourly 1 OrientDB 2.0-M1 is now released! http://www.orientechnologies.com/orientdb-2-0-m1/?utm_source=rss&utm_medium=rss&utm_campaign=orientdb-2-0-m1 http://www.orientechnologies.com/orientdb-2-0-m1/#comments Wed, 17 Sep 2014 22:03:41 +0000 http://www.orientechnologies.com/?p=11745 London, September 18, 2014 The highly anticipated OrientDB 2.0-M1 (milestone 1) is now released! User feedback was the cornerstone in every decision we made building this […]

The post OrientDB 2.0-M1 is now released! appeared first on OrientDB Document-Graph NoSQL Database.

]]>
London, September 18, 2014

The highly anticipated OrientDB 2.0-M1 (milestone 1) is now released! User feedback was the cornerstone in every decision we made building this version of OrientDB: impressive performance gains over 1.7.x, a streamlined and tweaked user experience and innovative new features. 

New Studio 2.0

We have created the most advanced visual tool in the entire NoSQL space. Studio has a new interface, better usability and new features like the Graph Editor.

In Studio, we have changed the game in terms of tooling in the NoSQL space! Be sure to experience the new interface, reworked usability and new features like the Graph Editor. And we’re just getting started!

 

Take a look at the Security Manager for easy management of Users, Roles and Permissions.

Roles2

 

ETL (Extract Transform Load)

Importing a database into OrientDB has never been so easy! No more code. Use a JSON file and the OETL command tool to import data from a RDBMS, CSV or JSON source. Here’s an example for importing a Client table from MySQL into OrientDB:

{
  "config": {
    "verbose": true
  },
  "extractor" : {
    "jdbc": { "driver": "com.mysql.jdbc.Driver",
              "url": "jdbc:mysql://localhost/mysqlcrm",
              "userName": "root",
              "userPassword": "",
              "query": "select * from Client" }
  },
  "transformers" : [
   { "vertex": { "class": "Client"} }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "plocal:/temp/databases/orientdbcrm",
      "dbAutoCreate": true
    }
  }
}

 

Documentation

We’ve already had many comments about our new documentation system. Clean, crisp and easy to navigate. We are focused on helping you become productive with OrientDB. Dig into our new documentation and be sure not to miss the Search function.

Docs

 

There is much more!

  • Studio: New Layout, new Graph Editor, new Security panel (Users and Roles management)
  • Security: Added configurable SSL keystore and truststore
  • Memory: In-Memory database uses off-heap cache
  • Graph API:
    • New OrientGraphAsynch: the first experimental version of asynchronous graph
    • New SQL MOVE VERTEX command to refactor a portion of graphs and to move vertices between distributed nodes
    • Improved OrientGraphFactory performance by reducing recycling time. Added central config of generated graphs in Factory
    • Creation of edges no longer updates both vertices resulting in improved performance
  • Console: Improved layout
  • Distributed: 3x performance gains
  • Core:
    • New Schema Driver Serialization: avoids writing field names for records with Schema
    • Added strategies to manage conflict: by content and auto-merge. Injection is now possible.
    • Custom strategy via Java API
    • New RWLocks to speedup internal parallelism
    • Disabled SNAPPY compression by default
    • Improved schema concurrency
    • Removed 2nd level cache
  • SQL:
    • New UUID() function to generate Unique IDs
    • New statistic functions: mode(), variance(), stddev(), median(), percentile()
    • New SQL MOVE VERTEX command to refactor portion of graphs and to move vertices between
    • Rewritten implementation of shortestPath() function
    • Improvement for “order by @rid desc” to browse results in the opposite direction without using an index or RAM.
  • Configuration: Global settings are copied in database at creation time and can be updated
  • Bug fixing: 20 from 1.7.9, hundreds from 1.7.

Full list of all 93 closed issues.

 

Can I use OrientDB v2.0-M1 in production?

This is not the final 2.0 version. This release is the first milestone (M1 stands for First Milestone) of 2.0 on the path to the final version at the end of the month. We suggest using OrientDB v2.0-M1 in development and test only. If you plan to go in production before October 1st, we suggest staying with OrientDB 1.7.x. Otherwise, go ahead and use OrientDB 2.0-M1.

 

Is 2.0-M1 compatible with previous versions?

You can open any database created with past versions. In order to use the new binary serialization, you have to export and re-import the database. Look at Migrate from 1.7.x.

 

Download OrientDB v 2.0-M1

 

 

Have fun with graphs & documents,

Luca Garulli
CEO of Orient Technologies
the Company behind OrientDB
www.orientechnologies.com

 

The post OrientDB 2.0-M1 is now released! appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/orientdb-2-0-m1/feed/ 0
Released OrientDB 1.7.8 + new non-blocking backup http://www.orientechnologies.com/released-orientdb-1-7-8/?utm_source=rss&utm_medium=rss&utm_campaign=released-orientdb-1-7-8 http://www.orientechnologies.com/released-orientdb-1-7-8/#comments Wed, 13 Aug 2014 15:16:31 +0000 http://www.orientechnologies.com/?p=10957 London, August 13th 2014 Many issues fixed. This is a hotfix (http://www.semver.org), so you can just replace the jars to upgrade. No export/import is […]

The post Released OrientDB 1.7.8 + new non-blocking backup appeared first on OrientDB Document-Graph NoSQL Database.

]]>
London, August 13th 2014

Many issues fixed. This is a hotfix (http://www.semver.org), so you can just replace the jars to upgrade. No export/import is needed.

New backup.sh

We’ve also introduced a new backup.sh script under “bin” directory. This executes a backup by invoking the console. But the most interesting part is the option “lvm“. If you’re running on Linux and you have LVM installed, you can execute a database backup without locking the database. For more information look at Non-Blocking Backup. If you’re a devops and you’d like to contribute to support other OSs and File Systems, please send us a Pull Request.

 

Enjoy with Graphs,

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli



The post Released OrientDB 1.7.8 + new non-blocking backup appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/released-orientdb-1-7-8/feed/ 0
Why did you choose OrientDB? An Interview with Sysnet’s CTO http://www.orientechnologies.com/interview-with-sysnet-cto/?utm_source=rss&utm_medium=rss&utm_campaign=interview-with-sysnet-cto http://www.orientechnologies.com/interview-with-sysnet-cto/#comments Mon, 14 Jul 2014 13:46:10 +0000 http://www.orientechnologies.com/?p=10735 This week we interviewed Odysseas Pentakalos.   Luca: “Hi Odysseas, Can you tell us a little about your company and your role?” Odysseas: “Hi […]

The post Why did you choose OrientDB? An Interview with Sysnet’s CTO appeared first on OrientDB Document-Graph NoSQL Database.

]]>
This week we interviewed Odysseas Pentakalos.

 

Luca: “Hi Odysseas, Can you tell us a little about your company and your role?”

Odysseas: “Hi Luca. I am the Chief Technology Officer at SYSNET International which is based in Northern Virginia in the United States and focuses primarily on offering consulting services relating to software architecture and large distributed system implementation. For the past seven years we have also focused on the Health Information Technology and we have developed an open source product called OpenEMPI that offers master data management for patient demographic and other data.”

Luca: “What’s your background with other databases?”

Odysseas: “Through our consulting practice we have worked with pretty much every commercial and open source relational database in the market including Oracle, Microsoft SQL Server, MySQL and Postgres. We also used MongoDB on a recent research project for storing clinical data. Earlier versions of OpenEMPI used solely Postgres to persist the data managed by the system but we’ve been working on a different edition of the software that uses OrientDB to store the key data.”

Luca: “Why did you chose OrientDB?”

Odysseas: “In the entity edition of OpenEMPI we wanted for the system to be able to manage records of any type of entity and not just patient demographic data. Before we selected OrientDB we developed a few prototypes to evaluate the performance of the database in being able to efficiently handle large volumes of records of data where the precise field composition of each record is specified by the user during deployment. We evaluated both relational databases and a couple of NoSQL database and OrientDB was clearly the best option. The flexible Apache license was also another key reason why we made the selection. Finally, the fact that OrientDB is supported by such a dedicated group of people who also provide commercial support if needed, was the feature that closed the deal.”

Luca: “What API are you using with OrientDB?”

Odysseas: “We have been working with OrientDB for over a year now. In the early stages we used the OrientDB Java-based Graph API, but earlier this year we migrated to the Blueprints API since the legacy one was no longer supported. We tried to use the Blueprints API as much as possible since it is a standard API for graph databases but in some areas we found that it is lacking the capabilities we need so we dig deeper and use the OrientDB-specific extensions.”

Luca: “In your opinion, which are the best 3 OrientDB features?”

Odysseas: “There are certainly more than 3 great features in OrientDB but here are the top 3.

    1. Performance: if OrientDB was not able to meet the performance requirements of our application the other features wouldn’t matter much so I have to put performance at the top. We have been impressed by the performance of the database in being able to support the key transactions that our software needs to process. We also plan to exploit the clustering capabilities soon which will allows us to achieve higher overall performance.
    2. Flexible Schema: The flexibility of being able to choose whether to use a schema or not is very important. We are exploiting OrientDBs ability to define classes to capture some of the common attributes of our data model while allowing the users to dynamically extend the schema over time.
    3. Transaction support: Some NoSQL databases provide unlimited scalability of the system but trade-off support for ACID transactions. Our application must support ACID semantics so we are willing to trade-off some performance in exchange for always having consistent data.

Congratulations on the great job you guys have done so far with OrientDB and the best of luck in the future.”

Luca: “Thanks Odysseas!”

 

Read more about Testimonials and Active Customers.

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli  
 


The post Why did you choose OrientDB? An Interview with Sysnet’s CTO appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/interview-with-sysnet-cto/feed/ 0
New OrientDB-ETL component http://www.orientechnologies.com/new-orientdb-etl/?utm_source=rss&utm_medium=rss&utm_campaign=new-orientdb-etl http://www.orientechnologies.com/new-orientdb-etl/#comments Fri, 04 Jul 2014 17:20:40 +0000 http://www.orientechnologies.com/?p=10688 London, July 4th 2014 Orient Technologies released the new OrientDB-ETL component in beta version to easily pump data into OrientDB database without writing a […]

The post New OrientDB-ETL component appeared first on OrientDB Document-Graph NoSQL Database.

]]>
London, July 4th 2014

Orient Technologies released the new OrientDB-ETL component in beta version to easily pump data into OrientDB database without writing a line of code. So far the available extractors are:

  • CSV File
  • JDBC, namely any RDBMS on the market

 

How to import from Relational DBMS?

 

(1) Get the right JDBC driver

Most of DBMSs support JDBC driver. All you need is to gather the right DBMS’s JDBC driver and put it in the classpath or simply in the $ORIENTDB_HOME/lib directory.

(2) Write the ETL configuration

All yo need is to write a JSON file containing the ETL process. Create a new file dbms2orient.json somewhere. With the configuration below all the records from the table “Client” are imported in OrientDB from MySQL database. Start from this one.

{
  "config": {
    "verbose": true,
  },
  "extractor" : {
    "jdbc": { "driver": "com.mysql.jdbc.Driver", 
              "url": "jdbc:mysql://localhost/mysqlcrm", 
              "userName": "root", 
              "userPassword": "",
              "query": "select * from Client" }
  },
  "transformers" : [
    { "vertex": { "class": "Client"} }
  ],
  "loader" : {
    "orientdb": {
      "dbURL": "plocal:/temp/databases/orientdbcrm",
      "dbAutoCreate": true
    }
  }
}

(3) Start the ETL process

After installed the component execute the command:

$ oetl dbms2orient.json

 

That’s all. To improve ETL by using Transformers look at the documentation.



The post New OrientDB-ETL component appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/new-orientdb-etl/feed/ 0
Interview with Kashif Masood http://www.orientechnologies.com/interview-to-kashif-masood/?utm_source=rss&utm_medium=rss&utm_campaign=interview-to-kashif-masood http://www.orientechnologies.com/interview-to-kashif-masood/#comments Thu, 26 Jun 2014 09:20:30 +0000 http://www.orientechnologies.com/?p=10624 This is the first of many interviews with users regarding their usage of OrientDB. We asked to Kashif Masood, Technical Executive at Awal Technologies (http://awalinc.com), how […]

The post Interview with Kashif Masood appeared first on OrientDB Document-Graph NoSQL Database.

]]>
This is the first of many interviews with users regarding their usage of OrientDB. We asked to Kashif Masood, Technical Executive at Awal Technologies (http://awalinc.com), how they used OrientDB. Read more about Testimonials and Active Customers.

 

Luca: “Hi Kashif, Can you tell us a little about your company and your role?”

Kashif: “Thanks Luca, I am Technical Executive at Awal Technologies based in Islamabad, Pakistan. We provide businesses smart software solutions to businesses globally. We specialize in PHP (Drupal, WordPress, Yii), .Net and Java technologies and Mobile Apps development. We also have products named Awal ERP, Awal HRM, Awal E-Commerce Solution and Awal Educational Institute Mgmt. System. We use Agile methodologies, mostly SCRUM and our own developed Iterative Development Methodology for software development.”

Luca: “What’s your background with other databases?”

Kashif: “We regularly use MySQL for our client projects. We have used Cloudant (CouchDB), HyperTable, HBase, and OrientDB for specialized needs. We fully advocate NoSQL movement, and consider Document and Graph DBs as the most innovative solution invented in the history of data storage.”

Luca: “Why did you chose OrientDB?”

Kashif: “We chose OrientDB because of its Graph data model, its intuitive SQL like language, Apache License, if you don’t want graph then use Document model (schema less), no costly joins like in RDBMSes and future potential. The product which we had to develop required two key concepts: store individual information in the form of documents (which OrientDB provides in a very convenient manner) and relationships between these documents in the form of a graph structure, since we had some social networking type of features, and OrientDB provided the graph model representation and manipulation in a very powerful manner.

I am glad we didn’t have a learn some aliens language like Cypher to traverse and find patterns out of the relationships. It has a simple SQL like language to do the stuff we needed. This same was very difficult and painful to do using BigTable like DBMSs e.g. HyperTable and HBase. Obviously we are not talking about hundreds of petabytes of data here. While MongoDB was notorious about data lose, because of its late data flushing out to disk. So we tried CouchDB, but we very disappointed to see how we had to query data using its improperly implemented Map-Reduce querying feature. Neo4J is a good product to drain out your money and still keep you unsatisfied, due to its non-distributed nature. So we were left with OrientDB as the single and the best choice for our problems solution.”

Luca: “What API are you using with OrientDB?”

Kashif: “We mostly have used OrientDBs Graph APIs, but also document to store and retrieve individual documents.

Luca: “In your opinion, which are the best 3 OrientDB features?”

Kashif: “Naming 3 best features is a very difficult question to answer. Because for us it is difficult to ignore all the features which are best to name just 3 :). But in a sorted list of all its best features, the first 3 features will be:

  1. Graph-Document data models with schema-less nature
  2. SQL like query language
  3. Apache License”

Luca: “Thanks for the interview, Kashif!”

 

Read more about Testimonials and Active Customers.

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli  
 


The post Interview with Kashif Masood appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/interview-to-kashif-masood/feed/ 0
OrientDB 1.7 is out! http://www.orientechnologies.com/orientdb-1-7-is-out/?utm_source=rss&utm_medium=rss&utm_campaign=orientdb-1-7-is-out http://www.orientechnologies.com/orientdb-1-7-is-out/#comments Mon, 26 May 2014 23:41:58 +0000 http://www.orientechnologies.com/?p=10437 Breaking news: OrientDB 1.7 is out! We made OrientDB faster than before and with new exciting features like Distributed Sharding, the support for Lucene […]

The post OrientDB 1.7 is out! appeared first on OrientDB Document-Graph NoSQL Database.

]]>
Breaking news: OrientDB 1.7 is out! We made OrientDB faster than before and with new exciting features like Distributed Sharding, the support for Lucene indexes (Full-Text and GEO-Spatial), SSL connections, Parallel queries and more.

To download OrientDB 1.7 go to: http://www.orientechnologies.com/download/

What’s new?

Core

  • New “minimumclusters” to auto-create X clusters per class
  • New cluster strategy to pick the cluster. Available round-robin, default and balanced
  • Added record locking via API
  • Removed rw/locks on schema and index manager
  • Cached most used users and roles in RAM (configurable)

Server

  • New support for SSL connections on binary and HTTP protocols

Studio

  • Bookmarks for queries
  • Ability to interrupt running commands

Console

  • New “script” command to execute multiple SQL statements + transaction control
  • New “next” command to move the cursor on the next record in the result set
  • New “pref” command to move the cursor on the previous record in the result set
  • New “move ” command to move from current record by executing a predicate
  • New “eval ” command to evaluate a predicate against current record
  • Ability to ignore errors by setting “set ignore = true”

Distributed

  • New support for Sharding
  • Simplified (JSON) configuration

Graph

  • New functions to return the traversed items: traversedVertex(), traversedEdge() and traversedElement()
  • Method addEdge() can takes ORID to use implicitly last record version

SQL

  • New PARALLEL keyword to run the query on multiple threads
  • New “INSERT INTO … SELECT” to copy records
  • New “INSERT INTO … RETURN ” to return expressions on INSERT
  • New “UPDATE … RETURN ” to return expressions on UPDATE
  • Function distance() accepts measure unit (default = km)

HTTP

  • Added support for context variables in SCRIPT command

Indexes

  • Added Full-Text Lucene indexes (as plugin)
  • Added GEO Spatial Lucene indexes (as plugin)
  • Added WAL (Journal) support for Hash-Index so can be used in Transactions
  • Added NULL support for composite and non-composite indexes
  • Full-Text can be configured through METADATA keyword
  • Full-Text now indexes also sub-words
  • Improved SQL optimizer by avoiding calling evaluate() when not needed
  • LINKSET types can be indexed now
  • RID can be used on composite indexes 

 

Full list of all 135 closed issues.

Enterprise Edition

OrientDB Community Edition is FREE for any usage (Apache2 license). If you want additional features and Professional Support, request a trial of Enterprise Edition: Enterprise Edition.

 

Have fun with Graphs,

Luca Garulli
CEO at Orient Technologies
the Company behind OrientDB

http://about.me/luca.garulli

 



The post OrientDB 1.7 is out! appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/orientdb-1-7-is-out/feed/ 0
Announcement: Updated Distributed Architecture and new Sharding feature http://www.orientechnologies.com/distributed-architecture-sharding/?utm_source=rss&utm_medium=rss&utm_campaign=distributed-architecture-sharding http://www.orientechnologies.com/distributed-architecture-sharding/#comments Wed, 30 Apr 2014 17:20:18 +0000 http://www.orientechnologies.com/?p=9888 London, April 30th 2014 In “develop” branch (1.7-SNAPSHOT) it’s available the new Distributed Architecture with sharding features and simplified configuration. Look at the new […]

The post Announcement: Updated Distributed Architecture and new Sharding feature appeared first on OrientDB Document-Graph NoSQL Database.

]]>
London, April 30th 2014

In “develop” branch (1.7-SNAPSHOT) it’s available the new Distributed Architecture with sharding features and simplified configuration.

Look at the new default default-distributed-db-config.json:

{
  "autoDeploy": true,
  "hotAlignment": false,
  "offlineMsgQueueSize" : 0,
  "readQuorum": 1,
  "writeQuorum": 2,
  "failureAvailableNodesLessQuorum": false,
  "readYourWrites": true,
  "clusters": {
    "internal": {
    },
    "index": {
    },
    "*": {
      "servers" : [ "<NEW_NODE>" ]
    }
  }
}

We removed some flags (like replication:boolean, now it’s deducted by the presence of “servers” field) and settings now are global (autoDeploy, hotAlignment, offlineMsgQueueSize, readQuorum, writeQuorum, failureAvailableNodesLessQuorum, readYourWrites), but you can overwrite them per-cluster.

Furthermore the sharding is not anymore declared per cluster but the it’s made per cluster. I explain myself better. Many NoSQL do sharding against an hashed key (see MongoDB or any DHT system like DynamoDB). This wouldn’t work well in a Graph Database where traversing relationships means jumping from a node to another one with very high probability.

So the sharding strategy is in charge to the developer/dba. How? By defining multiple clusters per class. Example of splitting the class “Client” in 3 clusters:


Class Client -> Clusters [ client_0, client_1, client_2 ]

This means that OrientDB will consider any record/document/graph element in any of such clusters as “Clients” (Client class relies on such clusters).

Now you can assign each cluster to one or more servers. If more servers are enlisted the records will be copied in all the servers. Example:

{
  "autoDeploy": true,
  "hotAlignment": false,
  "readQuorum": 1,
  "writeQuorum": 2,
  "failureAvailableNodesLessQuorum": false,
  "readYourWrites": true,
  "clusters": {
    "internal": {
    },
    "index": {
    },
    "client_0": {
      "servers" : [ "europe", "usa" ]
    },
    "client_1": {
      "servers" : [ "usa" ]
    },
    "client_2": {
      "servers" : [ "asia", "europe", "usa" ]
    },
    "*": {
      "servers" : [ "<NEW_NODE>" ]
    }
  }
}

In this case I’ve split the Client class in the clusters client_0, client_1 and client_2, each one with different configuration:

    • client_0, will write to “europe” and “usa” nodes
    • client_1, only to “usa” node
    • client_2, to all the nodes (it would be equivalent as writing “<NEW_NODE>”, see cluster ‘*’, the default one)

On application when I want to write a new Client to the first cluster I can use this syntax (Graph API):


graph.addVertex("class:Client,cluster:client_0");

Document API


ODocument doc = new ODocument("Client");
// FILL THE RECORD
doc.save( "client_0" );

 

OrientDB will send the record to both “europe” and “usa” nodes.

All the query works by aggregating the result sets of all the involved nodes. Example:


select from cluster:client_0

Will be executed against node “europe” or “usa”. Instead this query:


select from Client

 

Will be executed against all 3 clusters that made the Client class, so against all the nodes.

Cool!

Also projections works in a Map/Reduce fashion. Example:


select max(amount), count(*), sum(amount) from Client

In this case the query is executed across the nodes and then filtered again on starting node. Right now not 100% of the cases are covered, see below.

What’s missing yet?

(1) Class/Cluster selection strategy

Till now each class has a “defaultClusterId” that is the first cluster, by default. We need a pluggable strategy to select the cluster on create record. We could provide at least 2 implementations in bundle:
fixed, like now: takes the defaultClusterId
round-robin, clear by the name
balanced, will check the records in all the clusters and will try to write to the smaller cluster. This is super cool when you add new clusters because you’ve bought new servers. The new empty servers will be filled before the others because will have new clusters empty at the beginning. So after a while all the clusters will be balanced
Why don’t have just balanced? Because it could be more expensive to know the cluster size at run-time…. We could cache sizes and update them every XX seconds. We’ll fix this in 1.7 in a few days.

This point is not strictly related to the Distributed cfg, but it will be applied also to the default cfg.

(2) Hot change of distributed configuration

This will be introduced after 1.7 via command line and in visual way in the Workbench of the Enterprise Edition (commercial licensed).

(3) More Test Cases

I’ve created the TestSharding test case, but we’d need more complicated configurations and hours to try them. In facts it’s pretty time/cpu consuming starting up 2-3 servers in cluster every time!

(4) Merging results for all the functions

Some functions like AVG() doesn’t work in this way. I didn’t write 100% test coverage on all the functions yet. We’ll fix this in the next release.

(5) Update the Documentation

We’ll start updating the documentation with the new staff and more examples about configuration.

(6) Sharding + Replication

Mixed configuration with sharding + replication allow to split database in partitions but replicated across more than one node. This already works. Unfortunately the distributed query with aggregation in projections (sum, max, avg, etc) could return wrong results because same record could be browsed on different nodes. We’ll fix this in the next release.

 

Luca Garulli
CEO at Orient Technologies LTD
the Company behind OrientDB
http://about.me/luca.garulli



The post Announcement: Updated Distributed Architecture and new Sharding feature appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/distributed-architecture-sharding/feed/ 0
Transaction Locks http://www.orientechnologies.com/pessimistic-optimistic/?utm_source=rss&utm_medium=rss&utm_campaign=pessimistic-optimistic http://www.orientechnologies.com/pessimistic-optimistic/#comments Mon, 31 Mar 2014 22:17:08 +0000 http://www.orientechnologies.com/?p=9182 London, March 31st 2014   I’ve silently introduced a new feature in OrientDB (well, there was an issue, but I know somebody is not […]

The post Transaction Locks appeared first on OrientDB Document-Graph NoSQL Database.

]]>
London, March 31st 2014
 

I’ve silently introduced a new feature in OrientDB (well, there was an issue, but I know somebody is not registered to GitHub notification). It’s about Transactions and Locking. Now every time you expressly lock records, all the locks are kept on the current transaction until the closing by commit() or rollback(). This means that it’s finally possible avoiding concurrent updates.

The real question is: “Is it better to be Optimistic or Pessimistic with transactions?”

  • Optimistic (like CAS) avoiding locking and resolve conflicts by re-executing the transaction with a retry policy or
  • Pessimistic by locking the records, apply changes and then unlock them

 

The response is up to you, or better, to your use case. In general the Optimistic approach is preferable on modern multi-core architecture, but on massive updates against few records locking could take the best performance.

Look at this micro-benchmark.

This feature along with the new server side SQL batch, give us a lot of power. Let’s see how to create an edge with Pessimistic approach (locking) and with Optimistic approach (CAS).

Pessimistic approach

begin
let $client = create vertex Client set name = ‘Luca’
let $city = select from City where name = ‘London’ lock record
let $e = create edge Lives from $client to $city
commit

 

Optimistic approach

begin
let $client = create vertex Client set name = ‘Luca’
let $city = select from City where name = ‘London’
let $e = create edge Lives from $client to $city retry 100
commit

 
Now it’s up to you choosing the best approach for your use case.
 
Luca Garulli
CEO at Orient Technologies
the Company behind OrientDB

http://about.me/luca.garulli

 

 



The post Transaction Locks appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/pessimistic-optimistic/feed/ 0
New SQL command batch http://www.orientechnologies.com/new-sql-command-batch/?utm_source=rss&utm_medium=rss&utm_campaign=new-sql-command-batch http://www.orientechnologies.com/new-sql-command-batch/#comments Mon, 31 Mar 2014 18:54:01 +0000 http://www.orientechnologies.com/?p=9169 Hi all, OrientDB allowed to execute arbitrary script written in Javascript or any scripting language installed in the JVM. Well, starting from now we […]

The post New SQL command batch appeared first on OrientDB Document-Graph NoSQL Database.

]]>
Hi all,

OrientDB allowed to execute arbitrary script written in Javascript or any scripting language installed in the JVM. Well, starting from now we created a minimal SQL engine to allow batch of commands. Batch of commands are very useful when you have to execute multiple things at the server side avoiding the network roundtrip for each command. Example to create a new vertex in a transaction and attach it to an existent vertex by creating a new edge between them:

 

begin
let account = create vertex Account set name = ‘Luke’
let city = select from City where name = ‘London’
let edge = create edge Lives from $account to $city retry 100
commit
return $edge

 

It’s plain OrientDB SQL, but with a few news:
  • begin -> begins a transaction
  • rollback -> rollbacks an active transaction
  • commit -> commits an active transaction
  • let <variable> = <command> -> executes a command and assign it in the context as . That variable can be used in further commands by prefixing it with $
  • return <variable>|<value>|null -> returns a value instead of last command result (default)
Note also the usage of $account and $city on further SQL commands.

 

Java API

 

This can be used by Java API with:
database.open("admin", "admin");

String cmd = "beginn";
cmd += "let a = create vertex set script = truen";
cmd += "let b = select from v limit 1n";
cmd += "let e = create edge from $a to $b retry 100n";
cmd += "commitn";
cmd += "return $e";

OIdentifiable edge = database.command(new OCommandScript("sql", cmd)).execute();

 

Remember to put one command per line (postfix it with n).

 

HTTP REST API

 

And via HTTP REST interface (https://github.com/orientechnologies/orientdb/issues/2056). Execute a POST against /batch URL by sending this payload:

 

{ "transaction" : true, 
  "operations" : [ 
    {
      "type" : "script",
      "language" : "sql",
      "script" : [ "let account = create vertex Account set name = 'Luke'",
                   "let city =select from City where name = 'London'",
                   "create edge Lives from $account to $city retry 100" ]
    }
  ]
}

 

Hope this new feature will simplify your development improving performance.

 

What about having more complex constructs like IF, FOR, etc? If you need more complexity, I suggest you to use Javascript as language that already support all these concepts.

 

Luca Garulli
CEO at Orient Technologies
the Company behind OrientDB

http://about.me/luca.garulli

 

 



The post New SQL command batch appeared first on OrientDB Document-Graph NoSQL Database.

]]>
http://www.orientechnologies.com/new-sql-command-batch/feed/ 0
Released OrientDB 1.7-rc2: new Query Timeline in Studio and 62 bug fixed http://www.orientechnologies.com/released-orientdb-1-7-rc2-new-query-timeline-studio-62-bug-fixed/?utm_source=rss&utm_medium=rss&utm_campaign=released-orientdb-1-7-rc2-new-query-timeline-studio-62-bug-fixed http://www.orientechnologies.com/released-orientdb-1-7-rc2-new-query-timeline-studio-62-bug-fixed/#comments Tue, 25 Mar 2014 16:03:49 +0000 http://www.orientechnologies.com/?p=8980 Orient Technologies has just released the second and last Release Candidate for OrientDB v1.7. To download OrientDB 1.7-rc2 goto: http://www.orientechnologies.com/download/ So what’s new? This […]

The post Released OrientDB 1.7-rc2: new Query Timeline in Studio and 62 bug fixed appeared first on OrientDB Document-Graph NoSQL Database.

]]>
Orient Technologies has just released the second and last Release Candidate for OrientDB v1.7.

To download OrientDB 1.7-rc2 goto:

http://www.orientechnologies.com/download/

So what’s new?

This release is more focused on bug fixing. We fixed a total of 62 bugs! Then we provided a brand new GUI in the Query panel of Studio by using a Timeline-like approach (taken by social networks) to manage the query history. I hope this will improve your productivity with queries.

Below the main enhancements:

    • Core:
      • supported retro-compatibility for databases created with OrientDB v1.5 or further (#1899)
      • improved performance on ORDER BY against indexes (#1843)
      • improved performance on RENAME CLASS (#1818)
    • Graph:
      • added support for vertex-centric traversal by using SQL (#2079)
    • SQL:
      • new UPSERT keyword to execute an INSERT or UPDATE based on a condition (#2032)
      • UPDATE now can ADD also to sub-document fields (#2031)
    • Indexes:
      • added support for external engines (#1774)
    • Studio:
      • new Query Timeline to the History, new Index Panel, Fixed many bugs

     

    Full list of closed issues.
     

    Enterprise Edition

    OrientDB Community Edition is FREE for any usage. If you wan additional features and Professional support, ask for a trial of Enterprise Edition: Enterprise Edition.

    Have fun with Graphs,

    Luca Garulli
    CEO at Orient Technologies
    the Company behind OrientDB

    http://about.me/luca.garulli

     



    The post Released OrientDB 1.7-rc2: new Query Timeline in Studio and 62 bug fixed appeared first on OrientDB Document-Graph NoSQL Database.

    ]]> http://www.orientechnologies.com/released-orientdb-1-7-rc2-new-query-timeline-studio-62-bug-fixed/feed/ 0