Multi-tiered Application with client Server Architecture

I want to Develop a Multi-tiered application with Client Server Architecture. I have one server and many clients around 10 to 15 or even more than that.

I have one problem. When some master data is inserted by some clients it must be available to all the clients and server application at the same time and if the other clients has already opend the master form then it also immediately updated when another clients inserting record in that master.

Can any one give me solution for this problem. How to implement this in .net 2.0

Thanks in advanced

Nayan




Answer this question

Multi-tiered Application with client Server Architecture

  • ScorpEagle

    OK.

    but i have to use only vb.net or C#. there is any way to do that the same task in C# or VB.Net

    Arnon Rotem Gal Oz wrote:

    If you want something more generic you'd have to do some more work

    for example if you are using WCF you can use a duplex contract where each client woudl have a handler to accepts the notifications from the server

    After you've updated a significant record your business logic can notify the clients that data has changed

    Arnon



  • VoiceOfExperience

    SQLQuery Notification works on SQL Express edition

    Diego Dagum wrote:

    Hi Nayan,

    You'll find several application examples at the MSDN SQL Server Developer Center: http://msdn2.microsoft.com/en-us/sql/default.aspx

    Particularly I've found a page called Using Query Notifications: http://msdn2.microsoft.com/en-us/architecture/t9x04ed2.aspx

    Together with what Arnon gave you, hope it helps



  • LKeene

    Thanks.

    Diego Dagum wrote:

    Hi Nayan,

    You'll find several application examples at the MSDN SQL Server Developer Center: http://msdn2.microsoft.com/en-us/sql/default.aspx

    Particularly I've found a page called Using Query Notifications: http://msdn2.microsoft.com/en-us/architecture/t9x04ed2.aspx

    Together with what Arnon gave you, hope it helps



  • Andy Ho

    If you want something more generic you'd have to do some more work

    for example if you are using WCF you can use a duplex contract where each client woudl have a handler to accepts the notifications from the server

    After you've updated a significant record your business logic can notify the clients that data has changed

    Arnon



  • Justin.V

    Thanks

    Diego Dagum wrote:

    Hi Nayan,

    You'll find several application examples at the MSDN SQL Server Developer Center: http://msdn2.microsoft.com/en-us/sql/default.aspx

    Particularly I've found a page called Using Query Notifications: http://msdn2.microsoft.com/en-us/architecture/t9x04ed2.aspx

    Together with what Arnon gave you, hope it helps



  • Davy007

    Yes any bi-directional channel will do (e.g. messaging using MSMQ)

    Arnon



  • David Mack

    If you drop your requirement for working with any database you may want to look at Query Notification

    http://www.simple-talk.com/sql/sql-server-2005/using-and-monitoring-sql-2005-query-notification/

    Arnon



  • DigitalPenguin

    try with WCF, you have new communications systems that can propagate events that clients suscribe. You have p2p too.

    But, perhaps you could think in another architecture that just clients communicates to servers, not in both ways.

    !Good luck!



  • Aditya Kirloskar

    Hi Nayan,

    You'll find several application examples at the MSDN SQL Server Developer Center: http://msdn2.microsoft.com/en-us/sql/default.aspx

    Particularly I've found a page called Using Query Notifications: http://msdn2.microsoft.com/en-us/architecture/t9x04ed2.aspx

    Together with what Arnon gave you, hope it helps



  • NeederOfVBHelp

    Nayan,

    just in case you are using SQL Server 2005 as database, you have the possibility of make every client suscribe to a master data query through SQL Server Query Notifications facility. That way, every time the master data changes, the database engine triggers a notification message for every suscriber (that facility is excellent for cache refreshing, for instance, without having to frequently ask for changes from the cache to the database)

    You can learn about Query Notifications here: http://msdn2.microsoft.com/en-us/architecture/ms175110.aspx

    Hope it helps



  • mekuse

    Thanks a lot. It is workable.

    but what happen if i want to use another database like MySQL,Oracle etc.

    I am using remoting service to handle any insertion,updation and deletion operation. How can i do that in this situation

    Because my plan is to give the functionality that client can choose any Database.

     Diego Dagum wrote:

    Nayan,

       just in case you are using SQL Server 2005 as database, you have the possibility of make every client suscribe to a master data query through SQL Server Query Notifications facility. That way, every time the master data changes, the database engine triggers a notification message for every suscriber (that facility is excellent for cache refreshing, for instance, without having to frequently ask for changes from the cache to the database)

       You can learn about Query Notifications here: http://msdn2.microsoft.com/en-us/architecture/ms175110.aspx

     

     

       Hope it helps



  • Quentin Mayberry

    Hi Nayan,

       not sure if other databases come with notification capabilities (I guess they come, but surely with alternative mechanisms since notifications aren't a standard feature yet)

       You touch an interesting point when you say "I would like to give the client the possibility to choose". In my past as developer/field architect, I committed several mistakes (I have to admit it) just because the remote ocassionality of being excessively generic

       DB independence is really an issue I'm not suggesting that in your case isn't. I know very little about your case but I remember working in Argentina for a motorcar company which had made a strong investment in an IBM DB/2 database, we tried all the time to write ANSI SQL sentences just in case tomorrow the database could be Oracle. That happened during the nineties and nowadays that company was sold and bought twice, Argentina felt down and rose twice too  but they still are taking advantage of the DB/2 database they bought once in their past lifes

       What I mean is, of course platform-independence is a desirable feature, vendor lock-in doesn't look sexy at all, but there also exist the probabilities

     

       I learnt that, similar to your case, writing tons of C#, VB.NET, Java or whatever code lines just in case the infrastructure could change, where such possibility has a probability of O(0.01) or less isn't a good decision. If the infrastructure is known in advance and the probability of change is low, try to take the most you can from it and save time, money and headaches

       Of course, if you belong to a software company, devoted to create a solution intended to be sold to several customers with unpredictable realities, this reco looses gravity, I accept it. However, even a general purpose solution like Hibernate, the Object/Relational Mapper, applies an approach based on dialects (actually an implementation of the Strategy Pattern) to get the most of a rich set of databases (see http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-optional-dialects for more info). You can apply a similar approach in order to decouple the general algorithms of your solution from specific modules like, in this case, notificacions



  • Frans Vander Meiren

     Thanks a lot.

    if i drope my idea for the any database and just use the SQL-Server 2005 as database.  can u think using SQL Server Query Notification my first problem is solved. ( I want to Develop a Multi-tiered application with Client Server Architecture. I have one server and many clients around 10 to 15 or even more than that.  I have one problem. When some master data is inserted by some clients it must be available to all the clients and server application at the same time and if the other clients has already opend the master form then it also immediately updated when another clients inserting record in that master.).

    Any idea how can i do it

     Diego Dagum wrote:

    Hi Nayan,

       not sure if other databases come with notification capabilities (I guess they come, but surely with alternative mechanisms since notifications aren't a standard feature yet)

       You touch an interesting point when you say "I would like to give the client the possibility to choose". In my past as developer/field architect, I committed several mistakes (I have to admit it) just because the remote ocassionality of being excessively generic

       DB independence is really an issue I'm not suggesting that in your case isn't. I know very little about your case but I remember working in Argentina for a motorcar company which had made a strong investment in an IBM DB/2 database, we tried all the time to write ANSI SQL sentences just in case tomorrow the database could be Oracle. That happened during the nineties and nowadays that company was sold and bought twice, Argentina felt down and rose twice too  but they still are taking advantage of the DB/2 database they bought once in their past lifes

       What I mean is, of course platform-independence is a desirable feature, vendor lock-in doesn't look sexy at all, but there also exist the probabilities

     

       I learnt that, similar to your case, writing tons of C#, VB.NET, Java or whatever code lines just in case the infrastructure could change, where such possibility has a probability of O(0.01) or less isn't a good decision. If the infrastructure is known in advance and the probability of change is low, try to take the most you can from it and save time, money and headaches

       Of course, if you belong to a software company, devoted to create a solution intended to be sold to several customers with unpredictable realities, this reco looses gravity, I accept it. However, even a general purpose solution like Hibernate, the Object/Relational Mapper, applies an approach based on dialects (actually an implementation of the Strategy Pattern) to get the most of a rich set of databases (see http://www.hibernate.org/hib_docs/v3/reference/en/html/session-configuration.html#configuration-optional-dialects for more info). You can apply a similar approach in order to decouple the general algorithms of your solution from specific modules like, in this case, notificacions



  • Gnanadurai

    Problems start at the connection level here. You'll need to have the abillity to, at least at a functional level, send an update command from the server to the client. You could do this with pull, but this either delays the update or wreaks the performance. I personally would choose to have some kind of listener on the client, that the server can talk to.

    Second you will need to keep track of the records that each client opens. This way, if one client changes a record, you can then get a list of clients that also have the record open and update the information.

    This doesn't look like anything standard to me. There is a lot of custom code here.


  • Multi-tiered Application with client Server Architecture