0

Rebol has a standard abstraction in dealing with databases but the documentation all pretty much relates to the now very old Rebol2.

What approach is required to write a protocol in Rebol3 to interface to MongoDB given that Rebol3 uses asynchronous tcp and the previously written documentation appears to be a synchronous approach?

Graham Chiu
  • 4,856
  • 1
  • 23
  • 41
user310291
  • 36,946
  • 82
  • 271
  • 487
  • https://github.com/onetom/rebol-red-sublime Rebol, Red and Red/System syntax highlighting for Sublime Text 2/3 – Graham Chiu May 31 '17 at 22:44
  • I'll again cite [chat](https://chat.stackoverflow.com/rooms/291/rebol), and [the (new) forum](https://forum.rebol.info) as good places to go for open-ended questions that may not be a fit for StackOverflow proper... – HostileFork says dont trust SE Jun 03 '17 at 00:54

1 Answers1

2

From here

The MongoDB Wire Protocol is a simple socket-based, request-response style protocol. Clients communicate with the database server through a regular TCP/IP socket.

Rebol is quite capable of handling such protocols and they are easy enough for users to write. You can look at examples such as the SMTP and POP3 ones to see how the async mode is transformed to sync.

MongoDB also uses a binary format of JSON called BSON and Rebol has libraries already dealing with JSON which is not surprising given that Rebol was one of the inspirations for JSON.

Graham Chiu
  • 4,856
  • 1
  • 23
  • 41
  • it may be simple for a rebol guru but not for others like the guy above or me :) So I'll give it up on Rebol for this one and take on NodeJs instead. – user310291 Jun 01 '17 at 02:06