Hello,
I have a C# application that runs a relatively complex simulation
which, on a typical computer, could take up to 10 seconds. I am now
trying to port this application over to ASP.NET so obviously this
calculation needs to happen on the client. What is the best way to
implement this?
Some more information - all of the code needed to run this is located
in 3 or 4 C# dll's so at a high level I would simply look at the user
inputs on the web form and setup the simulation which would run on the
client and then have the ASP.NET page take the output and display the
results accordingly.
Now what is the most effective way to make this run on the client? If
I just include the classes in my project then it will run on the
server. Do I package this up into an ActiveX control that gets
deployed to the client? I do not want the code to be viewable (which I
think rules out using a client side scripting language) and I would not
want the user to be able to reuse this component in their own
application. It should be simple to run (so no client side
configuration beyond clicking on an "ok" prompt) and ideally would run
on any recent browser although I suspect that this last option won't be
doable.
Any help would be appreciated,
Roy 10 3210
I'm not sure why you say "obviously this calculation needs to happen on the
client" because it's not obvious from your post why it must be done on the
client, unless it is the computational load itself that you feel demands
this (in which case I'd be starting to think about how often each user might
be doing the simulation, and how many users you might have to give you an
indication of how beefy a server you might need).
But assuming you *do* need to do it on the client... you might wish to read
up on Smart Clients and see if that provides any help to you.
Kevin
"roygon" <ro****@gmail.c om> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. . Hello,
I have a C# application that runs a relatively complex simulation which, on a typical computer, could take up to 10 seconds. I am now trying to port this application over to ASP.NET so obviously this calculation needs to happen on the client. What is the best way to implement this?
Some more information - all of the code needed to run this is located in 3 or 4 C# dll's so at a high level I would simply look at the user inputs on the web form and setup the simulation which would run on the client and then have the ASP.NET page take the output and display the results accordingly.
Now what is the most effective way to make this run on the client? If I just include the classes in my project then it will run on the server. Do I package this up into an ActiveX control that gets deployed to the client? I do not want the code to be viewable (which I think rules out using a client side scripting language) and I would not want the user to be able to reuse this component in their own application. It should be simple to run (so no client side configuration beyond clicking on an "ok" prompt) and ideally would run on any recent browser although I suspect that this last option won't be doable.
Any help would be appreciated,
Roy
Thanks for the response. Perhaps "obviously" was not the correct
wording given the description. The ten seconds of computing time is
essentially at 100% CPU usage and there will be many requests per
second. Additionally, server resources are a constraint. So, for the
sake of discussion, let's say that running this calculation on the
server is not an option.
I have briefly looked into smart clients but from what I have seen it
does not achieve what I am looking for. I already have a windows
client so for those people willing to download the application I
already have a good, working solution. What I wanted for this web
based implementation was broad access without a software download /
installation. Almost all of my .NET development has been on
traditional client applications so I'm not fully aware of all of my
options.
I think I have three options but I am not sure if this is correct and
if I fully understand the implications.
1) Build the app in Java - I believe that by doing this the user would
essentally download the app within the browser and execute the
appropriate code on their own PC without exposing the code itself.
There would be a bit of a learning curve though for me here since I
have minimal java experience and I don't believe I will be able to use
my C# components although I could be wrong here.
2) Use Atlas - no idea if this is an option but it seems like there
might be some facilities to run fairly complex code on the client side
through an Atlas application.
3) Build the processing code into ActiveX components that are hosted on
the page
Does anyone have feedback on what I think my options are and how
effective they might be and also, have I missed any obvious choices?
Thanks,
Roy
Well if you use Atlas I believe your calculations will still be runing in
server side since atlas is an AJAX implementation for .NET.
I think your optionas are activex, java applets, or exposing the source in a
javascript class. You also can use a combination of things you want to hide
from the user and things you can do in the client side things, so your cpu
ussage will be diveiden between client and server. does that makes sense?
alex.
"roygon" <ro****@gmail.c om> wrote in message
news:11******** **************@ e56g2000cwe.goo glegroups.com.. . Thanks for the response. Perhaps "obviously" was not the correct wording given the description. The ten seconds of computing time is essentially at 100% CPU usage and there will be many requests per second. Additionally, server resources are a constraint. So, for the sake of discussion, let's say that running this calculation on the server is not an option.
I have briefly looked into smart clients but from what I have seen it does not achieve what I am looking for. I already have a windows client so for those people willing to download the application I already have a good, working solution. What I wanted for this web based implementation was broad access without a software download / installation. Almost all of my .NET development has been on traditional client applications so I'm not fully aware of all of my options.
I think I have three options but I am not sure if this is correct and if I fully understand the implications.
1) Build the app in Java - I believe that by doing this the user would essentally download the app within the browser and execute the appropriate code on their own PC without exposing the code itself. There would be a bit of a learning curve though for me here since I have minimal java experience and I don't believe I will be able to use my C# components although I could be wrong here.
2) Use Atlas - no idea if this is an option but it seems like there might be some facilities to run fairly complex code on the client side through an Atlas application.
3) Build the processing code into ActiveX components that are hosted on the page
Does anyone have feedback on what I think my options are and how effective they might be and also, have I missed any obvious choices?
Thanks,
Roy
I think that the Javascript idea is a good one (at least well worth looking
at). It would definately be the easiest to deploy.
The problem with all the other ideas is that you end up with loads of
security restrictions which stop them from working. This leaves you with the
problem of users needing to configure their browser properly. Also, with
Java, you need to have the correct version of the Java Virtual Machine
installed on the client. Off course they will also need to download the
ActiveX / Java applet.
Will
"Alex D." <al********@hot mail.com> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. .. Well if you use Atlas I believe your calculations will still be runing in server side since atlas is an AJAX implementation for .NET. I think your optionas are activex, java applets, or exposing the source in a javascript class. You also can use a combination of things you want to hide from the user and things you can do in the client side things, so your cpu ussage will be diveiden between client and server. does that makes sense?
alex.
"roygon" <ro****@gmail.c om> wrote in message news:11******** **************@ e56g2000cwe.goo glegroups.com.. . Thanks for the response. Perhaps "obviously" was not the correct wording given the description. The ten seconds of computing time is essentially at 100% CPU usage and there will be many requests per second. Additionally, server resources are a constraint. So, for the sake of discussion, let's say that running this calculation on the server is not an option.
I have briefly looked into smart clients but from what I have seen it does not achieve what I am looking for. I already have a windows client so for those people willing to download the application I already have a good, working solution. What I wanted for this web based implementation was broad access without a software download / installation. Almost all of my .NET development has been on traditional client applications so I'm not fully aware of all of my options.
I think I have three options but I am not sure if this is correct and if I fully understand the implications.
1) Build the app in Java - I believe that by doing this the user would essentally download the app within the browser and execute the appropriate code on their own PC without exposing the code itself. There would be a bit of a learning curve though for me here since I have minimal java experience and I don't believe I will be able to use my C# components although I could be wrong here.
2) Use Atlas - no idea if this is an option but it seems like there might be some facilities to run fairly complex code on the client side through an Atlas application.
3) Build the processing code into ActiveX components that are hosted on the page
Does anyone have feedback on what I think my options are and how effective they might be and also, have I missed any obvious choices?
Thanks,
Roy
I was considering that but the issue I have with javascript is that the
heavy code that is required to run on the client is also where the
intellectual property of my application is located so I can't really
offload the processing without exposing my entire product if I use a
client script! So, unfortunately that option is out. It looks like an
ActiveX control is likely going to be my best bet.
Thanks,
Roy
I couldnt agree more.
"William Buchanan" <wi************ **@naespamfreen et.co.uk> wrote in message
news:O%******** ********@TK2MSF TNGP02.phx.gbl. .. I think that the Javascript idea is a good one (at least well worth looking at). It would definately be the easiest to deploy.
The problem with all the other ideas is that you end up with loads of security restrictions which stop them from working. This leaves you with the problem of users needing to configure their browser properly. Also, with Java, you need to have the correct version of the Java Virtual Machine installed on the client. Off course they will also need to download the ActiveX / Java applet.
Will
"Alex D." <al********@hot mail.com> wrote in message news:%2******** ********@TK2MSF TNGP04.phx.gbl. .. Well if you use Atlas I believe your calculations will still be runing in server side since atlas is an AJAX implementation for .NET. I think your optionas are activex, java applets, or exposing the source in a javascript class. You also can use a combination of things you want to hide from the user and things you can do in the client side things, so your cpu ussage will be diveiden between client and server. does that makes sense?
alex.
"roygon" <ro****@gmail.c om> wrote in message news:11******** **************@ e56g2000cwe.goo glegroups.com.. . Thanks for the response. Perhaps "obviously" was not the correct wording given the description. The ten seconds of computing time is essentially at 100% CPU usage and there will be many requests per second. Additionally, server resources are a constraint. So, for the sake of discussion, let's say that running this calculation on the server is not an option.
I have briefly looked into smart clients but from what I have seen it does not achieve what I am looking for. I already have a windows client so for those people willing to download the application I already have a good, working solution. What I wanted for this web based implementation was broad access without a software download / installation. Almost all of my .NET development has been on traditional client applications so I'm not fully aware of all of my options.
I think I have three options but I am not sure if this is correct and if I fully understand the implications.
1) Build the app in Java - I believe that by doing this the user would essentally download the app within the browser and execute the appropriate code on their own PC without exposing the code itself. There would be a bit of a learning curve though for me here since I have minimal java experience and I don't believe I will be able to use my C# components although I could be wrong here.
2) Use Atlas - no idea if this is an option but it seems like there might be some facilities to run fairly complex code on the client side through an Atlas application.
3) Build the processing code into ActiveX components that are hosted on the page
Does anyone have feedback on what I think my options are and how effective they might be and also, have I missed any obvious choices?
Thanks,
Roy
also there are some javascript code scramblers out there. google for
"javascript scrambler"
"roygon" <ro****@gmail.c om> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. . I was considering that but the issue I have with javascript is that the heavy code that is required to run on the client is also where the intellectual property of my application is located so I can't really offload the processing without exposing my entire product if I use a client script! So, unfortunately that option is out. It looks like an ActiveX control is likely going to be my best bet.
Thanks,
Roy
I would still entertain running the computation on the server, or via an
Ajax call to a server, since there is no requirement that you only need
*one* server handling the requests.
Using a round-robin DNS for example, all clients might access
"site.company.c om" and be directed to one of many servers to service the
request. Assuming the computation is relatively self-contained, I think you
could do that easily.
I always try avoid tying myself too closely to a particular platform or
browser, which ActiveX is gonna do to you.
Kevin
"roygon" <ro****@gmail.c om> wrote in message
news:11******** **************@ i39g2000cwa.goo glegroups.com.. . I was considering that but the issue I have with javascript is that the heavy code that is required to run on the client is also where the intellectual property of my application is located so I can't really offload the processing without exposing my entire product if I use a client script! So, unfortunately that option is out. It looks like an ActiveX control is likely going to be my best bet.
Thanks,
Roy
If the code is all calculations, no local resource access, then the
JAVA security model will not be a problem.
If you know C#, porting your code to JAVA should be pretty easy. The
languages are VERY similar.
It's a little trickier getting data back from the applet to the form...
O'Reilly has several JAVA books, one covers this. Of course, the
applet could also post the data back itself.
Because ActiveX controls have little to no security framework, a lot of
people disable them.
Your users will need the right JAVA plug-in, but the browser will
prompt them for it.
--Russell
Kevin Frey wrote: I would still entertain running the computation on the server, or via an Ajax call to a server, since there is no requirement that you only need *one* server handling the requests.
Using a round-robin DNS for example, all clients might access "site.company.c om" and be directed to one of many servers to service the request. Assuming the computation is relatively self-contained, I think you could do that easily.
I always try avoid tying myself too closely to a particular platform or browser, which ActiveX is gonna do to you.
Kevin
"roygon" <ro****@gmail.c om> wrote in message news:11******** **************@ i39g2000cwa.goo glegroups.com.. .I was considering that but the issue I have with javascript is that the heavy code that is required to run on the client is also where the intellectual property of my application is located so I can't really offload the processing without exposing my entire product if I use a client script! So, unfortunately that option is out. It looks like an ActiveX control is likely going to be my best bet.
Thanks,
Roy This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rasmus |
last post by:
Hi.
As partly novice in python I would like a piece of advise of how to
implement (binary) trees the best way?
Thanks in advance,
Rasmus
PS: Due to heavy spam reception (20.000+/week), I use a fake sender address.
|
by: Paul Rubin |
last post by:
I've been approached about writing a Windows app which will need a
really professional looking GUI. Forget TKinter, this has to actually
look good (real artists will be available to get the visual stuff
right). Assuming I write in Python, what's the best toolkit to use?
Some cost in implementation pain is tolerable if the finished
interface looks better as a result. It would be nice if the toolkit
runs on multiple platforms rather than...
|
by: Peter Foti |
last post by:
Simple question... which is better to use for defining font sizes and why?
px and em seem to be the leading candidates. I know what the general answer
is going to be, but I'm hoping to ultimately get some good real world
examples.
Fire away! :)
Regards,
Peter Foti
|
by: Neil |
last post by:
I need to get two values from a complex SQL statement which returns a single
record and use those two values to update a single record in a table. In
order to assign those two values to variables and then use those variables
in the UPDATE statement, I created a cursor and used Fetch Next.... Into.
This way, I only have to call the complex SQL once instead of twice.
This seems like the best way to go. However, I've always used cursors for...
|
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their code
was littered with document.all and eval, for example, and I wanted to create
a practical list of best practices that they could easily put to use.
The above URL is version 1.0 (draft) that resulted. IMO, it is not a
replacement for the FAQ,...
| |
by: nib |
last post by:
What kind of problems is c best at solving?
|
by: Michiel Alsters |
last post by:
Hello everybody,
I hope anybody can help me. I'll try to give a brief overview of my
problem. I have running a program that performs a heavy calculation.
To give the user feedback what the program is doing I show a window
which contains a progress bar and a label. At some point during the
execution the state of the calculation is changed, so I want to let
the user know this.
I have placed the creation of the form in a seperate thread...
|
by: Steve McLellan |
last post by:
Hi,
Sorry to repost, but this is becoming aggravating, and causing me a lot of
wasted time. I've got a reasonably large mixed C++ project, and after a
number of builds (but not a constant number) linking (and sometimes
compiling) becomes immensely slow, and task manager shows that link.exe (or
cl.exe) is barely using any processor time, but an awful lot of RAM (around
150-200MB). I'm going to keep an eye on page faults since I can't...
|
by: Abhishek Tripathi |
last post by:
Hi,
I am using a code similar to
Database db = DatabaseFactory.CreateDatabase("MyDB")
in every function of my DAL that interacts directly to database. But
recently I have started getting connection pool errors.
I think, it is because of incorrect usage pattern of Database Object of
DAAB. I want to know that what should be the best approach to it. Shall
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |