Upload
tas-pro
View
35
Download
4
Embed Size (px)
DESCRIPTION
a
Citation preview
Tags: .NET, Frameworks (XAF & XPO), eXpressApp FrameworkID :S36497
Created O n :1/6/2011 1:16:54 PM
Mod if ied O n :3/24/2015 5:11:06 PM
SUPPORT CENTER FAQTraining EventsLocalizationExamplesTickets
Submit a Support TicketSubmit a Support TicketType search string and press Enter
0solutions
Deployment - Make it easier to scale XAF ASP.NET applications over multiple Web servers
2 Dennis (DevExpress Support) 5 years ago
Problem descriptionXAF ASP.NET WebForms UI was designed to build business applications that will be used on local Intranet, for instance within a company. It is not fullyoptimized for public internet usage with many simultaneous users.Technically, an XAF Web application uses the ASP.NET session to store non-serializable service information (XafApplication, WebWindow and many otherentities by means of the IValueManager interface, etc. - see the B221002 ticket for an approximate list of dependencies on the ASP.NET session object)about the current application state. Maintaining the session state allowed us to deliver a greater functionality and an easier development model to XAFdevelopers. For instance, you can implement a Controller and access and store a reference to the current View and its controls, ObjectSpace, otherControllers, etc. without caring a lot about ASP.NET page life cycle specifics. However, the chosen approach has its own drawbacks that may require a bitmore effort from you while addressing certain business requirements such as good scalability, because you cannot use a session state mode other thanInProc.
Current solutionSince the application state cannot be serialized and thus only the InProc session mode can be used, you can load balance web servers and route requestsfrom clients to the same content server (aka "sticky" sessions). Here is a good blog post on how to do this: http://blog.zerosharp.com/deploy-xaf-asp-dot-net-applications-to-amazon-web-services-part-5-load-balancing/ . We do not provide special guidelines or documentation for this particular scenario asan XAF Web app is a regular ASP.NET WebForms app that maintains its state within the ASP.NET session. That said, you can look for public communityresources devoted to ASP.NET apps with a similar configuration. For instance, you may find other links under the eXpressApp Framework > Deployment >Deployment Tutorial > Deployment Troubleshooting Guide article helpful as well.
Proposed solutions/Future considerations:
1. Avoid session state at all. For instance, there may be a lightweight HTML5 web client added with a RESTful service for the backend or a reworked versionof the existing ASP.NET WebForms UI;2. Decrease memory consumption per user session (see http://documentation.devexpress.com/#Xaf/CustomDocument3172 for more details on thecurrent memory requiremens);3. Make it possible to serialize/deserialize session data of XAF ASP.NET applications (support the StateServer and SQLServer session state modes, AppFabriccaching, etc.).
See also:
http://msdn.microsoft.com/en-us/library/ee790954.aspx
http://msdn.microsoft.com/en-us/library/ms178586.aspx
W e h ave over 1500 u ser across 60 cu stomers n ow an d w e rea lly n eed to ab ility to take servers in an d ou t o f th e load balan cer. R igh t n ow if aserver d ies, th e u ser is fo rced to log on again . Th is h as been h ere fo r 4 years. Are th ere an y p lan s to make XAF W eb sca lab le in th is scen ario?
Th an ks.
Robert Thomas 2 years ago
@ Robert: I am afra id I can n o t g ive an y p romises regard in g mak in g XAF W eb apps stateless an d su ggest you con sider a ltern atives fo r th isparticu lar scen ario . W h ile th is scen ario looks h elp fu l overa ll, XAF W eb U I w as n o t o rig in a lly design ed to be u sed by man y con cu rren t u sers ata time. Tech n ica lly, su pportin g th is mean s rew ritin g a lo t o f th in gs n o t to sto re an yth in g w ith in th e ASP.NET session + h u ge b reak in gch an ges fo r existin g apps as th ere w ill be a d if feren t app lication life cycle an d f low . In an y even t, w e w ill take you r feedback in to accou n t fo rth e fu tu re.
Dennis (DevExpress Support) 2 years ago
'Sca lin g ou t' is easy. It is on ly 'sca lin g in ' w h ich resu lts in d ropped session s. Ideally DevExp ress w ill come u p w ith some w izard ry to permit XAFstatelessn ess, bu t mean w h ile h ere are some su ggestion s.
Sh o rt term, th e best so lu tion is to get th e load balan cer to h an d le th e g racefu l sh u tdow n o f a su rp lu s server. W h en a server n eeds to beremoved , th e load balan cer sh ou ld be con f igu red to stop sen d in g NEW session s to th e server, bu t con tin u e to red irect EXISTING session s toit. Th en w h en th e su rp lu s server even tu ally h as zero session s (becau se o f logo ffs an d session timeou ts) th en you can remove it w ith ou tcon sequ en ces. (You cou ld eith er mon ito r th e n u mber o f existin g session s, o r ju st w ait fo r a su itab le lon g time, e.g . , an h ou r befo re assu min gall session s are over).
U n fo rtu n ately I've n ever go t arou n d to tryin g to set th is u p , bu t I believe it's possib le w ith man y h ardw are load balan cers o r a reverse p roxysu ch as n g in x. Also , it migh t n o t be too h ard to w rite you r ow n C# load balan cer (see fo r in stan ceh ttp ://w w w .codepro ject.com/Articles/318290/How -to-Imp lemen t-Load-B alan cin g-to -D istribu te-W ork ) w h ich you cou ld exten d to h an d le th eg racefu l sh u tdow n red irection an d mon ito rin g .
O n a related n o te, th e E lastic Load B alan cer u sed by th e Amazon Clou d does n o t h ave an y su ch capab ilities ou t o f th e box, bu t th ere is th isfo ru m post h ttps://fo ru ms.aw s.amazon .com/th read .jspa?th read ID= 61278 w h ich you can fo llow in case th ey su pport it on e day. (I believe th esame p rob lems exist w ith Azu re). You migh t a lso like to read my b log post on th e issu e h ttp ://b log .zerosh arp .com/dep loy-xaf-asp-do t-n et-app lication s-to -amazon -w eb-services-part-5-load-balan cin g/
Robert Anderson 2 years ago
Th an ks fo r you r add ition al feedback an d lin ks, Robert. I th in k it w ill be h elp fu l fo r o th er u sers w ith th e same requ iremen t u n til an u ltimateso lu tion fo r su ch scen ario s is p rovided .
Dennis (DevExpress Support) 2 years ago
Proposed so lu tion s/Fu tu re con sideration s:
3. Make it possib le to seria lize/deseria lize session data o f XAF ASP.NET app lication s (su pport th e StateServer an d SQLServer session statemodes, AppFabric cach in g , etc.).
1 vo te.
CM Tee 3 months ago
Leave a Comment
Products Free Trials & Demos Buy Support My Account About Us
Log In
S36497 - Deployment - Make it easier to scale XAF ASP.NET applications over multiple Web servers | DevExpress Support Center 25-May-15
https://www.devexpress.com/Support/Center/Question/Details/S36497 1 / 2
DEVEXPRESSAbout UsNewsOur AwardsUpcoming EventsUser CommentsCase StudiesReviews and PublicationsLicensingPurchasingMVP ProgramContact UsLogos
.NET CONTROLSWinFormsASP.NETMVCWPFSilverlightWindows 8 XAML
CROSS PLATFORMReportingDocument Automation
MOBILEDevExtreme Mobile
ENTERPRISE TOOLSReport ServerAnalytics Dashboard
FRAMEWORKSeXpressApp Framework
CODE-DEBUG-REFACTORCodeRush for Visual Studio
HTML5 JS WIDGETSDevExtreme Web
iOS 7DataExplorer
FUNCTIONAL WEB TESTINGTestCafe
DELPHI C++BUILDERVCL
SUPPORTSearch the Knowledge BaseMy QuestionsCode ExamplesGetting StartedDemosDocumentationBlogsTrainingWebinars
Current Version/BuildVersion History
FOLLOW US
Your Privacy - Legal Statements Copyright 1998-2014 Developer Express Inc.All trademarks or registered trademarks are property of their respective owners
DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, BusinessApplication Frameworks, and Reporting Systems for Visual Studio, along with high-performanceHTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whetherusing WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help youbuild and deliver your best in the shortest time possible.
If you need additional product information, write to us at [email protected] or call us at +1 (818) 844-3383
S36497 - Deployment - Make it easier to scale XAF ASP.NET applications over multiple Web servers | DevExpress Support Center 25-May-15
https://www.devexpress.com/Support/Center/Question/Details/S36497 2 / 2
Deployment - Make it easier to scale XAF ASP.NET applications over multiple Web servers