Using MongoDB in a Cocoa app - objective-c

I would like to use MongoDB directly at client side of an Mac OSX app, i.e. I want to store my models in a mongoDB. Is this possible? Most of the documents I saw explained how to access mongoDB that is present in a server.

There are undoubtedly a lot of other options for databases, even Mongo-like databases, but if you want to use Mongo on the client, by far the simplest way is to run Mongo as a separate process on your client machine. Using Homebrew or the 10gen Mac installer you can have it running in a few minutes. By default the server doesn't require authentication, so there's almost nothing to configure.
I wrote ObjCMongoDB. Using that it's simple to interact with the local instance.
A local instance plus a driver is the same way you'd build an application if you were required to use say PostgreSQL or MySQL – though again, there are other options for databases. It's perhaps a little easier with Mongo since collections just pop into existence when you start using them.
There's not an easy way to embed Mongo into a Cocoa app.

If you want something like MongoDB running on the client side, I'ld recommend you to use ejdb instead. It's specifically built for that purpose.
It aims to be a fast MongoDB-like library which can be embedded into
C/C++/NodeJS/Python/Lua/Java/Ruby applications under terms of LGPL
license.

Related

scyllabd ui access for querying data

I have scyllaDB installed in cloud. I want to run queries and check the data. Is there any way to access it by any desktop UI client or does by default it provides any web UI to access it
Thanks
The typical interface with ScyllaDB is cqlsh which is command line. Documentation is at https://docs.scylladb.com/getting-started/cqlsh/
There are a few GUIs that claim to be front-ends for Cassandra. These should work for Scylla, but I've never used them.

Porting web application to Chrome OS (with multi-monitor support)

I'm in the process of porting an application to ChromeOS with the requirement that it should look and feel as native as possible. This means in particular that it should allow things such as multi-monitor support and USB support.
One possibility would be to implement it as a web application (since we have already a web client), but in this case I would need to add support for native features (again, multi-monitor support and USB device access), so I wonder what needs to be done in this case. My wild guess as a ChromeOS developer newbie is that I would need to extend the code with ChromeOS JavaScript features, and I don't know if this is possible.
Another possible approach would be to write an Android application, since I see that ChromeOS added support for Android applications (in this case I would have to write the code from scratch).
Finally, another option would be to write native code, which could be possible for example relying on a Crouton development environment, and reuse the code of a native C application.
What approach would you recommend to build a ChromeOS application starting from a web application or from a native one?
What approach would guarantee access to native features (multi-monitor support and USB)?
I discovered two APIs which should help with multi-monitor support:
https://developer.chrome.com/extensions/windows
https://developer.chrome.com/apps/system_display
The system.display API allows one to discover and monitor the current monitor layout, while the windows API allows one to create several windows in the same application. By combining these ones I should be able to create a window for each monitor in case I go with the chrome implementation route.
Given that I already have a native implementation for Linux, Crostini (as opposed to Crouton) is also very appealing since it provides a deeper level of integration with virtually no changes to the code and no need to maintain two different versions of the web client, with the only downside that it requires the user to create a Linux environment and manually install the application, also it is not supported on all chromebook devices and on many it will be never supported.
I still need to check what is the performance overhead. Also the level of integration with USB I/O might be higher than the one achievable by using the chrome API.

backup/restore openrdf-sesame repository in production

I use openrdf-sesame memoryStore(persist) and native store as my data stores.
Whats the standard/recommended way of backup/restore my datastores?
Is there any supported api?
I run sesame standalone server.
You can quite easily create something yourself, just by using RepositoryConnection.export. However, there are also a few ready-made (commandline) tools available, for example this simple sesame-backup tool (disclaimer: I developed that). Download, install, and stick in a cronjob to have it make regular scheduled backups.

can Dart be used for basic CRUD web application?

I just discovered this Language and I'd like to know if it's possible to make basic CRUD web app using a database.
There are libraries for mysql and postgresql, and the core library provides a web server with HTTP, HTTPS and WebSocket support.
There is a templating library which isn't part of the official release. And, there is also a community mustache port (I don't think it builds at the moment, so you may need to fix it).
So it's definitely possible. But you'll be an early adopter. If you want to get stuff done quick, I'd choose something else, but if you're wanting to learn new skills, dive in.
Sure. It's a pretty new language though so you aren't going to find the robust library support you will in other languages just yet. It's rapidly growing however so I don't think it will be long. You can either write your server in dart or write your server in another language and expose a basic HTTP interface for your Dart client to consume.
Here is an example of writing a simple web application which creates and stores "blog" posts. Both the client and server are written in Dart. The database is MongoDB.
Also check out this question for more information.

can i make web server to be index server?

i need to build index server for p2p (games) application
can i just use web server(lighttpd) and extend it with some plug in?
is there any problem with this method?
Twisted is a framework for creating network applications. It's written in Python. You could use this to write your indexing server.
Not knowing any more about what kind of server you are wanting to write makes it impossible to say anything more, but it is unlikely that you can just extend an existing web server with some plugins.