I am planning to build a production application for a small & medium business. This is an intranet application with maximum 15 to 30 concurrent users. The proposed architecture is:
Client: Firefox browser
UI: HTML, JavaScript, CSS
Communication via: jQuery AJAX
Middle Tier: Window Service hosting WCF Service (using webHttpBinding)
Database: SQLServer 2012 Express Edition
In this architecture the missing part is a WebServer that will serve the static HTML pages. I do not want to go in with IIS mainly because of the following reasons:
Keep the cost of deployment down
Most of work is being done in the Window Service hosting WCF Service
Since most of the middle tier work is done by my Window Service hosting WCF Service and my UI is HTML, JavaScript & CSS, can we do away with the WebServer like IIS or other WebServers supporting ASP.NET technology and use a lightweight WebServers which serves only static HTML pages something like lighttpd, nginx etc?
Are these light weight WebServers like lighttpd, nginx suitable to host in production environment.
There might be an issue of AJAX Cross Domain requests as Window Service hosting WCF Service and the lightweight WebServer may run on different port but on the same IP address. We can probably overcome this by opening it up to cross domain requests as it’s an intranet application.
One of the ideas behind this architecture is that I want to try and reuse this in other projects which are bigger in size.
Please let me know if this is possible and the related pros & cons of this approach. I am also open to any other suggestions which will help me improve this architecture.
I think you're overdesigning it for such a small site. If you're anyway going to run a WCF service it shouldn't be a problem to use IIS.
I'd suggest to either use ASP.NET MVC and do the html rendering on the server, or to go for a client side library such as angular.js in combination with Web API.
Related
I have two applications hosted and running in IIS in my windows server.
App A: Dot net core 3.1 application running on 80/443 port handling requests from external clients.
Site B: Hosted on a different port, say 32342, which has sensitive data and serving html pages.
App A is exposed to external network. Site B is behind firewall and not exposed to outside network (Port is blocked by firewall).
Whenever a new request comes to App A, after authentication, it should serve corresponding page from the Site B.
After searching several options, I came up with the option of Server.Transfer(). Unfortunately, it is not supported in Dot net core 3.1
I read about URL Rewrite. But it rewrites all the requests. I just need to serve contents from different server after authentication only for couple of controllers. How do I achieve this inside a Controller.?
(Other better options to serve webpages after authentication is also welcome).
I'm not 100% sure if I'm on the correct section but i'll transfer the post once I know where it's supposed to be but I am looking for advice regarding web development, setting up a domain and hosting it.
I'm currently working on a personal project using Cloud9. Which is an online development environment where I can develop and host. The reason why I chose this is because it has MySQL usability as I retrieve and store data on the project I am working on.
I am now at the point where I want to get a domain and host a site to transfer my project over to a live website with my own domain which also has SQL/MySQL usability.
Any advice or where would be the best place to look up on methods of pursuing this?
Edit: I develop using PHP and JavaScript with MySQL
To start I would suggest heroku, they have a free option and some nice guides, depending on which server side language you use . This way you can get used to hosting some apps and doing deployments, seeing logs etc.
The database doesn't have to be on the same hosting necessarily, you can use mongolab for example.
For domain names it's a different thing, you will have to use the likes of godaddy
Why not setup your own VPS (Virtual Private Server)? There are many providers..
Design the software application with portability and avoid vendor lock-in to cloud services. For file transfer, there are FTP/FXP, zip/gzip, & version control standards like Git, CVS, SVN, etc. Use phpMyAdmin for the database export & import process to change web hosts. Otherwise, build a staging subdomain or a local development environment with copies of the original web app & use those to transfer files+DB to a new host for production.
I am trying to develop an HTML5 app to be ported to native via PhoneGap. Is it possible for the app to be able to act as a server on a mobile device, with the same app on another mobile device acting as a client and connecting to the former? This is all within a local network.
I am new to PhoneGap and I understand that most server implementations are on platforms such as node.js or PHP and that PhoneGap only supports HTML, CSS and JavaScript. I think I might be partially wrong here as there are various plugins that could help ease the abstraction between PhoneGap and the native developer.
Other alternative suggestions are very welcome :)
What exactly are you trying do by having a client/server app? I think your best bet would be to have one app that posts and gets info to your own webserver (not an app). Therefore, that one app can act as a server by "publishing" information to the server and the other can act as a client by only reading from the server.
How can I create a webserver from my Obj-C app, and post custom HTML to it?
Thanks!
Check:
SimpleHTTPServer
CocoaHTTPServer
To embed a lightweight HTTP server in iOS or Mac apps, check out GCDWebServer which has a modern and clean architecture designed on top of Grand Central Dispatch.
It would most likely be easier and far more secure to use something like FastCGI and then use an existing HTTP server such as Nginx to serve the HTML that your app passes along rather than trying to embed an HTTP server directly in your application. Plus Nginx is extremely fast and can handle huge server traffic without really breaking a sweat which not all other HTTP servers can say.
Plus using an embedded server means that your app and your HTTP server must run under the same UID which is bad from a security perspective as anyone compromising the HTTP server gains access to all your website files as well.
I recently created a web application with GWT. Then re-used most of the code to create a Swing version of the application that accesses a local database in offline mode. I am now implementing the 'online' mode of the application and want to access the same data as my GWT application.
Any ideas? Considered connecting directly to the MySQL server via SSL, but that's not working and doesn't seem as scalable. Should I use REST?
Any suggestions would be helpful.
To solve this problem in the past, we've used Jersey to create REST Web services which returns protocol buffers. The Swing app would then interact with the protocol buffers. The GWT app would ask for content type 'json' and receive protostuff objects in return. It worked quite well. That way, both apps can communicate with the server in the exact way.
Edit:
To allow your swing app to communicate with GWT-RPC, look at this blog article.