0

I'm trying to run a GT.M database server in such way that It can be accessed from an application server. I know I can invoke GT.M as a sub-process from other languages. I'm trying to see if I can connect that to a socket/port to be accessed from another server, similar to other database connections(ODBC, MongoDB, Cache).

Are there any utilities? Libraries? to accomplish this. I'm more interested in a mechanistic overview.

Community
  • 1
  • 1
Arya Rasouli
  • 250
  • 4
  • 14

2 Answers2

1

The answer is yes, and you have many ways of doing it:

You can run GTCM, part of GT.M. I don't use it, so I don't know much about it, but David Wicksell built it into the Node.js binding to GT.M. More info here: http://tinco.pair.com/bhaskar/gtm/doc/books/ao/UNIX_manual/ch13s02.html and https://github.com/dlwicksell/nodem. Incidentally, you can use Node.js using David's node module.

You can run an M web server: https://github.com/shabiel/M-Web-Server. Look at the documentation folder for examples. Downside is that you have to write some M code (if you don't know M already). This is intended to be used as a web services platform.

--Sam

Sam Habiel
  • 517
  • 3
  • 9
  • From what I understand, GT.CM doesn't allow for invocation of routines/functions on the client/server model. I'm guessing David Wicksell's Nodem will also have the same limitation, since it's wrapping around GT.CM. I'll have to try it and see how it behaves. The M-Web-Server is definitely a good resource, even though I much rather use JavaScript for web than M. Thank you Sam for sharing. – Arya Rasouli Apr 04 '17 at 16:34
  • I don't know how David does it in GT.CM, but he calls procdures and functions. – Sam Habiel Apr 05 '17 at 00:59
0

Have a look at the below link, using this python module you can connect to the DB: https://github.com/fopina/pyfispip.

C4xuxo
  • 18
  • 4
  • I have not seen this before. Thank you! What's your background? I am an M and Web developer mostly involved in the VistA EMR. – Sam Habiel Apr 04 '17 at 12:39
  • This looks like it's meant as a client connection to a DB. I don't see anywhere that it binds a local GTM instance to a port/socket. Am I not understanding this right? – Arya Rasouli Apr 04 '17 at 16:45
  • This is based on [PIP >> https://sourceforge.net/projects/pip/](https://sourceforge.net/projects/pip/). – C4xuxo Apr 05 '17 at 13:52