Showing posts with label scenario. Show all posts
Showing posts with label scenario. Show all posts

Saturday, March 31, 2012

Web Server and Database Server separated

Hi,

Here is the scenario. Our website is hosted by hosting company. We plan to host the database at our office. The website connects to our database at our office. Is this possible? Is there a performance issue?

Thanks.

Dennis

That certainly is possible.
Things to take into mind, you have a open connection to your database server to anyone on the intranet, so you have to secure the connection via firewall and IP access control list. You might also think about creating a Web Service at the location where your database is for the application on hosts machine to access your data. Connection to the service via SSL would be relatively secure.
Secondly, there will be a slowdown in perfermance since the performance of your website rely's on the speed of yours hosts connection, the speed of your connection, and traffic on both of your networks. A local connection is faster than a remote connection, especially for accessing large amounts of data and a high number of queries. So if your pipe from the host to your database location is not sufficient to support the traffic for you site there will be a performance issue.


It's likely possible (depending mostly on your database engine, and thefirewall situation between your office and the hosting company) butthere may be some pretty serious performance issues. The timethat it's going to take to get data across the Internet could besignificantly longer than over a LAN. Personally, I'd bepretty cautious about this configuration. Not that it won't work,but certainly, test it well.

Saturday, March 24, 2012

Web service or vbscript?

The project I work on is a forum. Here is a scenario: if someone replies to a topic people who are listening to the topic should be notified via email. The email should be personally addressed. (Hello <user name>, new reply for topic. Click here to go to forum reply...). Anyway I have to query the database, get the list of people subscribed for the topic and send the individual emails out. Another requirement is that this should be independent of my web page processing. I would not want my processing to block for the task to complete.

Should I rely on a web service or just plain vbscript to do this?

If I am using a web service how do I call it during web page processing? (And it should be asynchronous too...!)

Regarding VbScript VS WebService, use a web service.

Regarding if it should be async, it should.

Regarding how to call it, see this article...

Asynchronous Web Services

http://www.informit.com/articles/article.aspx?p=29395&seqNum=1

...or any of the other many fine articles on the web.

HTH.

Thank you.

-- Mark Kamoski


Hi,

As far as I know, WebService is better. To implement Asynchronous Web Services, there is a sample as below.

WebService (name: WH)

using System;using System.Web;using System.Web.Services;using System.Web.Services.Protocols;[WebService(Namespace = "http://tempuri.org/")][WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]public class Service : System.Web.Services.WebService{public Service () {//Uncomment the following line if using designed components //InitializeComponent(); } [WebMethod]public voidSendMail() {//put your codes about sending mail into here. }}
 In your aspx page, you can call the WH WebService with Asynchronous approach.
 
protected void WSSendingMail() { WH.Service someWS =new WH.Service(); System.AsyncCallback cb =new AsyncCallback(showmsg); someWS.BeginSendMail(cb, someWS); }void showmsg(IAsyncResult ar) { WH.Service someWS = (WH.Service)ar.AsyncState; someWS.EndSendMail(ar); }
Hope this can help.
 

Monday, March 12, 2012

Web Services Protocol stack

Hi Guys Im trying to come up with examples for the different layers of the web services protocol stack below please carry on with the scenario is used in the the first two layers for the last two layers in blue

Discovery Layer

Scenario: Ok as you know the UDDI is responsible for the registry, I want to find a supplier for my restraint, which is within this registry. I have found my supplier, now I wish to purchase some linen, so I move to the Description layer which looks after what I have purchased.

Description Layer

Scenario: At this point a WSDL file was created, this as you know keeps a description of messages, sent by the web service, in this example these messages were formed by me purchasing some linen for the restaurant. The flow description file tells you which messages do what, e.g. one message creates a cart, another message adds items to it, after which another message causes checkout. The shopping cart, credit card and proof – of – transmission services are all formally described using this.

Messaging Layer

Please Insert a relevant scenario for this layer carrying on from the linen example above

Transport Layer

Please Insert a relevant scenario for this layer carrying on from the linen example above

Thanks a million

John

Messaging Layer

Scenario: SOAP is one of message specification. when people write a letter, they always write address, reciever etc firstly, then it's body, finally the regards. So everybody obey to this rule and can understand the each other better.

Transport Layer

Scenario: when sending letters, it follow the well known procedual: drop it to mail box. letter carrier collect the letters and send to post office then send to the destinations. in case no reciver was found, the letter may send back to you and tell you that reciver notfound. this protocal make us communicate conveniently