DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • Edge Computing's Infrastructure Problem: What Two Years of Factory Visits Actually Revealed
  • Go Serverless: Unleash Next-Gen Computing
  • Comparing Axios, Fetch, and Angular HttpClient for Data Fetching in JavaScript
  • Spring Boot Application With Spring REST and Spring Data MongoDB

Trending

  • Why Your Test Automation Is Always Behind the Code And the Architecture That Fixes It
  • Beyond Manual Annotation: Engineering Self-Correcting Pseudo-Labeling Pipelines
  • Building a Production-Ready AI Agent in 2026: Beyond the Hello World Demo
  • Ujorm3: A New Lightweight ORM for JavaBeans and Records
  1. DZone
  2. Software Design and Architecture
  3. Cloud Architecture
  4. Open-Source SPL Boosts MongoDB Computing Ability

Open-Source SPL Boosts MongoDB Computing Ability

SPL helps MongoDB increase its ability to compute, accomplish grouping and aggregation, joins, subqueries, and all other computing tasks.

By 
Jerry Zhang user avatar
Jerry Zhang
·
Aug. 22, 22 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
3.7K Views

Join the DZone community and get the full member experience.

Join For Free

MongoDB is a typical NoSQL database. Its document-oriented structure makes both storage and access convenient and efficient. But the database has rather weak computing ability. Computations on MongoDB data, particularly complex ones, are hard to handle. A data computing engine having powerful computing capability is needed to work with MongoDB to achieve relevant computing tasks.

The open-source esProc SPL is a specialized structured data computation engine. It supplies rich class libraries and all-around, database-independent computational capabilities. SPL has an independent procedural syntax that is particularly good at handling complex computations. It can help MongoDB increase its ability to compute, accomplish grouping and aggregation, joins, subqueries, and all the other computing tasks effortlessly.

Regular Queries

In SPL, it is easy to achieve JOINs MongoDB finds difficult to handle:

SPL: Achieve JOINS MongoDB finds difficult to handle

SPL can reuse the result of handling data of a table that is repeatedly involved in computations:

SPL can reuse the result of handling data of a table that is repeatedly involved in computations

Perform IN conditional query in SPL:

Perform IN conditional query in SPL

SPL’s technique to turn foreign key values to objects – the object-referencing foreign key – creates efficient foreign key pointers:

Foreign key pointers

SPL achieves APPLY algorithm in a simple way:

APPLY algorithm

SPL’s way of performing set-oriented calculations such as intersection, union, difference, and concatenation:

SPL’s way of performing set-oriented calculations

Get the sequence number of a member in a sequence in SPL:

Get the sequence number of a member in a sequence in SPL

Perform intersection of multi-member collections in SPL:

Perform intersection of multi-member collections in SPL

Complex Queries

Getting TopN in SPL:

Getting TopN in SPL

Summarize a nested-structure collection in SPL:

Summarize a nested-structure collection in SPL

Combine subdocuments made up of multiple attributes in SPL:

Combine subdocuments made up of multiple attributes in SPL

Query nested List subdocument in SPL:

Query nested List subdocument in SPL

SPL Cross-sector aggregation:

SPL Cross-sector aggregation

SPL segment-based grouping:

SPL segment-based grouping

SPL class-based grouping:

SPL class-based grouping

Data Writing

Export data as CSV in SPL:

Export data as CSV in SPL

SPL database update (from MongoDB to MySQL):

SPL database update (from MongoDB to MySQL)

SPL database update (from MySQL to MongoDB):

SPL database update (from MySQL to MongoDB)

Mixed Computations

SPL enables conveniently mixed computation between MongoDB and another data source:

Mixed computation between MongoDB and another data source

SQL Support

Besides the native syntax, SPL offers support for the SQL92 standard. You can use SQL to query MongoDB to achieve the above join operation; for instance:

Query MongoDB to achieve the above join operation

Integration Into Application

SPL provides standard JDBC/ODBC drivers through which SPL can be conveniently integrated into an application or invoked by it. To invoke SPL code through JDBC:

…
Class.forName("com.esproc.jdbc.InternalDriver");

Connection conn = DriverManager.getConnection("jdbc:esproc:local://");

PrepareStatement st=con.prepareStatement("call splScript(?)"); // splScript is the name of SPL script file

st.setObject(1,"California");

st.execute();

ResultSet rs = st.getResultSet();
…


With all those functionalities, you’ll be sure to be impressed by MongoDB’s strikingly boosted computing ability. 

  • Download SPL
  • SPL source code
Computing MongoDB A2 (operating system) Data (computing) Fetch (FTP client)

Published at DZone with permission of Jerry Zhang. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • Edge Computing's Infrastructure Problem: What Two Years of Factory Visits Actually Revealed
  • Go Serverless: Unleash Next-Gen Computing
  • Comparing Axios, Fetch, and Angular HttpClient for Data Fetching in JavaScript
  • Spring Boot Application With Spring REST and Spring Data MongoDB

Partner Resources

×

Comments

The likes didn't load as expected. Please refresh the page and try again.

  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook