top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Suggest a solution for this connection scenario

+1 vote
382 views

I am writing a program where m:1 is the client server ratio. all those m clients send server some information time to time. The clients are written in c# and run as a hidden service.

What should I use to send data to server. File/Webservice/Direct connection to database.. which should be good in terms of resources and bandwidth??

posted Jul 15, 2013 by Ravi Gupta

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

0 votes

Definitely Webservice and here are Top 5 reasons

Security You're not granting DB access to anyone but web server/app user.

DB load reduction Web service can cache the data it retrieved from DB.

Ability for fault tolerance the service can switch between primary/DR data sources without having details of fail-over be implemented by service consumers.

Scalability the service can spread requests between several parallel data sources without having details of the resource picking be implemented by service consumers.

Performance tuning Assuming the alternative is clients running their own queries (and not pre-canned stored procedures), you can be 100% sure that they will start using less than optimal queries. Also, if the web service bounds the set of allowable queries, it can help with your database tuning significantly. I must add that this logic is equally applicable to stored procedures, not unique to web services.

answer Jul 15, 2013 by Salil Agrawal
Hello Salil,

Can you please give me a link where I can learn more about this.

My server can be or can not be c# but my client is definitely in c#.
0 votes

Use either WCF or Webservices

answer Jul 15, 2013 by anonymous
Similar Questions
+1 vote

I have data in table A as below

Assetid   attribute   value
    1546    Ins_date   05062011
    1546    status     active
    1546    X          10.4567
    1546    Y          27.56
    1546    size       17
    675     X          4.778
    675     Y          53.676
    675     depth      5
    675     st_date    06092010

I have data as above in table A. This table has many Assetids 1546,675,....etc. attributes might vary for assets.

I want output as below:

assetid  ins_date  status  X        Y       Size  depth  st_date
1546     05062011  active  10.4567  27.56   17    null   null
675      null      null    4.778    53.676  null  5      06092010

I have created Stored procedure, then called in Informatica to achieve this output. However, since i have large volume of data, it is taking much time to load.

Please suggest me other easy and best way to load it.

+5 votes

HI All,

I was asked this question in an interview sometime back. So I do not have more details like what is the environment or what services running. You can just make your own assumption and give me a suggestive answer.

+1 vote

Query description: I have a collection name student_db and added a document in a collection with entries (name: "alok, age : 31 and profession: "xyz"). After inserting the document into student_db database, I want to add another (key:value ) pair i.e. salary: 50000.

Can someone help me out to resolve this problem ?

...