How to interact with sub-server through main server - web-services

I have a central server and some sub-servers. Each sub-server has a webpage. I want to access to these webpages through central server's webpage.
My current idea is: in each sub-server, implement a web service beside the webpage. The central server only need to call these services.
Another encountered issue, I place DB in the central server, sub-server have to connect to central server to get data.
My questions are:
Are there any ways to access the sub-server's webpage through central server?
If central server dies, I cannot access to sub server. I don't expect this!!!! Is there any way to place the DB.
diagram of the system: http://www.gliffy.com/go/publish/image/4963000/L.png
To reduce the traffic for the central server, APs communicate with sub-server, then central server manage these sub-server

Related

How to sync my local database of my web app to database of my deployed web app?

So my project is a school distributed system based on django web framework. My web app will be deployed in every school on their local computers. And all of the data on those computer will by synced with a main server on my side. What I want is how to implement a solution that would help me sync files/data with my server such that if some file/data is changed on a local computer it'll replicate itself in our server and if I change some file/data on my server, it'll update on those local computers whenever they get an internet connection.

Web app using Hyperledger Composer REST Server

I'm building a Web application as an interface for a Business Network. I would like to reuse some of the REST Server functionality (e.g. GitHub login and storing cards in a MongoDB database) but do a few things differently. For example, I want to generate all cards on the server, so that the users won't have to upload them. Plus, I need to serve the static files from somewhere. I'm trying to figure which architecture I should use.
The app would serve 10's - 100's of users, potentially scaling to 100's of 1000's.
So far, I thought about these options:
1. Have a different app on a different port; REST endpoints called from the client.
2. Same, but REST endpoints called from the server (also means that I'll have to forward the login process somehow).
3. Extend the REST server with custom functionality (is it possible?).
4. Don't use the REST server but steal some of its code to use it in my app.
Questions:
Is it possible to extend the REST server with custom routes?
What is the recommended architecture for a Web interface for a Business Network in production?
Yes you can take the REST server and customise, its open source
See https://github.com/hyperledger/composer-knowledge-wiki/blob/latest/knowledge.md#information_source--node-js-application-development-questions-eg-build-real-time-apps-login-etc for some insights, resources and guidance. The business network is essentially a smart contract (including transaction logic, code, queries, access control lists etc etc) deployed to a blockchain runtime (running as native chaincode in Fabric). Your web interface to interact with the ledger (ie through business network cards stored in wallets (whether server based or cloud based ) could be using Angular (app) / Typescript / React JS (for UI elements) but the salient point is that you can interact with the deployed business network card using the Composer APIs, JS and REST. The application users would interact from the app, using their business network cards, which connection info, the user's blockchain identity and some other metadata. See more info here on Composer's architecture.

Coldfusion remote server Monitoring

We have 5 servers running on the same network. We have already enabled ColdFusion server monitoring on the local server. Is there a way I can see the status of all remote machines - on one machine - just like SeeFusion?
The Admin API giving us this much freedom.
You can use Server Manager powered by Adobe AIR
Monitor multiple servers
Server Manager provides different views to monitor servers that you
register with the application. To toggle between these views, click
the required view icon from the upper-right corner.

AppHarbor: Communication between Web App and Background Worker

I have two questions, but let me set the stage first:
Say you have a typical scenario where you have a web application and a mid-tier web service.
The web application receives a request from the user, queries the web service and sends a response to the user.
If the web service and the web application were running on the same machine, the web app would go through localhost:port to access the web service.
(I do understand that AppHarbor web and background workers are not running on traditional machines but it's easier to use that metaphor)
To make this slightly complex, the web service is actually a console app running a HTTP server and thus acting as a web service, let's call it webservice.exe.
My first question is: will AppHarbor run webservice.exe on the same machine as the web application and so enable the web application to access the web service via localhost:port.
If not, will the machine name where the console app is running always be static (which allows web app to reliably access machinename:port). If so, will the webservice.exe machine allow incoming connections from the web application machine?
My second question is if both apps run on the same machine (the localhost scenario), will external users be able to access webservice.exe via myapp.apphb.com:port ?
Thanks!!
AppHarbor does not currently support background workers (which is where your console application would be running) attaching to ports.
If you instead decide to host the service in an ASP.NET application and run it in a web worker on AppHarbor (as a normal web site), then it would be available at myawesomeapplication.apphb.com or using a custom hostname if you decide to add one.
If the service-abstraction is not needed, you might also want to just do away with it and fold it into the main web site.

Synchronize changes in SQL Server database with its remote client databases

Which is the best way to synchronize a SQL Server database with its remote client databases? Web services/any other built-in features available in SQL Server?
Application details:- Wpf desktop with SQL Server 2005.
The scenario is client’s main office having stock management database. Same database structure implemented in client’s remote outlets. New stocks are adding in main office database. Whenever a new row is added to head-office database, need to inform all remote client SQL Server databases. And whenever a change happens in remote client outlet, need to send back the changes to main office database.
Thanks in advance.
After a lot of research I ended up with followings
1. Sql Server Replication
2. SymmetricDS
3. Microsoft Sync Framework
4. Customized WCF service.(An Example)
I chose customized WCF service for synchronizing DBs. The steps adopted are mentioned here.
1. Created an Index Table. This table holds the transaction history and signature of client.
2. Created a service layer (class library) which receives and returns table rows as stateless DTO objects. This service layer referencing a Data Access Layer which is responsible for communicating with database.
This service layer & Data Access Layer are referenced by WCF service and windows service.
3. Created one WCF service and hosted it in IIS of web server, This service offers:
a). Download(DTOClass dto)
b). Upload(DTOClass dto) service contracts.
4. Created one Windows service and deployed it in multiple client locations. This service consumes the WCF service hosted in Webserver IIS.
Windows services from client location communicate with WCF service at specific intervals, if a new update available in main server database(this information available in IndexTables), windows service downloads the update (using Download(DTOClass dto) contract) and update local database.
Likewise, if any changes happen in local database, windows service handover the changes to WCF service(using Upload(DTOClass dto) contract). WCF service then update master database.
Since both services accessing Database servers locally, this result in better performance.