C# - Querying Multiple Databases Using Distributed Web Services?

Feb 5, 2011

I have a quick question about best practices and especially expected performance for the following scenario:

If I want to query data from multiple servers that contain schematically identital sql databases, would having each server provide a web method that a single client application can consume be an appropriate (and relatively fast) solution?

The data just needs to be consolidated on the client end, where several web methods would have to be consumed serially (or in parallel?) to provide the data to the client. Each server would also be implementing Entity Framework as an ORM.

Performance is my main concern here, would it turn out excessively slow as we start to scale up to more and more servers?

View 2 Replies


Similar Messages:

ToList And Querying Multiple Entities?

May 13, 2010

I have the following code for the SelectedIndexChanged event of a drop down list. This works fine as it is but this entity has a relationship to another entity (Genre). if i change the select statement to { m, m.Genre.MovieGenre }).ToList(); it doesnt work as contains anonomyous types.

[code].....

View 1 Replies

Architecture :: Distributed Caching / Keeping Cache In Sync Between Multiple Webservers Or Even Better Farm Cache Management To Another Server?

Feb 26, 2010

I've got a web application that runs of a state server. It looks like soon it may need to distributed and there will be two web servers behind a load balancer.

This works great for session state but my next challenge is Cache

My application leverages heavily of cache. I understand ASP.Net 4.0 will be offering more here but nothing much has been said about the how too.

There are two challenges that I face

1). Each webserver will have its own copy of cache whereas it would be more efficient to put this to a third server the same as session state is put to state server.

2). The real challenge is keeping cache in sync if a simple dataset derived from the database is changed my code dumps that cache item and reloads the cache. That's all well on one webserver but webserver number two wont know to drop that particular cache item and reload it. This could cause some unexpected problems in the application.

For scenario number 2 I could attempt to do some smart coding so server number two knows to dump the cache and reload it.

My guess is someone else has already been here before and there's probably a better implementation approach rather than writing extra code.

Does anyone know how I could achieve the goal of keeping Cache in sync between multiple webservers or even better farm Cache management to another server?

View 2 Replies

Databases :: Data Access Layer For Multiple Databases?

Jul 6, 2010

i want to develop a data access layer ,it can support multiple database like oracle ,Mssqlserver and Mysql using enterprise library and C#.net 3.5 based on database connection

View 1 Replies

DataSource Controls :: How To Create Multiple Records In A Dataset From Multiple Databases

Mar 7, 2011

I am trying to design my logic to do this but I want to create a dataSet which will have records from several databases, The records all have the same layout.

I am reagin the connection string paths from a table in a database.

I am asking for your help in trying figure out my logic.

Should I use the connectionString builder in conjunction with a loop to Connect, read a record into a dataset Until therer are no more records to be read from my databse table with the database name/paths tables ?

Here is my beginning code which deals with one database:

[Code]....

View 2 Replies

C# - Multiple Hops Impersonation In .NET And Web Services?

Sep 28, 2010

I have old school web service and it is configured to impersonate the caller. Works with no problem. Now I am thinking about adding another more higher level ASP.NET (non-wcf) web service which would be calling the original web service.The question is - will the client identity flow across two hops as in client (1)-> new web service (2)-> old web service) or there will be issues?

View 2 Replies

Calling Multiple Web Services Asynchronously From A Web Page?

Jul 13, 2010

I make an asynchronous call from one web service to another web service deployed on different server? The scenario is that an ASP.NET webforms page will call a web service in an async manner. This particular web service will then make another async call to a second web service deployed on different web server. This this possible to achieve, and what additional steps or code would be necessary to make this happen?

View 1 Replies

Will Transactionscope Work Over Multiple Calls To Different Services

Jun 18, 2010

I'm writing some merge functionality in C# asp.NET MVC2. I am also using using Linq2SQL.

I have a block of code which calls two services, MessageService and UserService. These both in term call their appropriate repositories and make the amendments to the db. Each repository declares it's own instance of the repository so I'm thinking this will escalate the following code to DTC . The code is called from the AccountService, is this going to work at this level? And also is it bad practise to declare the DataContext at the top of every repository or should I pass the object around somehow?
//Run the merge
try
{
using (TransactionScope scope = new TransactionScope()) [code]....

View 2 Replies

Architecture :: Design On Calling Multiple Web Services

Feb 23, 2011

My requirement is i need to display some quotes from some vendors in my User Interface. Some of the quote details will be fetched from database where as some vendors are giving web services to get the quote results. I need to combine the quotes from database as well as the various web service response and display in the grid.

View 1 Replies

Caching Over Distributed Application On Servers?

Aug 22, 2010

I have a web application that will be distributed over 2 servers and the Database will be on a server other than the 2 servers. so application on each server will access database exists in another server.I am using caching in the application and when data changed the cache is cleared and the problem now how each server will feel with cache changes on the other server?

I have tried SQLCache dependency before and i have heard about Memcached, Velocity and Enterprise cache so which one will be more efficient and optimal for this case? and i have another solution to create webservice method on each application and when the cache is cleared in one application it will request the webservice method on the other application to clear cache there.

Which technique is more efficient and optimal in performance and security? and is SQLCache dependency related to SQL database only or can be applicable to other databases like Oracle?

Note: I am using load balancer to distribute requests coming for the application among the 2 server

View 1 Replies

C# - Distributed Critical Section In Web-farm?

Mar 18, 2011

I have about 50 web-sites, load-balanced across 5 web-servers. They all use Enterprise Library Caching, and access the same Caching database. The items in the Caching database are refreshed every few hours, using an ICacheItemRefreshAction implementation.I want to guarantee that only one web-site ever refreshes the cache, by putting the refresh code in a critical section. If the web-sites were running in a single app-pool on a single server, I could use a lock()If the web-sites were running in separate app-pools on a single server, I could use a Mutex.However, these will not ensure the critical section across multiple web-servers.Currently, I am creating a new key in the caching database to act as a mutex. This will generally work, but I can see a slim chance that 2 processes could enter the critical section.

public class TakeLongTimeToRefresh : ICacheItemRefreshAction
{
#region ICacheItemRefreshAction Members

[code]...

View 2 Replies

MSDTC Distributed Transaction Coordinator Enabling?

Feb 24, 2011

I've a web server and a separate SQL server. I'm trying to use transaction scope to ensure that SQL queries are completed with my linq queries.

I wrap everything with this

using (TransactionScope scope = new TransactionScope())

I want to know where I need to install DTC. Do I need to install it on the IIS 7.5 box AND the SQL server? Do I need to unblock some ports? Are there any security risk in doing so?

I've setup this up once before but don't remember how. If I can't get access to DTC then is there any other way to ensure a lINQ and sql query is atomic?

View 1 Replies

Generating Multiple Excel Sheet Using Reporting Services 2005?

Aug 31, 2010

I'm currently developing a program using ASP.NET 2.0 (C#) and i am using Reporting Services 2005. One of the report requirements is to export a data to an excel with multiple excel sheet.

Is there other way to generate multiple excel sheet using the reporting services? if yes, i would like to ask a sample code..

View 6 Replies

Configuring Web.config (system.serviceModel) For A Website Which Talks To Multiple Web Services?

Feb 8, 2011

I've a solution which consists of a web project and a class library project. The web project solution directly references a wcf service. There is a 2nd wcf service, but it is the class library project which directly references it. I'm adding the class library (output) as reference to my web project.

Hence in my web project's web.config I now have two scf services configured. This process was easy since I had manually copied the app.config (system.serviceModel part) directly to the web.config, and then configured the web project to talk directly with another wcf service (directly, not through any dlls).

My web project needs to talk to a 3rd web service (asmx). Again I plan to bring this as a class library and include the dll into my web project. (This is a separate solution). When I took a look at this particular class lib project's app.config, I thought i just copy those necessary sections and merge it correspondingly with my current web.config.

So for the 3rd class lib project (which references the asmx service) I happened to notice that it had, under the bindings node, a node called basicHttpBinding, and next, a customBinding. Then further under the client node, there were two endpoint nodes which had the service attributes. (I don't understand why there should be two end points here first of all).

So I copied what came under the bindings node (from the 3rd class lib prj app.config) and appended it to the bindings node (in the web.config). I did a similar process for copying the end points too. But now when I try run the web site I get an exception which halts at the time of initializing the soap client (asmx service): it says something like its not able to determine the endpoint for this contract.

The web.config before I add the asmx web service looks like this:

[code]....

View 1 Replies

Crystal Reports :: Unable To Find Data File When Distributed?

May 14, 2010

I have a problem that i'm sure will not be hard to fix for anyone who has been using CR for some time.

To start I have created a program in VB2008, that uses a MS Access data file, I can connect to it with no problem and can also add data and amend data, so all seems to work perfectly. I have published it and it once again runs perfectly on another/s machines.

I have now a requirement for a number of reports so have choosen CR for this purpose. I have connected the report to the database and that runs with no problems at all, that is untill I try to run it on another machine, it seems not to be able to find the database and comes up with a panel wanting me to log in with a password and Admin name.

I feel it's proberly a problem with the path of the database, I have tried so many time with diferent data files but with no success.

View 6 Replies

Databases :: Update Multiple Row With Different Value?

Feb 7, 2011

I have to update multiple row and two column of each row.

I have try to Update with case statement but after I perform that statement it blank out every other column that doesn't fall into the criteria of the update statement.

My table structure is like this;

table1
col1
row1 11
row2 22

I want to update row1 and row2 of their col1 in one single sql , how do i do that?

View 4 Replies

Multiple (Distinct) Databases With OpenSessionInView

Aug 11, 2010

In my web application, I have 2 totally different databases - one that's being used mostly by a CMS from which we'd like to get page information on non CMS pages on the same website, & one that contains totally different data. Is it possible to use Spring.NET's Open Session In View module with multiple session factories for both of those databases, so in this case I have 2 objects defined in spring.config of type Spring.Data.NHibernate.LocalSessionFactoryObject?

View 1 Replies

Databases :: Multiple Transactions In One Method?

Nov 10, 2010

I have an application which connect to oracle db.

I have two database hitting functions.

One is adding Userdetails(Fn Name : AddUserDtls) and another one adding address details(Fn name : AddAddresDtls) based on UserName which will get added after execution of first method ie AddUserDtls.

Problem I am facing is :

I have a single transaction and in that I have all the methods.

After the execution of first method,with out commiting i will go to second method.

and if any error occurs in second method.

I will rollback everything including the changes made by first method also.

Here one issue is there.

Since I am not committing the changes made by first method,

While I am executing the second method I am getting error that 'No user Name exists'

I understood that if we commit the transaction before the second method starts ,it will solve the issue.

But then it creates another problem.If some problem araise in the second method,then I cannot rollback the changes made by first method since it aleready commited.

View 1 Replies

Databases :: Bind Multiple Parameter By Name?

Dec 15, 2010

In following code I am binding two parameter by name. Program compile successfully but output isn't coming.

cmd = new OracleCommand("select * from books where book_id=:bid and title=:rat", conn);
OracleParameter op = new OracleParameter();

View 2 Replies

Databases :: Update Multiple Column Using Sub Query?

Apr 1, 2011

I want to update multiple column of a table using subquery ...My sample code is shown below

[Code]....

its throwing syntax error...I dont know where i commiting mistake.

View 1 Replies

Databases :: Multiple Select With Single Group By?

Jun 24, 2010

if we are trying to add the several columns in select statement and only one condition in group by.

how can we do that ?

Example:

[code].....

View 1 Replies

Sharing State Databases Between Multiple Apps

Apr 7, 2010

Is it better for a collection of ASP.NET web apps to share the same session database, or should each one have its own? If there is no significant difference, having a single database would be preferable due to easier maintenance. Background My team has an assortment of ASP.NET web apps, all written in either Monorail 1.1 or ASP.NET MVC 1.0. Each app currently uses a dedicated session state database. I'm working on adding a new site to that list, and am debating whether I should create another new session database, or just share an existing one with another app.

View 1 Replies

Architecture :: Web Application Connecting To Multiple Databases?

Sep 17, 2010

I am supposed to develop an enterprise-class ASP.NET Web Application that connects to multiple databases. For example when the web form loads, I should populate different ASP.NET controls (GridView, DataPager, TextBox, DropdownList etc) from multiple databases (SQL Server, Oracle, DB2, SAP Server etc) and also, edit the data in the controls and save the data to the respective databases on button submit.

Should I use Web Service or WCF for data integration, if so is there a limit on the size of the data?

What should be the architecture considering the application should be scalable and easy to maintain?

View 2 Replies

DataSource Controls :: How To Connect To Multiple Databases

Jun 8, 2010

i want to know how to connect to multiple databases in sql from our asp.net code??

View 4 Replies

Databases :: Best Way To Insert Data Into Multiple Tables?

Jan 22, 2010

I am using mysql as my database.From one of my web pages I want to insert data to 4 tables.All the data should be inserted to these different tables on a single button click from the web page.How can I achieve this?Which is most reliable way to insert data to multiple tables on a single click event?

Will the sql operation with 4 'insert' statements separated by semicolon work for me?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved