Hybrid mumps

98 views
Skip to first unread message

rafi farchi

unread,
Jun 30, 2026, 4:25:27 PM (8 days ago) Jun 30
to Hardhats
Subject: A bridge between worlds: Native MUMPS & Relational SQL in perfect coexistence

Hi everyone,

I wanted to share a small milestone from a project I’ve been working on, driven by a simple vision: enabling modern relational database capabilities without breaking or replacing our trusted MUMPS ecosystem.

Instead of fighting the "SQL vs. NoSQL/Globals" battle or planning complex migrations, the idea here is pure coexistence. By integrating a lean C layer directly into the MUMPS core engine, we can now execute full relational queries, schemas, and live transaction blocks (with explicit COMMIT and ROLLBACK control) natively—right out of our standard MUMPS code.

Your legacy globals remain untouched and run at full native speed. But whenever a programmer needs complex relational filtering or structured data access, they can stream results directly into local MUMPS symbols using a high-speed chunking mechanism and an automated dictionary mapper.

It’s about giving developers the best of both worlds under the exact same roof, keeping MUMPS as the master orchestrator.

The project is open-source and based on the Raymond Newman MUMPS engine structure. If you're curious about the architecture or want to look at the implementation, you are more than welcome to check out the repository:

https://github.com/rafifarchi/hybrid-mumps-engine/tree/main

Would love to hear your thoughts!

Best regards,
Farchi Rafi

David Whitten

unread,
Jul 3, 2026, 6:09:14 PM (5 days ago) Jul 3
to hard...@googlegroups.com
Are you aware that M programs are able to embed SQL using the &SQL ( ) syntax ?
InterSystems, Yottadb, GT.m and other M implementations all use this because it has long been the standard. 

The tricky thing is tying the relational table, rows, columns and system tables together with M data structures. 

Some systems allow you to specify an M variable to correspond to the SQL variables. 

Some systems allow you to map an arbitrary level of a global to an SQL table. 

Have you thought about these things?

Dave Whitten 
--
--
http://groups.google.com/group/Hardhats
To unsubscribe, send email to Hardhats+unsubscribe@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hardhats/ea719c12-8c6d-4c09-918b-789f4ad3d448n%40googlegroups.com.

rafi farchi

unread,
Jul 4, 2026, 2:43:27 PM (4 days ago) Jul 4
to Hardhats
Hey Dave,

Yeah, I'm familiar with the ANSI standard and how InterSystems does it. The problem with YottaDB/GT.M is that they don't have that native SQL engine built-in like IRIS does. You usually end up needing some heavy pre-processors or clumsy mapping files to bridge the gap, which defeats the purpose.

That's exactly why I'm looking at this from a different angle. I'm currently working on a lightweight, bi-directional gateway at the C layer to connect YottaDB directly with PostgreSQL.

Instead of fighting with complex global-to-table mappings that slow things down, the idea is to let the M application interact with a real relational DB synchronously in memory, using a single clean entry point. It keeps the core NoSQL speed but gives you instant access to proper SQL execution when you need it, without the boilerplate.

Still benchmarking it, but the initial results look pretty promising.

On Saturday, July 4, 2026 at 1:09:14 AM UTC+3 David Whitten wrote:
Are you aware that M programs are able to embed SQL using the &SQL ( ) syntax ?
InterSystems, Yottadb, GT.m and other M implementations all use this because it has long been the standard. 

The tricky thing is tying the relational table, rows, columns and system tables together with M data structures. 

Some systems allow you to specify an M variable to correspond to the SQL variables. 

Some systems allow you to map an arbitrary level of a global to an SQL table. 

Have you thought about these things?

Dave Whitten 

On Tuesday, June 30, 2026, rafi farchi <rafi....@gmail.com> wrote:
Subject: A bridge between worlds: Native MUMPS & Relational SQL in perfect coexistence

Hi everyone,

I wanted to share a small milestone from a project I’ve been working on, driven by a simple vision: enabling modern relational database capabilities without breaking or replacing our trusted MUMPS ecosystem.

Instead of fighting the "SQL vs. NoSQL/Globals" battle or planning complex migrations, the idea here is pure coexistence. By integrating a lean C layer directly into the MUMPS core engine, we can now execute full relational queries, schemas, and live transaction blocks (with explicit COMMIT and ROLLBACK control) natively—right out of our standard MUMPS code.

Your legacy globals remain untouched and run at full native speed. But whenever a programmer needs complex relational filtering or structured data access, they can stream results directly into local MUMPS symbols using a high-speed chunking mechanism and an automated dictionary mapper.

It’s about giving developers the best of both worlds under the exact same roof, keeping MUMPS as the master orchestrator.

The project is open-source and based on the Raymond Newman MUMPS engine structure. If you're curious about the architecture or want to look at the implementation, you are more than welcome to check out the repository:

https://github.com/rafifarchi/hybrid-mumps-engine/tree/main

Would love to hear your thoughts!

Best regards,
Farchi Rafi



---
You received this message because you are subscribed to the Google Groups "Hardhats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hardhats+u...@googlegroups.com.

rafi farchi

unread,
Jul 4, 2026, 2:59:13 PM (4 days ago) Jul 4
to Hardhats
This is a basic example how it kiojs kije

DEMO2
TESTL ;
 NEW DB,SQL,CHUNKS,REC,ROWCNT
 SET DB="Sqite local"
 SET SQL="SELECT id USERID, name USRNAME FROM users"
 SET CHUNKS=$$QUERY^%SQLAPI(DB,SQL,"R")
 IF CHUNKS=0 QUIT
 SET ROWCNT=0
 FOR  DO  QUIT:REC="NILL"
 .SET REC=$$GETNXTR^%SQLAPI("R")
 .QUIT:REC="NILL"
 .SET ROWCNT=ROWCNT+1
 .DO SPLITR^%SQLAPI(REC,SQLCOLS,ROWCNT)
 FOR I=1:1:ROWCNT DO
 .WRITE !,"Row: ",I," -> ID: ",USERID(I)," Name: ",USRNAME(I)
 QUIT

Sam Habiel

unread,
Jul 6, 2026, 12:17:16 PM (2 days ago) Jul 6
to hard...@googlegroups.com
Rafi,

>  The problem with YottaDB/GT.M is that they don't have that native SQL engine built-in like IRIS does.

I am not sure if you are aware of the existence of Octo: https://docs.yottadb.com/Octo/intro.html. This is very native to YottaDB... it's an SQL engine built on top of it.

--Sam

Chris Munt

unread,
Jul 6, 2026, 1:20:35 PM (2 days ago) Jul 6
to hard...@googlegroups.com
Additionally, there’s MGateway’s mgsql which is a M based SQL engine written entirely in M code with no external dependencies, apart from the ODBC driver of course. This engine, while relatively new as an Open Source solution, has development roots back in the late 1980s.

So you’re spoilt for choice!

Chris.

Sent from my iPhone

On 6 Jul 2026, at 17:17, Sam Habiel <sam.h...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages