Speedment Open Source

What is Speedment Open Source?
Speedment is an Open Source Java 8 framework that makes your existing MySQL database look like normal Java 8 objects! When you query a database using Speedment, you use the Java 8 stream() method and can apply all the Stream methods that are available in Java 8 itself. You do not have to learn a new API and your can start coding directly!

What databases are supported?
The Open Source version supports the Open Source databases MySQL and MariaDB. The enterprise version supports virtually any database type like Oracle, DB2, Informix etc. You can easily plug in support for custom database types. See Speedment full product anatomy.

Can I use Speedment with Java 7?
The Enterprise solution is compatible with Java 7. However Speedment Open Source is built on pure Java 8 to benefit from all the latest features.

Speedment sounds close to other ORMs (like Hibernate etc), what is the difference?
With Hibernate you create the database from your Javacode, with Speedment you instead generate Javacode from your existing database automatically. With Speedment, you do not have to bother with SQL or SQL-like code. Speedment is using standard Java 8 streams for querying which other ORMs do not.

Is Speedment a plug-and-play solution?
Speedment is available at the Maven central repository. Just paste a few lines in your POM-file and you are good to go!

What are the minimum requirements to use Speedement Open Source?
You need Java 8 or a greater version in order to run Speedment Open Source. It will work on virtually any system that supports Java, from small on-chip solutions to large clusters of super-servers.

Who will benefit from Speedment?
Speedment is perfect for rapid application prototyping from existing databases. You can also use Speedment if you want responsive applications.

How do you JOIN entities with Speedment?
Since Speedment Open Source is 100% object­oriented, the concept of JOINs does not exist. Instead you traverse the database in a graph-­like manner. Use
hare.findCarrots() → Stream<Carrot> or carrot.findHare() → Hare
to navigate from one table to another. Traversal objects are loaded lazily which is good in many cases. The performance of this operation will be limited for cases when you would like to load objects eagerly.

In the Enterprise version:
Use the exact same code as in the Open Source but the operation will be resolved much faster (both for lazy and eager scenarios)  and in constant time (O(1) complexity) since the relations are stored in-JVM-­memory.

What happens when new rows are added to the database?
Consistency with Speedment is never an issue since the database is always the source of truth. If you want implement a Reactive model and that captures database change events, you need to poll the database for changes.

In the Enterprise version:
Every insert, update and delete will generate events that your app can react on.

What happens if I change the structure of the database?
It is super easy to regenerate code and often takes less than a second. Since Speedment is completely type­ safe, you will immediately see if your own code need to change somewhere as a result of the new structure!

Why should you use Speedment Open Source?
Speedment Open Source abstracts away the database and presents a standard Java 8 way of querying the database. Thus, your application becomes independent on the underlying database type. Development speed is increased and the actual application speed can increase too. Developers does not need to learn a new API and does not need to spend time with configuration files/parameters.

How exactly does the data mapping from RDBMS to Speedment Open Source work?
Mapping between relational database columns and Java object types are made automatically and transparently using the standard JDBC connector. It is possible to manually override the automatic selection.

What is the typical implementation time?
This depends on the amount and structure of the data in the relational DB. New prototype applications can usually be made in the blink of an eye.

Under which license is Speedment available?
Speedment is licensed under the Apache 2 license. You can review, use and modify the code as you want.
Speedment is also available in an Enterprise version, contact Speedment.inc

FAQ – Speedment Enterprise

Contact Speedment, Inc.  if you want more information on the Enterprise version and support alternatives.

What is Insane Mode?
Speedment can hold all your data locally using in-JVM-memory technology or a hot cache. This allows data to be structured and accessed much quicker than querying any database. Typically, data can be accessed several magnitudes faster. There are cases when data could be accessed 10 000 times faster and more. This function is included in the Speedment Enterprise version.

How is the Hot Cache kept up to date
Speedment will subscribe to update events from the database and feed those events into its Reactor. The reactor will then update the Hot Cache. The update subscription model differs depending on database type.

How can data be consistent in the Hot Cache?
Transactions in the underlying database are conveyed automically to the Reactor. The latter is then able to update The Hot Cache consistently so that transactions in the database are reflected as transactions in the Hot Cache. Thus, the Hot Cache is eventually consistent. If you have several Speedment nodes that needs to stay strict inter-node consistent, you have to use a scale out model.

How often is the Hot Cache updated?
Depending on the database type, different update subscription models are used. Typically an update in the underlying database will be reflected in the Hot Cache in milliseconds.

If I update the underlying database using a third party application, will my Hot Cache react to that?
Yes. Update events are sent to Speedment regardless of how the database was updated  (e.g. using SQL commands, third party applications, scripts, triggers, stored procedures).

If the underlying database goes down, what will happen with the Speedment application?
The Speedment application will continue to run queries. When the database is back in operation, the Speedment Hot Cache will resume update operation.

How does the Hot Cache detect changes in the underlying database?
Some databases allow the Reactor to directly subscribe to changes programmatically (i.e. Oracle) whereas others (like MySQL) will use triggers to detect updates.

In a big data scenario, how long would it take to load the Hot Cache with Speedment?
Load time may vary depending on Hot Cache type and database performance. Loading speeds exceeding one million rows per second have been observed.

If a Speedment node goes down, does it pick up from where it was before it crashed?
This depends on the Hot Cache type. Some types are redundant, to you can restart the node and it will eventually pick up using its neighbors. Other types will persist its content so that a node can restart instantly.

How big data sets are supported?
Depending on the Hot Cache type, different data sizes are supported. The scale out model is virtually unlimited. Just add new nodes to increase space and performance. The scale up solution is limited by the amount of RAM or the combined amount of RAM and high speed storage (i.e. SSD). The underlying technology has been used for in-JVM-memory maps exceeding 100 TB of data.

If would like to have several Speedment JVM:s if one crashes. Can you do that?
You can deploy any number of Speedment nodes. Nodes can be deployed in cloud environments/local clouds or on dedicated servers.

Fork me on GitHub

Try out Speedment now!

Click here to begin!