The Daycare v001 sample web-site is up. The location is http://radvsampledaycareapp001.azurewebsites.net/.
In the spirit of automation, paper sign-in sheets in pre-schools should be replaced with electronic systems. The Azure Cloud systems will make the recording of student attendance more reliable and increase the visibility to responsible parties via multiple devices including mobile.
Pre-schools and childcare centers are required to track the acceptance and transfer of responsibility of enrolled students between parents, guardians and teachers. It is critical that child care centers know where each and every student is all of the time. In addition, some subsidized care is governed by attendance days and hours. Today, most attendance tracking is still manual. By moving to electronic systems in the Azure Cloud, the paper systems can be automated and be made visible to all parties regardless of location. This project will attempt to capture all the needed systems to provide a kiosk type device for a mock pre-school and digitize the sign-in / sign-out experience. In addition, real-time attendance information will be made available to school directors via mobile devices.
The Azure Web Site
The Daycare v001 sample web-site is up. The location is http://radvsampledaycareapp001.azurewebsites.net/. I started with the MFC 4 samples in VS2012. The ASP.NET MVC 4 Web Application was chosen as the starting point with the next selection of the "Internet Application". This brings in the standard .NET identity management scaffolding. At this stage, no DBMS is available, so the major work was the following:
SimpleMembership for now since a dbms is not available yet. Getting
SimpleMembership to work under Azure Web Sites is a bit messy and doesn’t work naturally with SQL Database. Might be a candidate for SQL on VM.
- Concentrate on the main menu and navigate with mock-up data.
- Work on publication and deployment.
The SQL Database
The SQL Database is now up and running. I wanted to add the
SimpleMembership model back in to provide membership capabilities, but the standard utilities are not supported. So I did the following:
- Create a local version of the
SimpleMembership database using the .NET utility (search for aspnet_regsql.exe I think).
- Created the Azure DDL with the SQLAzureMW.exe utility. This enabled creating a script file for creating the DDL objects and constraints.
- I re-enabled the
SimpleMembership sections that were commented out in the previous section.
- Enabled the web-config to point to the new database in the
- Followed the instructions to enable Google and Microsoft external providers and
- Published the new app. This now gives the Daycare app the capability of discrete login, subscriber registration and the use of external authentication providers.
The Azure VM
The Azure VM is now up and running. Server Name=radvazuredev.cloudapp.net. For this project, it will serve as a WebApi functionality and load tester. Because my local internet access is slow with high latency, the VM will serve as a better scale out tester and loader.
- The RadventureSoft framework supports WebApi as the recommended technology for web services. This is closely aligned with the MVC front-end model and encourages high reuse of business and technology components. JSON is the recommended accept and content for send / receive.
- In preparation for mobile access, the following APIs will be created for Daycare administrators:
- [dest]/radvexec/RavcHwsDbSession/Login – POST with a Profile Boot Request will prep access to user profile information
- [dest]/radvexec/RavcHwsDbSession/Login – POST with a Daycare Product Boot Request will prep access to the daycare product information
- [dest]/radvexec/RavcHwsDbSession/Logout – POST with a Daycare Product Boot Request will cancel access to the daycare product information
- [dest]/radvexec/RavcHwsDbSession/Logout – POST with a Profile Boot Request will cancel access to user profile information
- [dest]/radvexec/RavaHwsAppDaycare/WhosSignedInNow – GET – Will return all of the students that are currently sighed in
- [dest]/radvexec/RavaHwsAppDaycare/WhosSignedInNow?psRoomType=bridge – GET - Will return all of the students that are currently sighed in for a specific room
- [dest]/radvexec/RavaHwsAppDaycare/WhosNotSignedInNow – GET – Will return all of the students that are NOT currently sighed in
- [dest]/radvexec/RavaHwsAppDaycare/WhosSignedInNow?psRoomType=bridge – GET - Will return all of the students that are NOT currently sighed in for a specific room
- The VM contains a command application that randomizes these requests for a given duration at a given request rate. It is able to spawn multiple instances so that we can get a first glance at requests per second / minute / hour loads.
- The web site can now be scaled out and tested for multi-instance issues and performance.
The Mobile Application
6/23/2013 - The Windows 8 Phone platform was chosen as the platform for this phase of the project. The goal was to see how much existing framework and application code would be compatible. This application would start up with "Who's Signed In" for all classrooms. It uses the pivot metaphor with the panning displaying who is signed in by class. So the panning navigation is (All Classrooms, Toddler, pre-school. bridge). There are 2 main menu items being who is in, and who is not in. It connects to the main application using the new HttpClient classes available for Window 8 and connects to the WebApi web services described in a previous section. The application was built using Visual Studio 2012 starting with the Windows 8 Phone pivot application project. Today it works in the emulator only and has hard coded server instance information. The "settings" panel for instance and personal preferences will be an enhancement for another day.
Using the code
- The Disable
SimpleMembersip code is submitted under a separate article.
Points of Interest
- 5/7/2013 - I wasn’t ready to setup a database quite yet and I couldn’t get localdb to work quickly for
SimpleMembership on the Azure Web Site. It is ok, since localdb won’t work at scale out anyway. But if you’re struggling just trying to get development started using Azure Web Sites and MVC 4, it could impede your progress.
- 5/24/2013 - SQL Azure does have some limitations. Getting the
SimpleMembership data structures out there was a challenge. The standard .NET utilities do not work and the auto database creation (which I'm not a fan of anyway) is not supported.
- 6/08/2013 - The initial results of the load testing was better than expected. Loads of 100+ requests per second were recorded with a web site scale of 3 and the initial SQL database configuration. While the max load was not attempted, I was reasonably satisfied with the initial results.
- 6/23/2013 - Porting the data connectivity to async was a bit more involved that originally expected. I decided to use the newer async and await C# constructs. However, this involved moving these changes all the way up the call stack so that the which broke the existing data connection class signatures. I now understand why other developers are using conditional processing to retain portability across the windows 8 mobile platform. While I am not a super fan of conditional processing because it will result in different behavior for a similar section, I don't like the other alternatives. I have decided how to roll in these changes into the framework yet but may do it in the future. It is a big impact on a class library so some further thought has to go in.
- v001r000 - Initial Revision - Article drafted and submitted
- v001r001 - 05/09/2013 - Second Challenge: Build a website. April 29 - May 12
- Azure Web Site setup and running. Main article revised. Additional articles submitted.
- v001r002 - 05/24/2013 - Third Challenge: Using SQL On Azure.
- SQL Azure is up and running. Main article revised.
- v001r002 - 06/08/2013 - Forth Challenge: Using VM On Azure.
- VM on Azure is up and running. Main article revised.
- v001r003 - 06/08/2013 - Fifth Challenge: Mobile Application.
- Mobile application is complete. Runs in emulator only today. Pics will be uploaded at a later time .
- Code Project complete