Welcome to siena project!
Siena is a persitence API for Java inspired by the Google App Engine Python Datastore trying to draw a bridge between SQL and NoSQL worlds.
- Current stable version is Siena 1.0.0-b5
- New extensions for great Java lightweight & scalable web framework Play! making Siena a very practical alternative to JPA in this great development environment
- Moved code to Github
- Original code has been refactored, enhanced those last months and lots of new features have appeared (batch, pagination, statefulness, aggregation, owned relations)
- New lead developer is Pascal Voitot (Thanks to Alberto Gimeno, creator and initiator of the project for his great work and to all Siena supporters)
// creates one employee
Employee emp = new Employee();
emp.firstName = "John";
emp.lastName = "Doe";
// updates it
emp.age = 23;
//retrieves the same employee
Employee sameEmp = Model.getByKey(Employee.class, emp.id);
// gets some employees with filtering/ordering
List<Employee> someEmployees = Employee.all()
// inserts a few employees created before
Employee.batch().insert(emp1, emp2, emp3, emp4);
- Siena provides a Java Object-DB mapping & querying API
It is designed following the ActiveRecord pattern which brings a simple and intuitive approach to manage your Java objects with respect to the database entities.
- Siena tries to provide a common API for SQL/NoSQL
Yet, Siena but doesn't pretend to be a kind of hibernate for SQL+NoSQL which would be crazy. It just intends to make the transition easier when changing database from SQL to NoSQL and vis versa by being able to reuse (almost) the same code without modifying too much.
- Siena is a single API with many implementations
You can already use siena with:
- Siena is Open Source and is released under the Apache License 2.0
- Siena doesn’t try to hide all the specific database technical aspects
Siena tries to provide a thin layer, very near from the low-level datastore but if you need to low-level datastore, you can use it directly.
- Siena development is a user experience driven process
We going from the user needs to the technical aspects of SQL/NoSQL databases and not the other way.
If you want to know more about Siena philosophy, go to our Github Presentation
- Self-aware models based on Active Record pattern
- Simple Querying syntax with ordering/filtering/iterating
- Stateless & threadsafe (but can become stateful when required)
- one request = one transaction by default (but can trigger manual control of transactions)
- Easy representation of different kinds of entity relations
- Very simple entities pagination mechanism (can use GAE cursors for forward & also backward paging)
- One single JAR, no external dependencies
- Full control of your entities, no hidden cache, no persistence context...
- Can work with everything in Java world from the heaviest JEE servers to the lightest pure Java application
- Simple join operations (native for SQL and simulated for GAE)
- Batch operations to manipulate multiple entities
- Asynchronous datastore (only for GAE for the time being)
- Entity Embedding (store complex structure serialized in JSON for SQL/GAE & Java-object + native embedding only for GAE)
- Entity aggregation (only for GAE for the time being based on entity grouping)