can Dart be used for basic CRUD web application? - crud

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.

Related

Can RavenDB be interfaced outside of .Net?

Is there a common data interface for RavenDB? For example, how could Java, Python, or even PHP interact with RavenDB?
In RavenDB 3.0 they added a Java client as well. I haven't tried it myself, but you can read about it here:
http://ayende.com/blog/168354/what-is-new-in-ravendb-3-0-jvm-client-api
In that blog post Ayende also mentions:
RavenDB has always been accessible from other platforms. We have users using RavenDB from Python and Node.JS, we also have users using Ruby & PHP, although there isn’t a publicly available resource for that.
With RavenDB 3.0, we release an official Java Client API for RavenDB. Using it is pretty simple if you are familiar with the RavenDB API or the Hibernate API.
So to answer your question: No, there isn't a "common data interface" for everything, but most things are certainly doable.
Almost every ravendb command is available through HTTP via REST.
For version 2.5 it is documented http://ravendb.net/docs/article-page/2.5/csharp/http-api/http-api-single. For version 3 they ommitted that documentation (or it is not available yet), but it is still there.
The client (.net or java) is 'just' a wrapper around those HTTP REST calls that does things like caching, serializing, failover, etc..., to make it much easier to work with RavenDB in your application.

Bare bones API server vs Complete web server for API handling

I was recently developing a socket based system using Lua which was quickly turning into a web server , I wrote a small API which is tightly coupled with the socket logic and I found myself with everything that I needed to have a full fledged API service without worrying about everything else that a conventional web server is usually bundled with. Since I was using OpenID I discovered I don't need a cookie parser in the server logic and since I was only serving JSON data , I skipped implementing file management utilities which by the way are almost 30% of any decent server design.
I think what I developed ended up being a small framework that serves my JSON API , I stress tested the code and I could do up to 10K connection simultaneously since I was am asynchronous sockets and the load on the development computer was alright by me.
Is it advisable to design this way? , I mean I cannot get any good examples from companies that do this from a quick google search but I am sure there are those who do this. I am impressed by the simplicity that I got and the quick design time, most of the time I have to study complex web server internal things in order to accomplish such a task but having written everything incrementally , I seriously discovered that the learning curve is much shorter.
My entire code base is reasonably small excluding the Lua runtime and I can run a twitter like micro blogging service with exemplary error handling via the API. I am now designing the API front-end which will run on a full fledged web server (NGINX) ... I would really like to know if Implementing the API back-end on a dedicated custom stack is the best way to go or maybe I am setting myself up for some pretty crazy surprises in the long run.

Load-testing xmpp server

I am looking for a tool capable of generating multiple Xmpp connections to load-test a XMPP server with a secure connection, especially starttls.
For a xmpp plain text authentication I had used jab_simul(followed this tutorial) and tsung both with success.
But I was unable to use the tolls above for the starttls,I peeked into the code of both tools and tried different configurations of the tools.
Another option I am pondering is using a xmpp library like eXmpp and make a specific load-testing tool myself with, instead of altering jab_simul (C software with comments in language i do not understand) or altering tsung(all purpose load-testing tool, so lots of place where you can go wrong).
short-story - I am looking for a tool or advice to stress-testing/load-testing a xmpp server.
We are facing exactly the same challenge right now. After deep consideration we found out that only especially build software can deliver the load we want to test. (Remember, you can configure ejabberd to something very specific :-)
For that we developed a small library called xmpp_talker https://github.com/burinov/xmpp_talker (Apache Licence) which is a kind of xmpp client made as a gen_server. I find it is a very nice starting point to build any kind of load simulation software. There is also echo_worker example included. So, you have good base to start. At the moment xmpp_talker is suited for exmpp 0.9.7. As far as I know in a few days will be out version 1.0.0. (or 0.9.9?) There are many bug fixes (trust me you don't want to know about them). On monday I will release xmpp_talker for exmpp 0.9.8 with proper service interruption handling.
In case you deside to go the same way xmpp_talker could be useful for you.
Added: Here is also great article that is realted to the topic: https://support.process-one.net/doc/display/EXMPP/Scalable+XMPP+bots+with+erlang+and+exmpp
There's also the recently started XMPP benchmarking project called xmppench which aims to be a high-performance benchmarking tool simulating some reasonable use cases of XMPP servers. It's written in C++, based on Swiften and boost.

Is Mono appropriate for developing servers?

Is Mono appropriate for developing server applications, or only desktop applications? I'd like to develop server applications in C# for Linux. I want to write a First Person Shooter (FPS) game in C#/XNA, and I've a Linux dedicated server. But this question is generally for all types of server applications...
Mono handles ASP.NET (including ASP.NET MVC) quite well. Most other server implementations work very well, as well. It does depend, slightly, on what exactly you are trying to serve, and how you are going to use it.
Mono also supports WCF directly in the core, which allows most non-web service applications to be written very effectively.
Edit:
Given your edit, and your desire to handle the server side of a multi-player FPS game, Mono should work fine. You will likely want to avoid using the high level interfaces like WCF and ASP.NET, and go straight to the System.Net namespace (depends a bit on how many players you'll be synchronizing, but if it's large, you'll want speed here over ease). Mono supports this quite well.
That being said, Mono's support of the System.Net namespace is very good, and quite mature, so you should have no problems using it for the server side of a multiplayer FPS game.
I don't see why not. I believe FogBugz uses Mono to deploy to apache servers.
Here is a conversation about running the FogBugz application on mono as an example of having a server app running on it.
It looks like your needs cover a broad range of different applications.
I think the overall answer would be yes, Mono is appropriate for developer server applications.
As others have pointed out, Mono has ASP.NET support as well as WCF built-in.
You also have the ability of working directly down to the Socket level if you need to squeeze every last bit of performance out of your server application (although you'll have to figure out how to persist state if the need is there).
I'd definitely be interested in seeing the performance difference of something like that between the two platforms (I wouldn't expect much difference...it's possible that Mono might even get slightly better performance because of the rest of the *NIX stack).

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.