Open DevAndArtist opened 8 years ago
While I'd love to see Realm Swift support Linux, there's a lot of work that needs to happen, both in the Swift language itself and in Realm. See realm/realm-cocoa#3263 for details there.
In the meantime, it should be possible for the Realm Object Server Enterprise Edition to interface with other servers, written on stacks other than Node.js by writing a small "bridge". This could be done by exposing a RESTful API from our Node.js SDK to proxy certain Realm operations that could then be invoked and accessed from your Vapor server.
Wouldn't be great to have a Driver/Provider for Vapor?
Oh yes it would be really great 👍 😀
@jpsim I was just linked into this issue. I'm a huge fan of Realm, and we have had future plans for a while to integrate w/ Realm on the mobile side when iOS integration with Vapor/SwiftPM improves. This is however, the first I'm learning about the Object Server. I didn't know that this existed previously.
I'm assuming it's a c library, and I'm wondering if you have an idea what it would take to setup a module map so that we can call it directly in Swift. I don't see it on the repositories, but if it's open source somewhere, we might be able to format it to be compiled directly by SwiftPM for easy deployment anywhere.
I'm mostly thinking out loud here and haven't done much investigation, so let me know if I'm way off base.
The Realm Object Server is a Node.js app, along with an NPM module available to our enterprise customers. You can learn more about it on our website here: https://realm.io/products/realm-mobile-platform/
So you won't be able to access it from Swift on Linux using a module map, but you could expose certain functionality to be accessible from Swift if you're an enterprise customer like I wrote in my last comment in this thread (https://github.com/realm/realm-mobile-platform/issues/25#issuecomment-254971042).
@jpsim thanks for your response, sorry I misunderstood the original. I thought you were referring to an NPM wrapper on top of underlying lib.
Really appreciate the clarification 👍
I'm not sure if this is the right corner to post this or if the idea is totally out of scope for any future release of the mobile platform, but it's worth asking.
Some notes about my project:
Swift
).The Developer license of Realm MP solves a few things for me:
The upcoming Pro license might fill a few more gaps:
What not even the Enterprise license can do for me is the ability to focus on a single language.
Here comes Vapor into the game. It's an elegant and easy to use Swift package to build a backend.
Since the Developer license offers us the ability to store data on a linux machine, just like other databases do.
Wouldn't be great to have a Driver/Provider for Vapor?
That way we could finally use Realm as a DB for our own backends. This also might allow us to share some data structures between the client and the backend codebase.